Search in sources :

Example 36 with RelatedIssue

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();
}
Also used : RenamePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.RenamePageObject) DeletePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject) FilePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage) SpecialNewFilesPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialNewFilesPage) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) UseUnstablePageLoadStrategy(com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 37 with RelatedIssue

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);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 38 with RelatedIssue

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();
}
Also used : VisualEditorInsertTemplateDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 39 with RelatedIssue

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();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 40 with RelatedIssue

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);
}
Also used : YoutubeVideo(com.wikia.webdriver.common.core.video.YoutubeVideo) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Aggregations

RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)56 Test (org.testng.annotations.Test)56 Execute (com.wikia.webdriver.common.core.annotations.Execute)30 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)14 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)12 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)12 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)11 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)11 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)11 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)7 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)7 IntraWikiSearchPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject)7 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)6 VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)6 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)5 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)5 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)5 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)5 SpecialVideosPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject)5 FilePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage)5