use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.
the class VisualEditorEditingTests method VisualEditorEditing_004_insertLinks.
@Test(groups = { "VisualEditorLinks", "VisualEditorEditing_004" })
public void VisualEditorEditing_004_insertLinks() {
String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArrayList<String> linkWikiTexts = new ArrayList<>();
linkWikiTexts.add(WikiTextContent.BLUELINK_TEXT);
linkWikiTexts.add(WikiTextContent.REDLINK_TEXT);
linkWikiTexts.add(WikiTextContent.EXTERNAL_LINK_TEXT);
base.loginAs(credentials.userNameVEPreferred, credentials.passwordVEPreferred, wikiURL);
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorHyperLinkDialog veLinkDialog = ve.clickLinkButton();
veLinkDialog.typeInLinkInput(PageContent.INTERNAL_LINK);
veLinkDialog.verifyMatchingPageIsTop();
veLinkDialog.clickLinkResult();
ve = veLinkDialog.clickDoneButton();
ve.typeReturn();
veLinkDialog = ve.clickLinkButton();
veLinkDialog.typeInLinkInput(PageContent.REDLINK);
veLinkDialog.verifyNewPageIsTop();
veLinkDialog.clickLinkResult();
ve = veLinkDialog.clickDoneButton();
ve.typeReturn();
veLinkDialog = ve.clickLinkButton();
veLinkDialog.typeInLinkInput(PageContent.EXTERNAL_LINK);
veLinkDialog.verifyExternalLinkIsTop();
veLinkDialog.clickLinkResult();
ve = veLinkDialog.clickDoneButton();
ve.typeReturn();
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
reviewDialog.verifyAddedDiffs(linkWikiTexts);
saveDialog = reviewDialog.clickReturnToSaveFormButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
article.verifyElementInContent(By.cssSelector("a[href*='" + PageContent.INTERNAL_LINK + "']"));
article.verifyElementInContent(By.cssSelector("a.new[href*='" + PageContent.REDLINK + "']"));
article.verifyElementInContent(By.cssSelector("a.external[href*='" + PageContent.EXTERNAL_LINK + "']"));
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.
the class VisualEditorEditingTests method VisualEditorEditing_007_minorEdit.
@Test(groups = { "VisualEditorEditing", "VisualEditorEditing_007" })
public void VisualEditorEditing_007_minorEdit() {
base.loginAs(credentials.userName7, credentials.password7, wikiURL);
String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
ve.typeTextArea("b");
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
saveDialog.clickMinorEdit();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
WikiHistoryPageObject historyPage = article.openArticleHistoryPage();
historyPage.verifyRevisionMarkedAsMinor();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.
the class VisualEditorEditingTests method VisualEditorEditing_002_delete.
@Test(groups = { "VisualEditorEditing", "VisualEditorEditing_002" })
public void VisualEditorEditing_002_delete() {
new ArticleContent().push(startingWikiText);
String removeText = "Lorem ";
List<String> deletedWikiTexts;
deletedWikiTexts = new ArrayList<>();
deletedWikiTexts.add(removeText);
VisualEditorPageObject ve = new VisualEditorPageObject().open();
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
ve.removeText(removeText);
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
reviewDialog.verifyDeletedDiffs(deletedWikiTexts);
saveDialog = reviewDialog.clickReturnToSaveFormButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog 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.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog 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();
}
Aggregations