use of com.wikia.webdriver.common.core.annotations.RelatedIssue 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.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class VECopyAndPasteTests method VECopyAndPasteTests_001_copyAndPaste.
@Test(groups = { "VECopyAndPasteTests", "VECopyAndPasteTests_001" })
@RelatedIssue(issueID = "QAART-888")
public void VECopyAndPasteTests_001_copyAndPaste() throws InterruptedException {
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
String text = PageContent.ARTICLE_TEXT;
ve.typeTextArea(text);
ve.copyAndPaste();
ve.verifyFormatting(Formatting.PARAGRAPH, text + text);
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyFormattingFromVE(Formatting.PARAGRAPH, text + text);
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class VETemplateTests method VETemplateTests_002_SuggestedTemplate.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_002", "VETemplateSuggestion" })
public void VETemplateTests_002_SuggestedTemplate() {
articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorInsertTemplateDialog templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
templateDialog.verifyNoResultTemplate();
templateDialog.verifyIsSuggestedTemplate();
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class VETemplateTests method VETemplateTests_005_DeleteTemplates.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_005", "VEDeleteTemplate" }, dependsOnGroups = "VETemplateTests_004")
public void VETemplateTests_005_DeleteTemplates() {
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
int numBlockTransclusion = ve.getNumberOfBlockTransclusion();
int numInlineTransclusion = ve.getNumberOfInlineTransclusion();
ve.deleteTransclusion(1, Transclusion.INLINE);
ve.verifyNumberOfBlockTransclusion(numBlockTransclusion);
ve.verifyNumberOfInlineTransclusion(--numInlineTransclusion);
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class VideosPageTests method VideosPageTest_002_deleteVideo_notificationContainsTitle.
/**
* Checks if a video can successfully be deleted from the Special:Videos page. Specifically, this
* test checks if, after the video has been deleted, its title shows up in the delete confirmation
* presented by Global Notifications. (Note: This test also adds a video beforehand to make sure
* running this test is sustainable).
*/
@Execute(asUser = User.STAFF)
@Test(groups = { "VideosPage", "VideosPageTest_002", "Media" })
@RelatedIssue(issueID = "SUS-755")
public void VideosPageTest_002_deleteVideo_notificationContainsTitle() {
SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery(VIDEO_QUERY);
specialVideos.addVideoViaAjax(video.getUrl());
Assertion.assertTrue(specialVideos.isNewVideoAdded());
String addedVideoTitle = specialVideos.getNewestVideoTitle();
String addedVideoTitlePattern = addedVideoTitle;
if (addedVideoTitle.endsWith(SUFFIX_FOR_LONG_TITLE)) {
addedVideoTitlePattern = addedVideoTitle.replace(SUFFIX_FOR_LONG_TITLE, "");
}
specialVideos.deleteNewestVideo();
List<Notification> confirmNotifications = specialVideos.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, SpecialVideosPageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Notification notification = confirmNotifications.stream().findFirst().get();
Assertion.assertTrue(notification.isVisible(), SpecialVideosPageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
Assertion.assertStringContains(notification.getMessage(), addedVideoTitlePattern);
}
Aggregations