Search in sources :

Example 6 with ArticlePurger

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

the class PortableInfoboxTests method verifyVisibilityOfTabberAndItsImages.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
public void verifyVisibilityOfTabberAndItsImages() {
    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);
    new ArticlePurger().purgeArticleAsAnon();
    Assertion.assertTrue(infobox.isTabberVisible().isTabberImageVisible());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) Test(org.testng.annotations.Test)

Example 7 with ArticlePurger

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

Example 8 with ArticlePurger

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

the class PortableInfoboxTests method verifyInfoboxLayoutChange.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.STAFF)
public void verifyInfoboxLayoutChange() {
    new TemplateContent().push(INFOBOX2_TEMPLATE, PageContent.INFOBOX_2);
    new ArticleContent().push(INFOBOX2_INVOCATION, PageContent.INFOBOX_2);
    PortableInfobox infobox = new PortableInfobox();
    SpecialThemeDesignerPageObject theme = new SpecialThemeDesignerPageObject(driver);
    theme.openSpecialDesignerPage(wikiURL).selectTheme(4);
    theme.submitTheme();
    infobox.open(PageContent.INFOBOX_2);
    new ArticlePurger().purgeArticleAsLoggedUser();
    String oldBackground = infobox.getBackgroundColor();
    theme.openSpecialDesignerPage(wikiURL).selectTheme(1);
    theme.submitTheme();
    infobox.open(PageContent.INFOBOX_2);
    new ArticlePurger().purgeArticleAsLoggedUser();
    Assertion.assertNotEquals(oldBackground, infobox.getBackgroundColor());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) SpecialThemeDesignerPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject) 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