Search in sources :

Example 1 with SourceEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject 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);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) 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 2 with SourceEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject 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);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) 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 3 with SourceEditModePageObject

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

the class VEAndRTEDisabledEditorEntryAnonTests method VEAndRTEDisabledEditorEntryAnonTests_009_actionEdit.

@Test(groups = { "VEAndRTEDisabledEditorEntryAnonTests", "VEAndRTEDisabledEditorEntryAnonTests_009", "actionURLEntry" })
public void VEAndRTEDisabledEditorEntryAnonTests_009_actionEdit() {
    SourceEditModePageObject src = base.navigateToArticleEditPageSrc(wikiURL, base.getNameForArticle());
    src.verifySourceOnlyMode();
}
Also used : SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) Test(org.testng.annotations.Test)

Example 4 with SourceEditModePageObject

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

the class VEAndRTEDisabledEditorEntryAnonTests method VEAndRTEDisabledEditorEntryAnonTests_008_TemplateNamespace.

@Test(groups = { "VEAndRTEDisabledEditorEntryAnonTests", "VEAndRTEDisabledEditorEntryAnonTests_008", "templateEntry" })
public void VEAndRTEDisabledEditorEntryAnonTests_008_TemplateNamespace() {
    ArticlePageObject article = new ArticlePageObject().open(URLsContent.TEMPLATE_PAGE);
    SourceEditModePageObject src = article.openSrcModeWithMainEditButton();
    src.verifySourceOnlyMode();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) Test(org.testng.annotations.Test)

Example 5 with SourceEditModePageObject

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

the class ArticlePageObject method verifyCreateAPageEditor.

public void verifyCreateAPageEditor(Editor expectedEditor, String articleName) {
    switch(expectedEditor) {
        case VE:
            VisualEditorPageObject ve = createArticleInVEUsingDropdown(articleName);
            ve.verifyVEToolBarPresent();
            ve.verifyEditorSurfacePresent();
            break;
        case CK:
            VisualEditModePageObject ck = createArticleInCKUsingDropdown(articleName);
            Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
            ck.clickPublishButton();
            break;
        case SRC:
            SourceEditModePageObject src = createArticleInSrcUsingDropdown(articleName);
            src.verifySourceOnlyMode();
            src.clickPublishButton();
            break;
    }
}
Also used : SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)

Aggregations

SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)45 Test (org.testng.annotations.Test)37 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)35 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)24 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)11 Execute (com.wikia.webdriver.common.core.annotations.Execute)8 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)7 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)6 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)6 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)6 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)3 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)3 CreationTicket (com.wikia.webdriver.common.core.annotations.CreationTicket)2 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)2 CreateArticleModalComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.CreateArticleModalComponentObject)2 VECreateArticleModalComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.VECreateArticleModalComponentObject)2 WebElement (org.openqa.selenium.WebElement)2 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)1 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)1