Search in sources :

Example 1 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifyNamingConflictTypingNameAfterClickingPublish.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.USER)
public void verifyNamingConflictTypingNameAfterClickingPublish() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().open();
    new Subhead().clickPublish();
    Assertion.assertTrue(builderPage.isModalEditTitlePresent());
    Assertion.assertTrue(builderPage.isEditTemplateTitleInputPresent());
    builderPage.insertTemplateTitle("InfoboxNamingConflict").clickPublishEditedTitleButton();
    Assertion.assertTrue(builderPage.isErrorMessagePresent());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method changeTemplateNameByClickingSubhead.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.USER)
public void changeTemplateNameByClickingSubhead() {
    Subhead subhead = new Subhead();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().open();
    subhead.clickSubheadTitle();
    Assertion.assertTrue(builderPage.isModalEditTitlePresent());
    Assertion.assertTrue(builderPage.isEditTemplateTitleInputPresent());
    builderPage.insertTemplateTitle("InfoboxBuilderChangeTemplateNameBySubhead").clickPublishEditedTitleButton();
    builderPage.waitUntilEditTitleModalIsClosed();
    Assertion.assertEquals(subhead.getSubheadTitle(), "Editing template: InfoboxBuilderChangeTemplateNameBySubhead");
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method setInfoboxTitleToUseArticleName.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002" })
@Execute(asUser = User.USER)
public void setInfoboxTitleToUseArticleName() {
    TemplatePage template = new TemplatePage();
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("SetInfoboxTitleToUseArticleName").deleteTitleUsingPopUp(0);
    builderSidebar.addTitleComponent();
    builderPage.selectTitleWithIndex(0);
    builderSidebar.setTitleToUseArticleName();
    new Subhead().clickPublish();
    Assertion.assertTrue(template.isTemplatePagePresent());
    String infoboxTitle = template.getPortableInfobox().getTitleTextWithIndex(0);
    Assertion.assertEquals("SetInfoboxTitleToUseArticleName", infoboxTitle);
}
Also used : TemplatePage(com.wikia.webdriver.elements.oasis.pages.TemplatePage) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage 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 5 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method addingComponents.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void addingComponents() {
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderAddingComponents");
    int rowComponents = builderPage.countRows();
    int titleComponents = builderPage.countTitles();
    int imageComponents = builderPage.countImages();
    int headerComponents = builderPage.countHeaders();
    builderSidebar.addRowComponent().addImageComponent().addTitleComponent().addHeaderComponent();
    Assertion.assertEquals(rowComponents + 1, builderPage.countRows());
    Assertion.assertEquals(titleComponents + 1, builderPage.countTitles());
    Assertion.assertEquals(imageComponents + 1, builderPage.countImages());
    Assertion.assertEquals(headerComponents + 1, builderPage.countHeaders());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)25 Test (org.testng.annotations.Test)25 Execute (com.wikia.webdriver.common.core.annotations.Execute)24 TemplatePage (com.wikia.webdriver.elements.oasis.pages.TemplatePage)5 WikiFeatures (com.wikia.webdriver.elements.oasis.pages.WikiFeatures)4 TemplateEditPage (com.wikia.webdriver.elements.oasis.pages.TemplateEditPage)3 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)1 SpecialThemeDesignerPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject)1 WebElement (org.openqa.selenium.WebElement)1