use of com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy in project selenium-tests by Wikia.
the class ImageStorageTests method ImageStorage_002_moveImage.
@Test(groups = { "ImageStorageTests", "ImageStorage_002" })
@UseUnstablePageLoadStrategy
@Execute(asUser = User.STAFF)
@RelatedIssue(issueID = "QAART-921")
public void ImageStorage_002_moveImage() {
String fileName = DateTime.now().getMillis() + PageContent.FILE;
new SpecialNewFilesPage().openSpecialNewFiles(wikiURL).addPhoto().selectFileToUpload(PageContent.FILE).hideWarnings().clickOnMoreOptions().setFileName(fileName).checkIgnoreAnyWarnings().clickUploadButton().verifyFileUploaded(fileName);
FilePage file = new FilePage().open(fileName, true);
RenamePageObject renamePage = file.renameUsingDropdown();
String imageNewName = DateTime.now().getMillis() + PageContent.FILERENAME;
renamePage.rename(imageNewName, true);
List<Notification> confirmNotifications = file.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, RenamePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), RenamePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
file.verifyHeader(imageNewName);
file = new FilePage().open(imageNewName, true);
renamePage = file.renameUsingDropdown();
renamePage.rename(fileName, true);
confirmNotifications = file.getNotifications(NotificationType.CONFIRM);
Assertion.assertTrue(confirmNotifications.size() == 1, RenamePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), RenamePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
file.verifyHeader(fileName);
DeletePageObject delete = file.deletePage();
delete.submitDeletion();
}
use of com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy in project selenium-tests by Wikia.
the class TestAdsTrackingPixels method adsTrackingPixelSent.
@UseUnstablePageLoadStrategy
@NetworkTrafficDump(useMITM = true)
@Execute(mockAds = "true")
@Test(groups = "AdsTrackingPixels", dataProviderClass = AdsDataProvider.class, dataProvider = "adsTrackingPixelsSent")
public void adsTrackingPixelSent(String wiki, String urlParam, String[] pixelUrls) {
networkTrafficInterceptor.startIntercepting();
String testedPage = urlBuilder.getUrlForPath(wiki, urlParam);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage);
assertTrackingPixelsSent(adsBaseObject, pixelUrls);
}
use of com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy in project selenium-tests by Wikia.
the class ArticleActionsAdminTests method deleteUndeleteArticle.
@Test(groups = { "ArticleActionsAdmin_001" })
@UseUnstablePageLoadStrategy
@RelatedIssue(issueID = "MAIN-9808", comment = "problems with banner notifications")
@Execute(asUser = User.STAFF)
public void deleteUndeleteArticle() {
String articleTitle = "DeleteUndeleArticle";
new ArticleContent().push(PageContent.ARTICLE_TEXT, articleTitle);
ArticlePageObject article = new ArticlePageObject().open(articleTitle);
DeletePageObject deletePage = article.deleteUsingDropdown();
deletePage.submitDeletion();
List<Notification> confirmNotifications = article.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, SpecialRestorePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
SpecialRestorePageObject restore = article.getNotifications(NotificationType.CONFIRM).stream().findFirst().get().undelete();
restore.verifyRestoredArticleName(articleTitle);
restore.giveReason(article.getTimeStamp());
restore.restorePage();
confirmNotifications = article.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, SpecialRestorePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible());
article.verifyArticleTitle(articleTitle);
}
Aggregations