use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject 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.pageobjectsfactory.pageobject.article.ArticlePageObject 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.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class VEAddMapTests method VEAddMapTests_001_AddExistingMap.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VEAddMapTests_001", "VEAddExistingMap" })
@Execute(asUser = User.USER_12, onWikia = URLsContent.VE_ENABLED_WIKI)
public void VEAddMapTests_001_AddExistingMap() {
articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
VisualEditorPageObject ve = new VisualEditorPageObject().openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorAddMapDialog mapDialog = (VisualEditorAddMapDialog) ve.openDialogFromMenu(InsertDialog.MAP);
VisualEditorPageObject veNew = mapDialog.addExistingMap(0);
veNew.verifyMapPresent();
VisualEditorSaveChangesDialog save = veNew.clickPublishButton();
ArticlePageObject article = save.savePage();
article.verifyVEPublishComplete();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class SocialButtonsTests method SocialButtons_001_differentLanguages.
/**
* This tests executes for 11 users with different languages. Log in, open random article, compare
* present social buttons to expected social buttons
*/
@Test(groups = { "SocialButtons", "SocialButtons_001" }, dataProvider = "SocialButtonsDataProvider")
public void SocialButtons_001_differentLanguages(String[] credentials, String[] expectedSocialNetworks) {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(credentials[0], credentials[1], wikiURL);
new ArticlePageObject().open();
SocialButtonsComponentObject buttons = new SocialButtonsComponentObject(driver);
buttons.verifyShareButtonsPresent();
String[] currentSocialNetworks = buttons.getShareButtonTitles();
for (int i = 0; i < expectedSocialNetworks.length; i++) {
String currentSocialNetwork = currentSocialNetworks[i];
String expectedSocialNetwork = expectedSocialNetworks[i];
Assertion.assertEquals(currentSocialNetwork, expectedSocialNetwork, "Expected network not found on its position. " + "Note that the order of social buttons is also important, " + "as defined in requirements. Missing network:" + expectedSocialNetwork);
}
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.
the class EditingPreferencesTests method EditPreferences_001_selectVE.
@Test(groups = { "EditPreferences_001" })
@Execute(asUser = User.USER_5, onWikia = URLsContent.VE_ENABLED_WIKI)
@RelatedIssue(issueID = "MAIN-9722", comment = "test failing randomly")
public void EditPreferences_001_selectVE() {
EditPreferencesPage editPrefPage = new EditPreferencesPage(driver).openEditingSection();
editPrefPage.selectPreferredEditor(VE);
PreferencesPageObject prefPage = editPrefPage.clickSaveButton();
List<Notification> confirmNotifications = prefPage.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, PreferencesPageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), PreferencesPageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
String articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
ArticlePageObject aritclePage = new ArticlePageObject().open(articleName);
VisualEditorPageObject ve = aritclePage.openVEModeWithMainEditButton();
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
}
Aggregations