Search in sources :

Example 6 with Category

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());
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) AndroidElement(io.appium.java_client.android.AndroidElement) Category(org.junit.experimental.categories.Category) InProgressCategory(com.owncloud.android.test.ui.groups.InProgressCategory) SmokeTestCategory(com.owncloud.android.test.ui.groups.SmokeTestCategory) IgnoreTestCategory(com.owncloud.android.test.ui.groups.IgnoreTestCategory) NoIgnoreTestCategory(com.owncloud.android.test.ui.groups.NoIgnoreTestCategory) Test(org.junit.Test)

Example 7 with Category

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());
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) AndroidElement(io.appium.java_client.android.AndroidElement) Category(org.junit.experimental.categories.Category) InProgressCategory(com.owncloud.android.test.ui.groups.InProgressCategory) SmokeTestCategory(com.owncloud.android.test.ui.groups.SmokeTestCategory) IgnoreTestCategory(com.owncloud.android.test.ui.groups.IgnoreTestCategory) NoIgnoreTestCategory(com.owncloud.android.test.ui.groups.NoIgnoreTestCategory) Test(org.junit.Test)

Example 8 with Category

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());
}
Also used : FileListView(com.owncloud.android.test.ui.models.FileListView) 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 9 with Category

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());
}
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 10 with Category

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()));
}
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) Test(org.junit.Test)

Aggregations

Category (org.junit.experimental.categories.Category)479 Test (org.junit.Test)476 FlakyTest (org.apache.geode.test.junit.categories.FlakyTest)148 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)121 File (java.io.File)68 VM (org.apache.geode.test.dunit.VM)65 KV (org.apache.beam.sdk.values.KV)62 Instant (org.joda.time.Instant)60 ArrayList (java.util.ArrayList)52 Matchers.containsString (org.hamcrest.Matchers.containsString)49 StringUtils.byteArrayToJsonString (org.apache.beam.sdk.util.StringUtils.byteArrayToJsonString)41 Region (org.apache.geode.cache.Region)35 CommandResult (org.apache.geode.management.internal.cli.result.CommandResult)34 Host (org.apache.geode.test.dunit.Host)34 Properties (java.util.Properties)32 SerializableRunnable (org.apache.geode.test.dunit.SerializableRunnable)31 Cache (org.apache.geode.cache.Cache)26 AsyncInvocation (org.apache.geode.test.dunit.AsyncInvocation)25 IOException (java.io.IOException)24 CacheException (org.apache.geode.cache.CacheException)24