use of com.wikia.webdriver.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.
the class PortableInfoboxTests method insertEmptyInfoboxInVE.
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertEmptyInfoboxInVE() {
new ArticleContent().clear();
ArticlePageObject article = new ArticlePageObject();
article.open();
new ArticlePurger().purgeArticleAsAnon();
VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).applyChanges();
Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
use of com.wikia.webdriver.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.
the class PortableInfoboxTests method insertInfoboxWithParametersInVE.
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertInfoboxWithParametersInVE() {
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());
}
use of com.wikia.webdriver.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.
the class PortableInfoboxTests method insertInfoboxWithParamsInVEusingDarkTheme.
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
@Execute(asUser = User.STAFF)
public void insertInfoboxWithParamsInVEusingDarkTheme() {
new ArticleContent().clear();
ArticlePageObject article = new ArticlePageObject();
SpecialThemeDesignerPageObject theme = new SpecialThemeDesignerPageObject(driver);
theme.openSpecialDesignerPage(wikiURL).selectTheme(3);
theme.submitTheme();
article.open();
new ArticlePurger().purgeArticleAsLoggedUser();
VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).typeInParameterField(0, new SourceEditModePageObject(driver).getRandomDigits(5)).applyChanges();
Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
use of com.wikia.webdriver.common.core.helpers.ArticlePurger 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.common.core.helpers.ArticlePurger in project selenium-tests by Wikia.
the class PortableInfoboxTests method infoboxImageOnCategoryPage.
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.USER)
public void infoboxImageOnCategoryPage() {
new TemplateContent().push(INFOBOX2_TEMPLATE, PageContent.INFOBOX_2);
new ArticleContent().push(INFOBOX2_INVOCATION, PageContent.INFOBOX_2);
PortableInfobox infobox = new PortableInfobox();
infobox.open(PageContent.INFOBOX_2);
String imageName = infobox.getDataImageName();
CategoryPageObject categoryPage = infobox.clickCategoryWithIndex(0);
new ArticlePurger().purgeArticleAsLoggedUser();
String categoryImageURL = categoryPage.getImageURLFromGallery(PageContent.INFOBOX_2);
Assertion.assertTrue(categoryImageURL.contains(imageName));
}
Aggregations