Search in sources :

Example 11 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject 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);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) PreviewEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 12 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class BlogFeaturesTests method BlogFeatures_004_AddingVideo.

@Test(groups = { "BlogFeatures_004", "BlogFeaturesTests", "Media" })
@Execute(asUser = User.USER, onWikia = "mobileregressiontesting")
public void BlogFeatures_004_AddingVideo() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
    String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
    VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
    VetAddVideoComponentObject vetAddVideo = blogEdit.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.setCaption(PageContent.CAPTION);
    vetOptions.submit();
    blogEdit.verifyVideo();
    BlogPageObject blogPage = blogEdit.submitBlog();
    blogPage.verifyVideo();
}
Also used : VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 13 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class ArticleSourceModeTests method RTE_016_Video.

@Test(groups = { "RTE_extended_3", "RTE_extended_016", "Media" })
public void RTE_016_Video() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    VetAddVideoComponentObject vetAddingVideo = source.clickAddVideo();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.setCaption(PageContent.CAPTION);
    vetOptions.submit();
    source.checkSourceVideoContent("[[" + VideoContent.YOUTUBE_VIDEO_WIKITEXT + PageContent.CAPTION + "]]");
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Test(org.testng.annotations.Test)

Example 14 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject 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);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) PreviewEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 15 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class VetModalCaptionTests method VetModalCaption_002_captionInModal.

@Test(groups = { "VetModalCaption_002" })
@Execute(asUser = User.USER)
public void VetModalCaption_002_captionInModal() {
    String captionText = String.format("Caption-%d", DateTime.now().getMillis());
    new ArticleContent().push(String.format("[[File:WikiEvolution - PoznaƄska Wiki|thumb|right|335 px|%s]]", captionText));
    VetOptionsComponentObject vetOptions = (VetOptionsComponentObject) new VisualEditModePageObject().open().modifyComponent(Components.VIDEO);
    vetOptions.verifyCaption(captionText);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)24 Test (org.testng.annotations.Test)23 Execute (com.wikia.webdriver.common.core.annotations.Execute)22 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)18 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)17 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)15 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)15 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)6 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)3 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)2 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)1 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)1