Search in sources :

Example 1 with ArticlePurger

use of com.wikia.webdriver.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.

the class PortableInfoboxTests method insertEmptyInfoboxInVE.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertEmptyInfoboxInVE() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject();
    article.open();
    new ArticlePurger().purgeArticleAsAnon();
    VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).applyChanges();
    Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) Test(org.testng.annotations.Test)

Example 2 with ArticlePurger

use of com.wikia.webdriver.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.

the class PortableInfoboxTests method insertInfoboxWithParametersInVE.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertInfoboxWithParametersInVE() {
    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());
}
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)

Example 3 with ArticlePurger

use of com.wikia.webdriver.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.

the class PortableInfoboxTests method insertInfoboxWithParamsInVEusingDarkTheme.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
@Execute(asUser = User.STAFF)
public void insertInfoboxWithParamsInVEusingDarkTheme() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject();
    SpecialThemeDesignerPageObject theme = new SpecialThemeDesignerPageObject(driver);
    theme.openSpecialDesignerPage(wikiURL).selectTheme(3);
    theme.submitTheme();
    article.open();
    new ArticlePurger().purgeArticleAsLoggedUser();
    VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).typeInParameterField(0, 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) SpecialThemeDesignerPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with ArticlePurger

use of com.wikia.webdriver.common.core.helpers.ArticlePurger 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 5 with ArticlePurger

use of com.wikia.webdriver.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.

the class PortableInfoboxTests method infoboxImageOnCategoryPage.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.USER)
public void infoboxImageOnCategoryPage() {
    new TemplateContent().push(INFOBOX2_TEMPLATE, PageContent.INFOBOX_2);
    new ArticleContent().push(INFOBOX2_INVOCATION, PageContent.INFOBOX_2);
    PortableInfobox infobox = new PortableInfobox();
    infobox.open(PageContent.INFOBOX_2);
    String imageName = infobox.getDataImageName();
    CategoryPageObject categoryPage = infobox.clickCategoryWithIndex(0);
    new ArticlePurger().purgeArticleAsLoggedUser();
    String categoryImageURL = categoryPage.getImageURLFromGallery(PageContent.INFOBOX_2);
    Assertion.assertTrue(categoryImageURL.contains(imageName));
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) CategoryPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)8 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)8 Test (org.testng.annotations.Test)8 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)5 Execute (com.wikia.webdriver.common.core.annotations.Execute)4 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)4 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)4 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)3 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)3 SpecialThemeDesignerPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject)2 TemplatePage (com.wikia.webdriver.elements.oasis.pages.TemplatePage)1 AceEditor (com.wikia.webdriver.pageobjectsfactory.componentobject.AceEditor)1 CategoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject)1