Search in sources :

Example 51 with FileListView

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

the class MoveFileTestSuite method tearDown.

@After
public void tearDown() throws Exception {
    common.takeScreenShotOnFailed(name.getMethodName());
    FileListView fileListView = new FileListView(driver);
    driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_BACK);
    Actions.deleteElement(FOLDER_WHERE_MOVE, fileListView, driver);
    Actions.deleteElement(FILE_NAME, fileListView, driver);
    driver.removeApp("com.owncloud.android");
    driver.quit();
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) After(org.junit.After)

Example 52 with FileListView

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

the class Actions method uploadFile.

public static FileListView uploadFile(String elementName, FileListView fileListView) throws InterruptedException {
    fileListView.clickOnUploadButton();
    UploadFilesView uploadFilesView = fileListView.clickOnFilesElementUploadFile();
    uploadFilesView.clickOnFileName(elementName);
    FileListView fileListViewAfterUploadFile = uploadFilesView.clickOnUploadButton();
    // TO DO. detect when the file is successfully uploaded
    Thread.sleep(15000);
    return fileListViewAfterUploadFile;
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) UploadFilesView(com.owncloud.android.test.ui.models.UploadFilesView)

Example 53 with FileListView

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

the class DeleteFolderTestSuite method tearDown.

@After
public void tearDown() throws Exception {
    common.takeScreenShotOnFailed(name.getMethodName());
    if (folderHasBeenCreated) {
        FileListView fileListView = new FileListView(driver);
        Actions.deleteElement(FOLDER_NAME, fileListView, driver);
    }
    driver.removeApp("com.owncloud.android");
    driver.quit();
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) After(org.junit.After)

Example 54 with FileListView

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

the class DeleteFolderTestSuite method testDeleteFolder.

@Test
@Category({ NoIgnoreTestCategory.class, SmokeTestCategory.class })
public void testDeleteFolder() throws Exception {
    FileListView fileListView = Actions.login(Config.URL, Config.user, Config.password, Config.isTrusted, driver);
    common.assertIsInFileListView();
    // TODO. if the folder already exists, do no created
    // create the folder
    WaitAMomentPopUp waitAMomentPopUp = Actions.createFolder(FOLDER_NAME, fileListView);
    Common.waitTillElementIsNotPresentWithoutTimeout(waitAMomentPopUp.getWaitAMomentTextElement(), 100);
    fileListView.scrollTillFindElement(FOLDER_NAME);
    assertTrue(folderHasBeenCreated = fileListView.getFileElement().isDisplayed());
    // delete the folder
    Actions.deleteElement(FOLDER_NAME, fileListView, driver);
    assertFalse(folderHasBeenCreated = fileListView.getFileElement().isDisplayed());
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) WaitAMomentPopUp(com.owncloud.android.test.ui.models.WaitAMomentPopUp) 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)

Example 55 with FileListView

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

the class MoveFileTestSuite method tearDown.

@After
public void tearDown() throws Exception {
    common.takeScreenShotOnFailed(name.getMethodName());
    FileListView fileListView = new FileListView(driver);
    driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_BACK);
    Actions.deleteElement(FOLDER_WHERE_MOVE, fileListView, driver);
    Actions.deleteElement(FILE_NAME, fileListView, driver);
    driver.removeApp("com.owncloud.android");
    driver.quit();
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) After(org.junit.After)

Aggregations

FileListView (com.owncloud.android.test.ui.models.FileListView)64 Test (org.junit.Test)46 Category (org.junit.experimental.categories.Category)46 NoIgnoreTestCategory (com.owncloud.android.test.ui.groups.NoIgnoreTestCategory)34 SmokeTestCategory (com.owncloud.android.test.ui.groups.SmokeTestCategory)32 InProgressCategory (com.owncloud.android.test.ui.groups.InProgressCategory)16 After (org.junit.After)16 UnfinishedTestCategory (com.owncloud.android.test.ui.groups.UnfinishedTestCategory)12 ElementMenuOptions (com.owncloud.android.test.ui.models.ElementMenuOptions)12 MenuList (com.owncloud.android.test.ui.models.MenuList)12 SettingsView (com.owncloud.android.test.ui.models.SettingsView)12 WaitAMomentPopUp (com.owncloud.android.test.ui.models.WaitAMomentPopUp)12 FailingTestCategory (com.owncloud.android.test.ui.groups.FailingTestCategory)10 IgnoreTestCategory (com.owncloud.android.test.ui.groups.IgnoreTestCategory)6 LoginForm (com.owncloud.android.test.ui.models.LoginForm)6 AndroidElement (io.appium.java_client.android.AndroidElement)6 FileDetailsView (com.owncloud.android.test.ui.models.FileDetailsView)4 MoveView (com.owncloud.android.test.ui.models.MoveView)4 NewFolderPopUp (com.owncloud.android.test.ui.models.NewFolderPopUp)4 NoSuchElementException (org.openqa.selenium.NoSuchElementException)4