Search in sources :

Example 1 with TemplateEditPage

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

the class InfoboxBuilderTests method verifyGoToSourceEditorNonEditedInfobox.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void verifyGoToSourceEditorNonEditedInfobox() {
    new InfoboxBuilderPage().openExisting("InfoboxBuilderSavingTemplate");
    new Sidebar().clickGoToSourceButton();
    Assertion.assertTrue(new TemplateEditPage().isEditAreaDisplayed());
    Assertion.assertTrue(driver.getCurrentUrl().contains("InfoboxBuilderSavingTemplate"));
}
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 2 with TemplateEditPage

use of com.wikia.webdriver.elements.oasis.pages.TemplateEditPage 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 3 with TemplateEditPage

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

the class InfoboxBuilderTests method verifyBuilderAuthentication.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.ANONYMOUS)
public void verifyBuilderAuthentication() {
    TemplateEditPage template = new TemplateEditPage().open("InfoboxBuilderAuthentication");
    Assertion.assertTrue(template.isPermissionErrorDisplayed());
}
Also used : TemplateEditPage(com.wikia.webdriver.elements.oasis.pages.TemplateEditPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with TemplateEditPage

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

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

the class InfoboxBuilderPage method open.

public InfoboxBuilderPage open() {
    new TemplateEditPage().open("temp_template");
    getUrl(String.format("%s%s", urlBuilder.getUrlForWiki(), URLsContent.SPECIAL_INFOBOX_BUILDER));
    driver.switchTo().frame(builderIFrame);
    wait.forElementVisible(previewArea);
    return this;
}
Also used : TemplateEditPage(com.wikia.webdriver.elements.oasis.pages.TemplateEditPage)

Aggregations

TemplateEditPage (com.wikia.webdriver.elements.oasis.pages.TemplateEditPage)5 Execute (com.wikia.webdriver.common.core.annotations.Execute)4 Test (org.testng.annotations.Test)4 InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)3