Search in sources :

Example 41 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class VetModalCaptionTests method VetModalCaption_005_videoNameNotEditable.

@Test(groups = { "VetModalCaption_005" })
@Execute(asUser = User.USER)
public void VetModalCaption_005_videoNameNotEditable() {
    WikiBasePageObject base = new WikiBasePageObject();
    articleTitleNotEditable = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditModePageObject visualEditMode = base.navigateToArticleEditPage(wikiURL, articleTitleNotEditable);
    VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 1);
    vetOptions.verifyNameNotEditable();
}
Also used : VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 42 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject 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 43 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class UserAndRights method unblockedUserCanEditUser.

@Test(groups = { "usersAndRights005" }, dependsOnMethods = { "staffCanUnblockUser" })
public void unblockedUserCanEditUser() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userNameBlocked, credentials.passwordBlocked, wikiURL);
    String title = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditModePageObject edit = base.navigateToArticleEditPage(wikiURL, PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp());
    edit.clearContent();
    edit.addContent(String.valueOf(DateTime.now().getMillis()));
    edit.submitArticle().verifyArticleTitle(title);
}
Also used : VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 44 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class WikiActivityTests method WikiActivityTests_001_newEditionIsRecordedOnActivityModule.

/**
   * https://wikia-inc.atlassian.net/browse/DAR-1617
   */
@Test(groups = "WikiActivity_001")
@Execute(asUser = User.USER)
public void WikiActivityTests_001_newEditionIsRecordedOnActivityModule() {
    String articleContent = PageContent.ARTICLE_TEXT + DateTime.now().getMillis();
    ArticlePageObject article = new ArticlePageObject().open("NewEditionIsRecordedOnActivityModule");
    String articleName = article.getArticleName();
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    visualEditMode.addContent(articleContent);
    visualEditMode.submitArticle();
    article.verifyContent(articleContent);
    new SpecialWikiActivityPageObject(driver).open().verifyRecentEdition(articleName, credentials.userName);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SpecialWikiActivityPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWikiActivityPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 45 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.

the class BlogFeaturesTests method addingImage.

@Test(groups = { "BlogFeatures_005", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void addingImage() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
    String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
    VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
    PhotoAddComponentObject photoAddPhoto = blogEdit.clickPhotoButton();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    blogEdit.verifyPhoto();
    BlogPageObject blogPage = blogEdit.submitBlog();
    blogPage.verifyPhoto();
}
Also used : 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) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)89 Test (org.testng.annotations.Test)81 Execute (com.wikia.webdriver.common.core.annotations.Execute)58 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)41 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)38 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)21 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)17 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)12 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)12 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)11 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)9 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)9 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)7 DetachedRegisterPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage)6 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)5 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)5 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)4 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)4 SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)3 SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)3