X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/2d95a83959c77a0c4820c6668b439f8e1b0d038a..a52fc9424444400d4c774b76cf9f59ba43f9dc12:/automationTest/src/test/java/androidtest/tests/LogoutTestSuite.java diff --git a/automationTest/src/test/java/androidtest/tests/LogoutTestSuite.java b/automationTest/src/test/java/androidtest/tests/LogoutTestSuite.java index f9f54027..876c0ce4 100644 --- a/automationTest/src/test/java/androidtest/tests/LogoutTestSuite.java +++ b/automationTest/src/test/java/androidtest/tests/LogoutTestSuite.java @@ -1,27 +1,42 @@ package androidtest.tests; +import static org.junit.Assert.*; +import io.appium.java_client.android.AndroidDriver; + import org.junit.After; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.rules.TestName; import androidtest.actions.Actions; +import androidtest.groups.NoIgnoreTestCategory; +import androidtest.groups.SmokeTestCategory; import androidtest.models.LoginForm; import androidtest.models.MainView; import androidtest.models.MenuList; import androidtest.models.SettingsView; -public class LogoutTestSuite extends Common{ +public class LogoutTestSuite{ + + AndroidDriver driver; + Common common; + @Rule public TestName name = new TestName(); + @Before public void setUp() throws Exception { - setUpCommonDriver(); + common=new Common(); + driver=common.setUpCommonDriver(); } @Test + @Category({NoIgnoreTestCategory.class, SmokeTestCategory.class}) public void testLogout () throws Exception { MainView mainView = Actions.login(Config.URL, Config.user,Config.password, Config.isTrusted, driver); - waitForTextPresent("ownCloud", mainView.getTitleTextElement()); + common.assertIsInMainView(); MenuList menulist = mainView.clickOnMenuButton(); SettingsView settingsView = menulist.clickOnSettingsButton(); settingsView.tapOnAccountElement(1, 1000); @@ -33,8 +48,8 @@ public class LogoutTestSuite extends Common{ @After public void tearDown() throws Exception { - takeScreenShotOnFailed(getName()); - driver.removeApp("com.owncloud.android"); + common.takeScreenShotOnFailed(name.getMethodName()); + //driver.removeApp("com.owncloud.android"); driver.quit(); } }