Search in sources :

Example 86 with ArticlePageObject

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

the class VECategoryTests method VECategoryTests_005_AddNewCategoryWithSortKey.

//CA05
@Test(groups = { "VECategoryTests", "VECategoryTests_005", "VEAddCategory" })
public void VECategoryTests_005_AddNewCategoryWithSortKey() {
    String testCategory2 = "Newstuff";
    String sortKey = "testkey";
    List<String> categoryWithSortKeyWikiTexts = new ArrayList<>();
    categoryWithSortKeyWikiTexts.add("[[Category:" + testCategory2 + "|" + sortKey + "]]");
    String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    VisualEditorOptionsDialog optionsDialog = (VisualEditorOptionsDialog) ve.openDialogFromMenu(InsertDialog.CATEGORIES);
    optionsDialog.addCategory(testCategory2);
    optionsDialog.addSortKeyToCategory(testCategory2, sortKey);
    ve = optionsDialog.clickApplyChangesButton();
    ve.verifyVEToolBarPresent();
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyAddedDiffs(categoryWithSortKeyWikiTexts);
    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) ArrayList(java.util.ArrayList) VisualEditorReviewChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog) VisualEditorOptionsDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorOptionsDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test)

Example 87 with ArticlePageObject

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

the class VEGalleryTests method setup_VEPreferred.

@BeforeMethod(alwaysRun = true)
public void setup_VEPreferred() {
    wikiURL = urlBuilder.getUrlForWiki(URLsContent.VE_ENABLED_WIKI);
    article = new ArticlePageObject();
    article.loginAs(credentials.userName10, credentials.password10, wikiURL);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 88 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject 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 89 with ArticlePageObject

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

the class PortableInfoboxTests method verifyCopiedTemplateSyntaxInArticlePresence.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.USER_9)
public void verifyCopiedTemplateSyntaxInArticlePresence() {
    TemplatePage template = new TemplatePage();
    ArticlePageObject article = new ArticlePageObject();
    PortableInfobox infobox = new PortableInfobox();
    AceEditor editor = new AceEditor();
    template.openArticleByName(wikiURL, String.format("%s:%s", PageContent.TEMPLATE_NAMESPACE, PageContent.INFOBOX_2)).editArticleInSrcUsingDropdown();
    String templateSyntax = editor.getContent();
    (new ArticleContent()).clear();
    article.open();
    new ArticlePurger().purgeArticleAsLoggedUser();
    article.openCurrectArticleSourceMode().addContentInSourceMode(templateSyntax).submitArticle();
    Assertion.assertTrue(infobox.isInfoboxTitleVisible());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) TemplatePage(com.wikia.webdriver.elements.oasis.pages.TemplatePage) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) AceEditor(com.wikia.webdriver.pageobjectsfactory.componentobject.AceEditor) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 90 with ArticlePageObject

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

the class PortableInfoboxTests method editInfoboxInVEbyPopup.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void editInfoboxInVEbyPopup() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject();
    article.open();
    new ArticlePurger().purgeArticleAsAnon();
    VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).typeInParameterField(0, new SourceEditModePageObject(driver).getRandomDigits(5)).applyChanges();
    Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
    visualEditor.clickEditArea();
    visualEditor.clickInfobox();
    visualEditor.clickInfoboxPopup().typeInParameterField(2, new SourceEditModePageObject(driver).getRandomDigits(5)).applyChanges();
    Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) 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