use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject in project selenium-tests by Wikia.
the class ArticleTOCTests method ArticleTOCTests_006_verifyTOCisExpandedOnPreviewForLoggedInUser.
/**
* 1. as logged in user open an article with TOC 2. user edits the article 3. user is able to see
* expanded TOC on the preview
*/
@Test(groups = { "ArticleTOCTests", "ArticleTOCTests_006" })
@Execute(asUser = User.USER_12)
public void ArticleTOCTests_006_verifyTOCisExpandedOnPreviewForLoggedInUser() {
new ArticleContent().push(PageContent.ARTICLE_WITH_TOC_LINES);
VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
Assertion.assertTrue(visualEditMode.isContentLoaded(), "Content is not loaded");
PreviewEditModePageObject preview = visualEditMode.previewArticle();
preview.verifyTOCpresentOnPreview();
preview.verifyTOCexpandedOnPreview();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject in project selenium-tests by Wikia.
the class ArticleTOCTests method ArticleTOCTests_003_verifyTOCisCollapsedOnPreviewForAnon.
/**
* 1. as anon open an article with TOC 2. user edits the article 3. user is able to see collapsed
* TOC on the preview
*/
@Test(groups = { "ArticleTOCTests", "ArticleTOCTests_003" })
public void ArticleTOCTests_003_verifyTOCisCollapsedOnPreviewForAnon() {
new ArticleContent().push(PageContent.ARTICLE_WITH_TOC_LINES);
ArticlePageObject article = new ArticlePageObject().open();
article.verifyTOCpresent();
VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
Assertion.assertTrue(visualEditMode.isContentLoaded(), "Content is not loaded");
PreviewEditModePageObject preview = visualEditMode.previewArticle();
preview.verifyTOCpresentOnPreview();
preview.verifyTOCcollapsedOnPreview();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject in project selenium-tests by Wikia.
the class VetModalCaptionTests method VetModalCaption_001_modalCaption.
@Test(groups = { "VetModalCaption_001" })
@Execute(asUser = User.USER)
public void VetModalCaption_001_modalCaption() {
WikiBasePageObject base = new WikiBasePageObject();
articleTitleCaption = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditModePageObject visualEditMode = base.navigateToArticleEditPage(wikiURL, articleTitleCaption);
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
caption = PageContent.CAPTION + vetOptions.getTimeStamp();
vetOptions.setCaption(caption);
vetOptions.submit();
Assertion.assertEquals(visualEditMode.getVideoCaption(), caption);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
Assertion.assertTrue(sourceEditMode.getContent().contains(caption));
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
Assertion.assertEquals(previewMode.getVideoCaption(), caption);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
Assertion.assertEquals(article.getVideoCaption(), caption);
}
Aggregations