use of com.wikia.webdriver.common.core.api.ArticleContent 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.common.core.api.ArticleContent 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.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class VetArticlePlaceholderTests method userCanAddVideoFromWikiaUsingPlaceholderInEditMode.
@Test(groups = { "VideoArticlePlacehoder_004" })
@Execute(asUser = User.STAFF, onWikia = "mobileregressiontesting")
public void userCanAddVideoFromWikiaUsingPlaceholderInEditMode() {
new ArticleContent().push(SourceModeContent.PLACEHOLDERS);
// Added cause of MAIN-6374 issue
new ArticlePageObject().open();
VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
VetAddVideoComponentObject vetAddingVideo = (VetAddVideoComponentObject) visualEditMode.modifyComponent(Components.VIDEO_PLACEHOLDER);
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
vetOptions.setCaption(PageContent.CAPTION);
vetOptions.submit();
visualEditMode.verifyVideo();
ArticlePageObject article = visualEditMode.submitArticle();
article.verifyVideo();
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class NavigationTests method MercuryCuratedNavigationTest_003_redirectToExistingArticle.
@Test(groups = "MercuryCuratedNavigationTest_003")
public void MercuryCuratedNavigationTest_003_redirectToExistingArticle() {
init();
String redirect = WikiTextContent.REDIRECT + WikiTextContent.INTERNAL_LINK_OPENING + MercurySubpages.CC_REDIRECT_DESTINATION + WikiTextContent.INTERNAL_LINK_CLOSING;
new ArticleContent().push(redirect, MercurySubpages.CC_REDIRECT_SOURCE_1);
navigate.toPage(MercurySubpages.CC_REDIRECT_SOURCE_1);
Assertion.assertTrue(MercurySubpages.CC_REDIRECT_DESTINATION.toLowerCase().contains(article.getArticleTitle().toLowerCase()));
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class AllTagsTests method beforeMethod.
@BeforeMethod(alwaysRun = true)
public void beforeMethod() {
widgets = new ArrayList<>();
widgets.add(new PollsnackWidgetPageObject(driver));
widgets.add(new SoundCloudWidgetPageObject(driver));
widgets.add(new SpotifyWidgetPageObject(driver));
widgets.add(new TwitterWidgetPageObject(driver));
widgets.add(new VKWidgetPageObject(driver));
widgets.add(new WeiboWidgetPageObject(driver));
widgets.add(new GoogleFormWidgetPageObject(driver));
widgets.add(new PolldaddyWidgetPageObject(driver));
widgets.add(new PlaybuzzWidgetPageObject(driver));
widgets.add(new ApesterWidgetPageObject(driver));
String content = ">>> " + DateTime.now().getMillis() + " <<<";
for (WidgetPageObject widget : widgets) {
content += widget.getSingleTag();
}
ArticleContent articleContent = new ArticleContent();
articleContent.clear(ARTICLE_NAME);
articleContent.push(content, ARTICLE_NAME);
}
Aggregations