Search in sources :

Example 1 with PassCodeView

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

the class PasscodeTestSuite method testPincodeEnable.

@Test
@Category({ NoIgnoreTestCategory.class })
public void testPincodeEnable() throws Exception {
    driver.rotate(ScreenOrientation.PORTRAIT);
    FileListView fileListView = Actions.login(Config.URL, Config.user, Config.password, Config.isTrusted, driver);
    common.assertIsInFileListView();
    MenuList menu = fileListView.clickOnMenuButton();
    SettingsView settingsView = menu.clickOnSettingsButton();
    PassCodeView passCodeview = settingsView.EnablePassCode();
    PassCodeView passCodeview2 = passCodeview.enterPasscode(Config.passcode1, Config.passcode2, Config.passcode3, Config.passcode4);
    passCodeview2.reenterPasscode(Config.passcode1, Config.passcode2, Config.passcode3, Config.passcode4);
    driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_HOME);
    //TO DO. Open the app instead of start an activity
    driver.startActivity("com.owncloud.android", ".ui.activity.FileDisplayActivity");
    //here we check that we are not in the fileDisplayActivity,
    //because pincode is asked
    common.assertIsNotInFileListView();
    common.assertIsPasscodeRequestView();
    PassCodeRequestView passCodeReequestView = new PassCodeRequestView(driver);
    passCodeReequestView.enterPasscode(Config.passcode1, Config.passcode2, Config.passcode3, Config.passcode4);
    common.assertIsInFileListView();
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) MenuList(com.owncloud.android.test.ui.models.MenuList) PassCodeView(com.owncloud.android.test.ui.models.PassCodeView) PassCodeRequestView(com.owncloud.android.test.ui.models.PassCodeRequestView) SettingsView(com.owncloud.android.test.ui.models.SettingsView) Category(org.junit.experimental.categories.Category) NoIgnoreTestCategory(com.owncloud.android.test.ui.groups.NoIgnoreTestCategory) Test(org.junit.Test)

Aggregations

NoIgnoreTestCategory (com.owncloud.android.test.ui.groups.NoIgnoreTestCategory)1 FileListView (com.owncloud.android.test.ui.models.FileListView)1 MenuList (com.owncloud.android.test.ui.models.MenuList)1 PassCodeRequestView (com.owncloud.android.test.ui.models.PassCodeRequestView)1 PassCodeView (com.owncloud.android.test.ui.models.PassCodeView)1 SettingsView (com.owncloud.android.test.ui.models.SettingsView)1 Test (org.junit.Test)1 Category (org.junit.experimental.categories.Category)1