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