use of org.junit.experimental.categories.Category in project android by owncloud.
the class ShareLinkFileTestSuite method testShareLinkFileByCopyLink.
@Test
@Category({ NoIgnoreTestCategory.class, SmokeTestCategory.class })
public void testShareLinkFileByCopyLink() throws Exception {
AndroidElement sharedElementIndicator;
FileListView fileListView = Actions.login(Config.URL, Config.user, Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileHasBeenCreated = fileListViewAfterUploadFile.getFileElement().isDisplayed());
sharedElementIndicator = Actions.shareLinkElementByCopyLink(FILE_NAME, fileListViewAfterUploadFile, driver, common);
assertTrue(sharedElementIndicator.isDisplayed());
}
use of org.junit.experimental.categories.Category in project android by owncloud.
the class ShareLinkFileTestSuite method testShareLinkFileByGmail.
@Test
@Category({ NoIgnoreTestCategory.class })
public void testShareLinkFileByGmail() throws Exception {
AndroidElement sharedElementIndicator;
FileListView fileListView = Actions.login(Config.URL, Config.user, Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileHasBeenCreated = fileListViewAfterUploadFile.getFileElement().isDisplayed());
sharedElementIndicator = Actions.shareLinkElementByGmail(FILE_NAME, fileListViewAfterUploadFile, driver, common);
assertTrue(sharedElementIndicator.isDisplayed());
}
use of org.junit.experimental.categories.Category in project android by owncloud.
the class DeleteFileTestSuite method testDeleteFile.
@Test
@Category({ NoIgnoreTestCategory.class, SmokeTestCategory.class })
public void testDeleteFile() throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user, Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
Common.waitTillElementIsNotPresentWithoutTimeout(fileListViewAfterUploadFile.getProgressCircular(), 1000);
common.wait.until(ExpectedConditions.visibilityOf(fileListViewAfterUploadFile.getFileElementLayout().findElement(By.id(FileListView.getLocalFileIndicator()))));
Actions.deleteElement(FILE_NAME, fileListViewAfterUploadFile, driver);
assertFalse(fileListViewAfterUploadFile.getFileElement().isDisplayed());
}
use of org.junit.experimental.categories.Category in project android by owncloud.
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());
}
use of org.junit.experimental.categories.Category in project android by owncloud.
the class LoginTestSuite method test5ChangePasswordWrong.
@Test
@Category({ NoIgnoreTestCategory.class })
public void test5ChangePasswordWrong() 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();
settingsView.tapOnAccountElement(1, 1, 1000);
LoginForm changePasswordForm = settingsView.clickOnChangePasswordElement();
changePasswordForm.typePassword("WrongPassword");
changePasswordForm.clickOnConnectButton();
assertTrue(common.waitForTextPresent("Wrong username or password", changePasswordForm.getAuthStatusText()));
}
Aggregations