Search in sources :

Example 11 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method verifyGoToSourceEditorSaveChanges.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void verifyGoToSourceEditorSaveChanges() {
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("Infobox_verify_go_to_source_save_changes");
    builderSidebar.addRowComponent();
    builderPage.selectRowWithIndex(1);
    builderSidebar.clickDeleteButton().clickGoToSourceButton();
    Assertion.assertTrue(builderPage.isGoToSourceModalPresent());
    builderPage.clickSaveChangesButton();
    TemplateEditPage template = new TemplateEditPage();
    Assert.assertTrue(template.isEditAreaDisplayed());
    Assert.assertFalse(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 12 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method verifyDefaultStructure.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void verifyDefaultStructure() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderVerifyDefaultStructure");
    Assertion.assertEquals(builderPage.countTitles(), 1);
    Assertion.assertEquals(builderPage.countImages(), 1);
    Assertion.assertEquals(builderPage.countRows(), 2);
    Assertion.assertEquals(builderPage.countHeaders(), 0);
    builderPage.selectTitleWithIndex(0);
    Assertion.assertTrue(new Sidebar().isTitleUsingArticleName());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 13 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method savingTemplate.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void savingTemplate() {
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
    String templateName = "InfoboxBuilderSavingTemplate";
    builderPage.openExisting(templateName).selectRowWithIndex(0);
    builderSidebar.clickDeleteButton();
    builderSidebar.addRowComponent();
    new Subhead().clickPublish();
    Assertion.assertEquals(templateName.toLowerCase(), new TemplatePage().getHeaderText().toLowerCase());
}
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 14 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method verifyScrolling.

/*
   * Verify if scrolling is enabled when Infobox's height in preview is greater than the preview
   * area height.
   */
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002" })
@Execute(asUser = User.USER)
public void verifyScrolling() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
    new InfoboxBuilderPage().openExisting("InfoboxBuilderVerifyScrolling");
    new Sidebar().addImageComponent().addImageComponent().addImageComponent().addImageComponent();
    builderPage.verifyScrollbarIsVisible().moveToLastComponent();
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 15 with InfoboxBuilderPage

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

the class InfoboxBuilderTests method deletingDefaultComponentsUsingPopUp.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void deletingDefaultComponentsUsingPopUp() {
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderDeletingDefaultComponents");
    int rowComponents = builderPage.countRows();
    int titleComponents = builderPage.countTitles();
    int imageComponents = builderPage.countImages();
    Assertion.assertEquals(rowComponents - 1, builderPage.deleteRowUsingPopUp(0).countRows());
    Assertion.assertEquals(titleComponents - 1, builderPage.deleteTitleUsingPopUp(0).countTitles());
    Assertion.assertEquals(imageComponents - 1, builderPage.deleteImageUsingPopUp(0).countImages());
}
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