Search in sources :

Example 1 with WikiFeatures

use of com.wikia.webdriver.elements.oasis.pages.WikiFeatures in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifyUserInteractions.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002" })
@Execute(asUser = User.STAFF)
public void verifyUserInteractions() {
    new WikiFeatures().openWikiFeatures(wikiURL).enableEuropaInfoboxTheme();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderVerifySelectedBorderStyling").hoverMouseOverComponent(0);
    Assertion.assertTrue(builderPage.isTooltipVisible(), "Component tooltip is not visible");
    String borderStyle = builderPage.getBorderStyle();
    Assertion.assertEquals(borderStyle, "1px solid rgb(26, 94, 184)");
    borderStyle = builderPage.clickBuilderBackground().getComponentBackgroundColor(0);
    Assertion.assertNotEquals(borderStyle, "1px solid rgb(26, 94, 184)");
}
Also used : WikiFeatures(com.wikia.webdriver.elements.oasis.pages.WikiFeatures) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with WikiFeatures

use of com.wikia.webdriver.elements.oasis.pages.WikiFeatures in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifyLoadingDefaultTheme.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.STAFF)
public void verifyLoadingDefaultTheme() {
    new WikiFeatures().openWikiFeatures(wikiURL).disableEuropaInfoboxTheme();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("Infobox_theme_default");
    Assertion.assertEquals(builderPage.getInfoboxWidth(), DEFAULT_INFOBOX_WIDTH);
}
Also used : WikiFeatures(com.wikia.webdriver.elements.oasis.pages.WikiFeatures) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with WikiFeatures

use of com.wikia.webdriver.elements.oasis.pages.WikiFeatures in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifyInfoboxPreviewTheme.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002" })
@Execute(asUser = User.STAFF)
public void verifyInfoboxPreviewTheme() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
    SpecialThemeDesignerPageObject themeDesigner = new SpecialThemeDesignerPageObject(driver);
    TemplatePage template = new TemplatePage();
    new WikiFeatures().openWikiFeatures(wikiURL).enableEuropaInfoboxTheme();
    themeDesigner.openSpecialDesignerPage(wikiURL).selectTheme(0);
    themeDesigner.submitTheme();
    String templateBgColor = template.open(PageContent.INFOBOX_2).getPageBackgroundColor();
    String previewBgColor = builderPage.openExisting("InfoboxBuilderVerifyInfoboxTheme").getPreviewBackgroundColor();
    Assertion.assertEquals(previewBgColor, templateBgColor);
    themeDesigner.openSpecialDesignerPage(wikiURL).selectTheme(2);
    themeDesigner.submitTheme();
    templateBgColor = template.open(PageContent.INFOBOX_2).getPageBackgroundColor();
    previewBgColor = builderPage.openExisting("InfoboxBuilderVerifyInfoboxTheme").getPreviewBackgroundColor();
    Assertion.assertEquals(templateBgColor, previewBgColor);
}
Also used : TemplatePage(com.wikia.webdriver.elements.oasis.pages.TemplatePage) SpecialThemeDesignerPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject) WikiFeatures(com.wikia.webdriver.elements.oasis.pages.WikiFeatures) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with WikiFeatures

use of com.wikia.webdriver.elements.oasis.pages.WikiFeatures in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifyLoadingEuropaTheme.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.STAFF)
public void verifyLoadingEuropaTheme() {
    new WikiFeatures().openWikiFeatures(wikiURL).enableEuropaInfoboxTheme();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("Infobox_theme_europa");
    Assertion.assertEquals(builderPage.getInfoboxWidth(), EUROPA_INFOBOX_WIDTH);
}
Also used : WikiFeatures(com.wikia.webdriver.elements.oasis.pages.WikiFeatures) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)4 InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)4 WikiFeatures (com.wikia.webdriver.elements.oasis.pages.WikiFeatures)4 Test (org.testng.annotations.Test)4 TemplatePage (com.wikia.webdriver.elements.oasis.pages.TemplatePage)1 SpecialThemeDesignerPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject)1