Search in sources :

Example 36 with ArticlePageObject

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

the class VETemplateTests method VETemplateTests_003_AddTemplates.

@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_003", "VEAddTemplate" })
public void VETemplateTests_003_AddTemplates() {
    articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    int numBlockTransclusion = ve.getNumberOfBlockTransclusion();
    int numInlineTransclusion = ve.getNumberOfInlineTransclusion();
    VisualEditorInsertTemplateDialog templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
    VisualEditorEditTemplateDialog editTemplateDialog = templateDialog.selectSuggestedTemplate(0);
    ve = editTemplateDialog.clickDone();
    ve.verifyNumberOfBlockTransclusion(numBlockTransclusion);
    ve.verifyNumberOfInlineTransclusion(++numInlineTransclusion);
    templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
    editTemplateDialog = templateDialog.selectResultTemplate(VEContent.TEMPLATE_SEARCH_3CHARS_PARTIALMATCH, 1);
    ve = editTemplateDialog.closeDialog();
    ve.verifyNumberOfBlockTransclusion(++numBlockTransclusion);
    ve.verifyNumberOfInlineTransclusion(numInlineTransclusion);
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorInsertTemplateDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorEditTemplateDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorEditTemplateDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 37 with ArticlePageObject

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

the class VETemplateTests method VETemplateTests_006_EditTemplate.

@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_006", "VEAddTemplate" }, dependsOnGroups = "VETemplateTests_004")
public void VETemplateTests_006_EditTemplate() {
    List<String> templateWikiTexts = new ArrayList<>();
    templateWikiTexts.add(VEContent.TEMPLATE_WIKITEXT);
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve.clickTransclusion(0, Transclusion.INLINE);
    VisualEditorEditTemplateDialog editTemplateDialog = ve.openEditTemplateDialog();
    editTemplateDialog.typeInParam(VEContent.TEMPLATE_PARAM_LABEL1, VEContent.TEMPLATE_PARAM_VALUE1);
    editTemplateDialog.typeInParam(VEContent.TEMPLATE_PARAM_LABEL2, VEContent.TEMPLATE_PARAM_VALUE2);
    ve = editTemplateDialog.clickDone();
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyAddedDiffs(templateWikiTexts);
    saveDialog = reviewDialog.clickReturnToSaveFormButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorEditTemplateDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorEditTemplateDialog) ArrayList(java.util.ArrayList) VisualEditorReviewChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 38 with ArticlePageObject

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

the class VETemplateTests method VETemplateTests_004_CheckBlockedTransclusion.

@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_004", "VEAddTemplate", "VETemplateTests_005", "VETemplateTests_006" })
public void VETemplateTests_004_CheckBlockedTransclusion() {
    articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    String selectText = PageContent.ARTICLE_TEXT.substring(12, 13);
    int numBlockTransclusion = ve.getNumberOfBlockTransclusion();
    int numInlineTransclusion = ve.getNumberOfInlineTransclusion();
    ve.typeTextArea(PageContent.ARTICLE_TEXT);
    ve.selectText(selectText);
    VisualEditorInsertTemplateDialog templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
    VisualEditorEditTemplateDialog editTemplateDialog = templateDialog.selectResultTemplate(VEContent.TEMPLATE_SEARCH_EXACTMATCH, 0);
    ve = editTemplateDialog.clickDone();
    ve.verifyNumberOfBlockTransclusion(numBlockTransclusion);
    ve.verifyNumberOfInlineTransclusion(++numInlineTransclusion);
    templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
    editTemplateDialog = templateDialog.selectResultTemplate(VEContent.TEMPLATE_SEARCH_EXACTMATCH, 0);
    ve = editTemplateDialog.clickDone();
    ve.verifyNumberOfBlockTransclusion(numBlockTransclusion);
    ve.verifyNumberOfInlineTransclusion(++numInlineTransclusion);
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorInsertTemplateDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorEditTemplateDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorEditTemplateDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 39 with ArticlePageObject

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

the class VisualEditorEditingTests method VisualEditorEditing_004_insertLinks.

@Test(groups = { "VisualEditorLinks", "VisualEditorEditing_004" })
public void VisualEditorEditing_004_insertLinks() {
    String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArrayList<String> linkWikiTexts = new ArrayList<>();
    linkWikiTexts.add(WikiTextContent.BLUELINK_TEXT);
    linkWikiTexts.add(WikiTextContent.REDLINK_TEXT);
    linkWikiTexts.add(WikiTextContent.EXTERNAL_LINK_TEXT);
    base.loginAs(credentials.userNameVEPreferred, credentials.passwordVEPreferred, wikiURL);
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    VisualEditorHyperLinkDialog veLinkDialog = ve.clickLinkButton();
    veLinkDialog.typeInLinkInput(PageContent.INTERNAL_LINK);
    veLinkDialog.verifyMatchingPageIsTop();
    veLinkDialog.clickLinkResult();
    ve = veLinkDialog.clickDoneButton();
    ve.typeReturn();
    veLinkDialog = ve.clickLinkButton();
    veLinkDialog.typeInLinkInput(PageContent.REDLINK);
    veLinkDialog.verifyNewPageIsTop();
    veLinkDialog.clickLinkResult();
    ve = veLinkDialog.clickDoneButton();
    ve.typeReturn();
    veLinkDialog = ve.clickLinkButton();
    veLinkDialog.typeInLinkInput(PageContent.EXTERNAL_LINK);
    veLinkDialog.verifyExternalLinkIsTop();
    veLinkDialog.clickLinkResult();
    ve = veLinkDialog.clickDoneButton();
    ve.typeReturn();
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyAddedDiffs(linkWikiTexts);
    saveDialog = reviewDialog.clickReturnToSaveFormButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
    article.verifyElementInContent(By.cssSelector("a[href*='" + PageContent.INTERNAL_LINK + "']"));
    article.verifyElementInContent(By.cssSelector("a.new[href*='" + PageContent.REDLINK + "']"));
    article.verifyElementInContent(By.cssSelector("a.external[href*='" + PageContent.EXTERNAL_LINK + "']"));
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArrayList(java.util.ArrayList) VisualEditorReviewChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog) VisualEditorHyperLinkDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorHyperLinkDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test)

Example 40 with ArticlePageObject

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

the class VisualEditorEditingTests method VisualEditorEditing_007_minorEdit.

@Test(groups = { "VisualEditorEditing", "VisualEditorEditing_007" })
public void VisualEditorEditing_007_minorEdit() {
    base.loginAs(credentials.userName7, credentials.password7, wikiURL);
    String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve.typeTextArea("b");
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    saveDialog.clickMinorEdit();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
    WikiHistoryPageObject historyPage = article.openArticleHistoryPage();
    historyPage.verifyRevisionMarkedAsMinor();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) WikiHistoryPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.WikiHistoryPageObject) Test(org.testng.annotations.Test)

Aggregations

ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)181 Test (org.testng.annotations.Test)169 Execute (com.wikia.webdriver.common.core.annotations.Execute)68 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)51 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)44 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)41 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)39 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)35 VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)16 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)15 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)14 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)11 VisualEditorReviewChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog)9 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)7 SalesPitchDialog (com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SalesPitchDialog)7 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)6 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)6 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)5 EmbedMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.EmbedMapComponentObject)5 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)4