Search in sources :

Example 16 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method verifyGoToSourceEditorClickOnModalBackground.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void verifyGoToSourceEditorClickOnModalBackground() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("Infobox_verify_go_to_source");
    new Sidebar().clickGoToSourceButton();
    Assertion.assertTrue(builderPage.isGoToSourceModalPresent());
    builderPage.clickGoToSourceModalBackground();
    Assertion.assertTrue(builderPage.isInfoboxBuilderOpened());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 17 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method verifyReordering.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002", "test_verify" })
@Execute(asUser = User.STAFF)
public void verifyReordering() {
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage infoboxBuilder = new InfoboxBuilderPage().openNew("InfoboxBuilderVerifyReordering");
    builderSidebar.addRowComponent();
    infoboxBuilder.selectRowWithIndex(0);
    builderSidebar.typeInInputField("First Label");
    infoboxBuilder.selectRowWithIndex(1);
    builderSidebar.typeInInputField("Second Label");
    infoboxBuilder.selectRowWithIndex(2);
    builderSidebar.typeInInputField("Third Label");
    WebElement element = infoboxBuilder.getInfoboxComponent(2);
    WebElement topElement = infoboxBuilder.dragAndDropToTheTop(element);
    Assertion.assertEquals(element.getText(), topElement.getText());
    element = infoboxBuilder.getInfoboxComponent(3);
    topElement = infoboxBuilder.dragAndDropToTheTop(element);
    Assertion.assertEquals(element.getText(), topElement.getText());
    element = infoboxBuilder.getInfoboxComponent(1);
    topElement = infoboxBuilder.dragAndDropToTheTop(element);
    Assertion.assertEquals(element.getText(), topElement.getText());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) WebElement(org.openqa.selenium.WebElement) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 18 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method verifyGoToSourceEditorDropChanges.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void verifyGoToSourceEditorDropChanges() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("Infobox_verify_go_to_source_drop_changes");
    new Sidebar().clickGoToSourceButton();
    Assertion.assertTrue(builderPage.isGoToSourceModalPresent());
    builderPage.clickDropChangesButton();
    TemplateEditPage template = new TemplateEditPage();
    template.getTemplateClassification().changeTemplateType(TemplateTypes.INFOBOX).clickAddButton();
    Assertion.assertTrue(template.isEditAreaDisplayed());
    Assertion.assertTrue(template.isEditAreaEmpty());
}
Also used : TemplateEditPage(com.wikia.webdriver.elements.oasis.pages.TemplateEditPage) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 19 with InfoboxBuilderPage

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

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

the class InfoboxBuilderTests method immutableSources.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void immutableSources() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
    String labelText = "AutomatedTest";
    builderPage.openExisting("InfoboxBuilderImmutableRows").selectRowWithIndex(0);
    new Sidebar().typeInInputField(labelText);
    Assertion.assertEquals(builderPage.getLabelText(0), labelText);
    new Subhead().clickPublish();
    String invocationLabelText = new PortableInfobox().open("InfoboxBuilderImmutableExample").getDataLabelTextWithIndex(0);
    Assertion.assertEquals("AutomatedTest", invocationLabelText);
}
Also used : PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) 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