use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class EditingPreferencesTests method EditPreferences_001_selectVE.
@Test(groups = { "EditPreferences_001" })
@Execute(asUser = User.USER_5, onWikia = URLsContent.VE_ENABLED_WIKI)
@RelatedIssue(issueID = "MAIN-9722", comment = "test failing randomly")
public void EditPreferences_001_selectVE() {
EditPreferencesPage editPrefPage = new EditPreferencesPage(driver).openEditingSection();
editPrefPage.selectPreferredEditor(VE);
PreferencesPageObject prefPage = editPrefPage.clickSaveButton();
List<Notification> confirmNotifications = prefPage.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, PreferencesPageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), PreferencesPageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
String articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
ArticlePageObject aritclePage = new ArticlePageObject().open(articleName);
VisualEditorPageObject ve = aritclePage.openVEModeWithMainEditButton();
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class FilePageTests method filePage005_deleteFromHistory.
/**
* Verify that a video can be deleted from the File page
*/
@Test(groups = { "FilePage", "filePage005_deleteFromHistory", "Media" })
@RelatedIssue(issueID = "SUS-317", comment = "Product code defect. Test manually that the video can be deleted")
public void filePage005_deleteFromHistory() {
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("pokemon");
// Go to Special:Videos to add a video
SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
specialVideos.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
specialVideos.openSpecialVideoPage(wikiURL);
// Add a Youtube video we'll delete
VetAddVideoComponentObject vetAddingVideo = specialVideos.clickAddAVideo();
vetAddingVideo.addVideoByUrl(video.getUrl());
// Verify the video is actually there
specialVideos.verifyVideoAdded(video.getTitle());
// Go to the history tab and add a second video to test deleting a version
FilePage filePage = new FilePage().open(video.getFileName());
filePage.selectHistoryTab();
filePage.replaceVideo(VideoContent.YOUTUBE_VIDEO_URL5);
// Load the file page again, should have the same name
filePage.open(video.getFileName()).verifyEmbeddedVideoIsPresent();
//Removed following lines until SUS-317 is fixed
//// Go to the history tab and verify there are at least two videos
//filePage.selectHistoryTab();
//filePage.verifyVersionCountAtLeast(2);
//// Delete the second version
//DeletePageObject deletePage = filePage.deleteVersion(2);
//deletePage.submitDeletion();
//Removed above lines until SUS-317is fixed
// Load the file page again, should have the same name
filePage.open(video.getFileName()).verifyEmbeddedVideoIsPresent();
// Delete the first version and thus the whole page
DeletePageObject deletePage = filePage.deleteVersion(1);
deletePage.submitDeletion();
// Go back to the file page and make sure its gone
filePage.open(video.getFileName()).verifyEmptyFilePage();
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class VideosPageTests method VideosPageTest_003_deleteVideo_removedFromRecentVideos.
/**
* Checks if a video can successfully be deleted from the Special:Videos page. Specifically, this
* test checks if, after the video has been deleted, it is no longer present in the list of most
* recent videos on Special:Videos. (Note: in order to accomplish this the test also adds a video
* before hand to ensure that 1.) the test is sustainable, and 2.) it knows what the most recent
* video is).
*/
@Execute(asUser = User.STAFF)
@Test(groups = { "VideosPage", "VideosPageTest_003", "Media" })
@RelatedIssue(issueID = "SUS-863")
public void VideosPageTest_003_deleteVideo_removedFromRecentVideos() {
SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery(VIDEO_QUERY);
specialVideos.addVideoViaAjax(video.getUrl());
Assertion.assertTrue(specialVideos.isNewVideoAdded());
String addedVideoTitle = specialVideos.getNewestVideoTitle();
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(), addedVideoTitle);
Assertion.assertNotEquals(specialVideos.getNewestVideoTitle(), addedVideoTitle, "Video is still visible as newest video");
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class TestAdsFandomUap method adsFandomArticleUapMobile.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "fandomArticleUapPage", groups = { "AdsFandomUapMobile" })
@RelatedIssue(issueID = "ADEN-4339")
public void adsFandomArticleUapMobile(String pageType, String pageName, long atfId, long btfId) {
AdsFandomObject fandomPage = loadPage(pageName, pageType);
fandomPage.triggerOnScrollSlots();
verifyUapAtf(atfId, AdsFandomContent.TOP_BOXAD_MOBILE, fandomPage);
fandomPage.triggerOnScrollSlots();
verifyUapBtf(btfId, AdsFandomContent.INCONTENT_BOXAD_MOBILE, AdsFandomContent.BOTTOM_LEADERBOARD_MOBILE, fandomPage);
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class TestAdsBtfBlocking method adsAtfDelayBtfMercury.
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5, browser = Browser.CHROME)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "delayBtf", groups = "AdsBtfBlockingMercury")
@RelatedIssue(issueID = "ADEN-4344")
public void adsAtfDelayBtfMercury(String wikiName, String article, boolean isWgVarOn) throws InterruptedException {
PageObjectLogging.log("$wgAdDriverDelayBelowTheFold", String.valueOf(isWgVarOn), true);
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, MOBILE_SIZE);
adsBaseObject.waitForPageLoadedWithGpt();
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_AD_IN_CONTENT), AdsContent.MOBILE_AD_IN_CONTENT);
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_PREFOOTER), AdsContent.MOBILE_PREFOOTER);
}
Aggregations