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());
}
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());
}
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());
}
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);
}
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);
}
Aggregations