Search in sources :

Example 1 with SpecialJsPage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialJsPage in project selenium-tests by Wikia.

the class ContentReviewTests method anonUserShouldntSeeReviewModule.

@Test
public void anonUserShouldntSeeReviewModule() {
    SpecialJsPage wikiaJs = new SpecialJsPage().open("wikia");
    Assertion.assertTrue(wikiaJs.getReviewModule().isModuleNotVisible());
}
Also used : SpecialJsPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialJsPage) Test(org.testng.annotations.Test)

Example 2 with SpecialJsPage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialJsPage in project selenium-tests by Wikia.

the class ContentReviewTests method editJS.

@Test
@Execute(asUser = User.CONTENT_REVIEWER)
public void editJS() {
    final String expectedContent = "console.log(\"content review test\");";
    VisualEditModePageObject editPage = new VisualEditModePageObject().open("mediawiki:wikia.js");
    editPage.getAceEditor().clearContent().insertContent(expectedContent);
    editPage.clickPublishButton();
    SpecialJsPage specialJsPage = new SpecialJsPage();
    Assertion.assertEquals(specialJsPage.getScriptContent(), expectedContent);
    Assertion.assertTrue(specialJsPage.getReviewModule().isSubmitLinkVisible());
    editPage.open("mediawiki:wikia.js").getAceEditor().clearContent().insertContent("console.log(\"content review test 2\");");
    editPage.clickAutoApproveCheckbox().clickPublishButton();
    Assertion.assertEquals(specialJsPage.getScriptContent(), "console.log(\"content review test 2\");");
    Assertion.assertTrue(specialJsPage.getReviewModule().isSubmitLinkNotVisible());
}
Also used : VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) SpecialJsPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialJsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with SpecialJsPage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialJsPage in project selenium-tests by Wikia.

the class ContentReviewTests method staffUserShouldSeeReviewModule.

@Test
@Execute(asUser = User.STAFF)
public void staffUserShouldSeeReviewModule() {
    SpecialJsPage wikiaJs = new SpecialJsPage().open("wikia");
    Assertion.assertTrue(wikiaJs.getReviewModule().isModuleVisible());
}
Also used : SpecialJsPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialJsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

SpecialJsPage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialJsPage)3 Test (org.testng.annotations.Test)3 Execute (com.wikia.webdriver.common.core.annotations.Execute)2 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)1