use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class FollowArticleTests method unfollowArticleIfFollowed.
@Test
@Execute(asUser = User.USER)
public void unfollowArticleIfFollowed() {
new ArticleContent().push(PageContent.ARTICLE_TEXT, ARTICLE_NAME);
ArticlePageObject article = new ArticlePageObject().open(ARTICLE_NAME);
WatchPageObject watch = article.unfollowArticle();
watch.confirmWatchUnwatch();
article.verifyPageUnfollowed();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class VetArticleCommentsTests method RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl.
@Test(groups = { "VetArticleComments_001" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "SUS-758", comment = "This issue is related to API call and should not cause permanent " + "test failure. Otherwise the failure must be caused by other issue")
public void RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl() {
new ArticleContent().clear();
ArticlePageObject article = new ArticlePageObject().open();
MiniEditorComponentObject editor = article.triggerCommentArea();
VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo();
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("microsoft");
String expectedCaption = PageContent.CAPTION + article.getTimeStamp();
vetAddingVideo.addVideoByUrl(video.getUrl()).setCaption(expectedCaption).submit();
Assertion.assertTrue(article.getArticleComment().isVideoVisible());
article.submitComment();
Assertion.assertEquals(article.getArticleComment().getLatestCommentCaption(), expectedCaption, "Latest comment caption doesn't equal to expected caption");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class BlockedUserMapTests method BlockedUserMapTests_006_VerifyUserCannotAddPinOnEmbeddedMap.
@Test(groups = { "BlockedUserMapTests_006", "BlockedUserMapTests", "InteractiveMaps" })
public void BlockedUserMapTests_006_VerifyUserCannotAddPinOnEmbeddedMap() {
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(credentials.userNameBlockedAccount, credentials.passwordBlockedAccount, wikiURL);
ArticlePageObject article = new ArticlePageObject();
article.open(InteractiveMapsContent.EMBED_MAP_ARTICLE_NAME);
EmbedMapComponentObject embedMapDialog = article.clickViewEmbedMap();
AddPinComponentObject addPinModal = embedMapDialog.placePinInMap();
addPinModal.typePinName(InteractiveMapsContent.PIN_NAME);
addPinModal.typePinDescription(InteractiveMapsContent.PIN_DESCRIPTION);
addPinModal.selectPinType();
addPinModal.clickSaveButton();
addPinModal.verifyErrorExists();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class LightboxTests method LightboxTest_005_verifyExistenceAndURLsOfSocialButtons.
@Test(groups = "LightboxTest_005")
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_005_verifyExistenceAndURLsOfSocialButtons() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
ArticlePageObject article = new ArticlePageObject().open();
VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
visualEditMode.clearContent();
PhotoAddComponentObject photoAddPhoto = visualEditMode.clickPhotoButton();
PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
photoOptions.setCaption(PageContent.CAPTION);
photoOptions.clickAddPhoto();
visualEditMode.verifyPhoto();
visualEditMode.submitArticle();
article.verifyPhoto();
LightboxComponentObject lightbox = article.clickThumbnailImage();
lightbox.clickPinButton();
// Assure header buttons are visible if not hovered over
lightbox.makeHeaderVisible();
lightbox.clickShareButton();
lightbox.verifyShareButtons();
lightbox.clickFacebookShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.FACEBOOK_DOMAIN);
lightbox.clickTwitterShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.TWITTER_DOMAIN);
lightbox.clickStumbleUponShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.STUMPLEUPON_DOMAIN);
lightbox.clickRedditShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.REDDIT_DOMAIN);
lightbox.clickPlusOneShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.GOOGLE_DOMAIN);
lightbox.clickCloseShareScreenButton();
lightbox.verifyShareScreenClosed();
lightbox.clickCloseButton();
lightbox.verifyLightboxClosed();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class VetModalAlignmentTests method Vet_Modal_001_leftOnPage.
/**
* 1. Verify left alignment in visual mode, source mode, preview, and published page, 2. Verify
* left alignment in vet modal when page edited, 3. Verify right alignment in visual mode, source
* mode, preview, and published page, 4. Verify right alignment in vet modal when page edited, 5.
* Verify center alignment in visual mode, source mode, preview, and published page, 6. Verify
* center alignment in vet modal when page edited,
*/
@Test(groups = { "VetModalAlignment_001" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_001_leftOnPage() {
new ArticleContent().push("");
VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.adjustPosition(PositionsVideo.LEFT);
vetOptions.submit();
visualEditMode.verifyVideoPosition(PositionsVideo.LEFT);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
sourceEditMode.verifyVideoAlignment(PositionsVideo.LEFT);
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
previewMode.verifyVideoAlignment(PositionsVideo.LEFT);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
article.verifyVideoAlignment(PositionsVideo.LEFT);
}
Aggregations