use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class VECategoryTests method VECategoryTests_005_AddNewCategoryWithSortKey.
//CA05
@Test(groups = { "VECategoryTests", "VECategoryTests_005", "VEAddCategory" })
public void VECategoryTests_005_AddNewCategoryWithSortKey() {
String testCategory2 = "Newstuff";
String sortKey = "testkey";
List<String> categoryWithSortKeyWikiTexts = new ArrayList<>();
categoryWithSortKeyWikiTexts.add("[[Category:" + testCategory2 + "|" + sortKey + "]]");
String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorOptionsDialog optionsDialog = (VisualEditorOptionsDialog) ve.openDialogFromMenu(InsertDialog.CATEGORIES);
optionsDialog.addCategory(testCategory2);
optionsDialog.addSortKeyToCategory(testCategory2, sortKey);
ve = optionsDialog.clickApplyChangesButton();
ve.verifyVEToolBarPresent();
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
reviewDialog.verifyAddedDiffs(categoryWithSortKeyWikiTexts);
saveDialog = reviewDialog.clickReturnToSaveFormButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class VEGalleryTests method setup_VEPreferred.
@BeforeMethod(alwaysRun = true)
public void setup_VEPreferred() {
wikiURL = urlBuilder.getUrlForWiki(URLsContent.VE_ENABLED_WIKI);
article = new ArticlePageObject();
article.loginAs(credentials.userName10, credentials.password10, wikiURL);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class WikiActivityTests method WikiActivityTests_001_newEditionIsRecordedOnActivityModule.
/**
* https://wikia-inc.atlassian.net/browse/DAR-1617
*/
@Test(groups = "WikiActivity_001")
@Execute(asUser = User.USER)
public void WikiActivityTests_001_newEditionIsRecordedOnActivityModule() {
String articleContent = PageContent.ARTICLE_TEXT + DateTime.now().getMillis();
ArticlePageObject article = new ArticlePageObject().open("NewEditionIsRecordedOnActivityModule");
String articleName = article.getArticleName();
VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
visualEditMode.addContent(articleContent);
visualEditMode.submitArticle();
article.verifyContent(articleContent);
new SpecialWikiActivityPageObject(driver).open().verifyRecentEdition(articleName, credentials.userName);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class PortableInfoboxTests method verifyCopiedTemplateSyntaxInArticlePresence.
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.USER_9)
public void verifyCopiedTemplateSyntaxInArticlePresence() {
TemplatePage template = new TemplatePage();
ArticlePageObject article = new ArticlePageObject();
PortableInfobox infobox = new PortableInfobox();
AceEditor editor = new AceEditor();
template.openArticleByName(wikiURL, String.format("%s:%s", PageContent.TEMPLATE_NAMESPACE, PageContent.INFOBOX_2)).editArticleInSrcUsingDropdown();
String templateSyntax = editor.getContent();
(new ArticleContent()).clear();
article.open();
new ArticlePurger().purgeArticleAsLoggedUser();
article.openCurrectArticleSourceMode().addContentInSourceMode(templateSyntax).submitArticle();
Assertion.assertTrue(infobox.isInfoboxTitleVisible());
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class PortableInfoboxTests method editInfoboxInVEbyPopup.
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void editInfoboxInVEbyPopup() {
new ArticleContent().clear();
ArticlePageObject article = new ArticlePageObject();
article.open();
new ArticlePurger().purgeArticleAsAnon();
VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).typeInParameterField(0, new SourceEditModePageObject(driver).getRandomDigits(5)).applyChanges();
Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
visualEditor.clickEditArea();
visualEditor.clickInfobox();
visualEditor.clickInfoboxPopup().typeInParameterField(2, new SourceEditModePageObject(driver).getRandomDigits(5)).applyChanges();
Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
Aggregations