Search in sources :

Example 6 with SettingsView

use of com.owncloud.android.test.ui.models.SettingsView in project android by owncloud.

the class LoginTestSuite method testMultiAccountAndShowFiles.

@Test
@Category({ NoIgnoreTestCategory.class, SmokeTestCategory.class })
public void testMultiAccountAndShowFiles() throws Exception {
    driver.rotate(ScreenOrientation.LANDSCAPE);
    FileListView fileListView = Actions.login(Config.URL, Config.user, Config.password, Config.isTrusted, driver);
    common.assertIsInFileListView();
    fileListView.scrollTillFindElement(Config.fileWhichIsInTheServer1);
    assertTrue(fileListView.getFileElement().isDisplayed());
    driver.rotate(ScreenOrientation.PORTRAIT);
    MenuList menu = fileListView.clickOnMenuButton();
    SettingsView settingsView = menu.clickOnSettingsButton();
    settingsView.tapOnAddAccount(1, 1000);
    fileListView = Actions.login(Config.URL2, Config.user2, Config.password2, Config.isTrusted2, driver);
    common.assertIsInSettingsView();
    settingsView.tapOnAccountElement(2, 1, 100);
    common.assertIsInFileListView();
    fileListView.scrollTillFindElement(Config.fileWhichIsInTheServer2);
    assertTrue(fileListView.getFileElement().isDisplayed());
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) MenuList(com.owncloud.android.test.ui.models.MenuList) SettingsView(com.owncloud.android.test.ui.models.SettingsView) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 7 with SettingsView

use of com.owncloud.android.test.ui.models.SettingsView in project android by owncloud.

the class LogoutTestSuite method testLogout.

@Test
@Category({ NoIgnoreTestCategory.class, SmokeTestCategory.class })
public void testLogout() throws Exception {
    FileListView fileListView = Actions.login(Config.URL, Config.user, Config.password, Config.isTrusted, driver);
    common.assertIsInFileListView();
    MenuList menulist = fileListView.clickOnMenuButton();
    SettingsView settingsView = menulist.clickOnSettingsButton();
    settingsView.tapOnAccountElement(1, 1, 1000);
    LoginForm loginForm = settingsView.clickOnDeleteAccountElement();
    assertEquals("Server address https://…", loginForm.gethostUrlInput().getText());
    assertEquals("Username", loginForm.getUserNameInput().getText());
    assertEquals("", loginForm.getPasswordInput().getText());
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) MenuList(com.owncloud.android.test.ui.models.MenuList) LoginForm(com.owncloud.android.test.ui.models.LoginForm) SettingsView(com.owncloud.android.test.ui.models.SettingsView) Category(org.junit.experimental.categories.Category) SmokeTestCategory(com.owncloud.android.test.ui.groups.SmokeTestCategory) NoIgnoreTestCategory(com.owncloud.android.test.ui.groups.NoIgnoreTestCategory) Test(org.junit.Test)

Aggregations

MenuList (com.owncloud.android.test.ui.models.MenuList)7 SettingsView (com.owncloud.android.test.ui.models.SettingsView)7 FileListView (com.owncloud.android.test.ui.models.FileListView)6 Test (org.junit.Test)6 Category (org.junit.experimental.categories.Category)6 LoginForm (com.owncloud.android.test.ui.models.LoginForm)3 NoIgnoreTestCategory (com.owncloud.android.test.ui.groups.NoIgnoreTestCategory)2 SmokeTestCategory (com.owncloud.android.test.ui.groups.SmokeTestCategory)1 PassCodeRequestView (com.owncloud.android.test.ui.models.PassCodeRequestView)1 PassCodeView (com.owncloud.android.test.ui.models.PassCodeView)1