use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject 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);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject in project selenium-tests by Wikia.
the class VetModalAlignmentTests method Vet_Modal_003_centerOnPage.
@Test(groups = { "VetModalAlignment_003" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_003_centerOnPage() {
new ArticleContent().push();
VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.adjustPosition(PositionsVideo.CENTER);
vetOptions.submit();
visualEditMode.verifyVideoPosition(PositionsVideo.CENTER);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
sourceEditMode.verifyVideoAlignment(PositionsVideo.CENTER);
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
previewMode.verifyVideoAlignment(PositionsVideo.CENTER);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
article.verifyVideoAlignment(PositionsVideo.CENTER);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject in project selenium-tests by Wikia.
the class VetModalAlignmentTests method Vet_Modal_005_rightOnPage.
@Test(groups = { "VetModalAlignment_005" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_005_rightOnPage() {
new ArticleContent().push();
VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.adjustPosition(PositionsVideo.RIGHT);
vetOptions.submit();
visualEditMode.verifyVideoPosition(PositionsVideo.RIGHT);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
sourceEditMode.verifyVideoAlignment(PositionsVideo.RIGHT);
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
previewMode.verifyVideoAlignment(PositionsVideo.RIGHT);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
article.verifyVideoAlignment(PositionsVideo.RIGHT);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject in project selenium-tests by Wikia.
the class VetModalWidthTests method Vet_Modal_001_modalWidth.
@Test(groups = { "VetModalwidth_001" })
@Execute(asUser = User.USER)
public void Vet_Modal_001_modalWidth() {
WikiBasePageObject base = new WikiBasePageObject();
articleTitle = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditModePageObject visualEditMode = base.navigateToArticleEditPage(wikiURL, articleTitle);
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.adjustWith(MODAL_WIDTH);
vetOptions.submit();
Assertion.assertEquals(visualEditMode.getVideoWidth(), MODAL_WIDTH);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
Assertion.assertEquals(sourceEditMode.getVideoWidth(), MODAL_WIDTH);
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
Assertion.assertEquals(previewMode.getVideoWidth(), MODAL_WIDTH);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
Assertion.assertEquals(article.getVideoThumbnailWidth(), MODAL_WIDTH);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_020_YoutubeTag_Preview.
@CreationTicket(ticketID = "CONCF-626")
@Test(groups = { "RTE_extended_4", "RTE_extended_020" })
public void RTE_020_YoutubeTag_Preview() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("water");
String videoID = video.getID();
source.addContentInSourceMode("<youtube>\n" + videoID + "\n</youtube>");
PreviewEditModePageObject preview = source.previewArticle();
preview.verifyVideoOnPreview(videoID);
}
Aggregations