use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject 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.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.
the class CategoriesTestsEditMode method CategoriesTestsArticleEdit_004_user.
@Test(groups = { "CategoriesTestsArticleEdit_004", "CategoriesTestsArticleEditMode" })
@Execute(asUser = User.USER)
public void CategoriesTestsArticleEdit_004_user() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
VisualEditModePageObject visual = new VisualEditModePageObject().open();
String categoryName = PageContent.CATEGORY_NAME_PREFIX + visual.getTimeStamp();
visual.typeCategoryName(categoryName);
visual.submitCategory();
visual.verifyCategoryPresent(categoryName);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.
the class CategoriesTestsEditMode method CategoriesTestsArticleEdit_005_userSuggestions.
@Test(groups = { "CategoriesTestsArticleEdit_005", "CategoriesTestsArticleEditMode" })
@Execute(asUser = User.USER)
public void CategoriesTestsArticleEdit_005_userSuggestions() {
new ArticleContent().push();
VisualEditModePageObject visual = new VisualEditModePageObject().open();
visual.typeCategoryName(PageContent.CATEGORY_NAME_PREFIX);
visual.triggerCategorySuggestions();
String categoryName = visual.selectCategorySuggestions(1);
visual.verifyCategoryPresent(categoryName);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject in project selenium-tests by Wikia.
the class CategoriesTestsEditMode method CategoriesTestsArticleEdit_001_anonEdit.
@Test(groups = { "CategoriesTestsArticleEdit_001", "CategoriesTestsArticleEditMode" })
public void CategoriesTestsArticleEdit_001_anonEdit() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditModePageObject visual = base.navigateToArticleEditPage(wikiURL, articleName);
String categoryName = PageContent.CATEGORY_NAME_PREFIX + visual.getTimeStamp();
visual.typeCategoryName(categoryName);
visual.submitCategory();
visual.verifyCategoryPresent(categoryName);
EditCategoryComponentObject editCategory = visual.editCategory(categoryName);
categoryName = PageContent.CATEGORY_NAME_PREFIX + visual.getTimeStamp();
editCategory.editCategoryName(categoryName);
visual.verifyCategoryPresent(categoryName);
}
Aggregations