use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.
the class VEImageTests method changeImageAlignment.
@Test(groups = { "VEImageTests", "VEMediaSetting" })
@Execute(asUser = User.USER_9)
public void changeImageAlignment() {
int numOfMedia = 3;
List<String> wikiTexts = new ArrayList<String>();
wikiTexts.add("|centre");
wikiTexts.add("|left");
String randomArticleName = PageContent.ARTICLE_NAME_PREFIX + new VisualEditorPageObject().getTimeStamp();
VisualEditorPageObject veCreatePage = new VisualEditorPageObject().openVEOnArticle(wikiURL, randomArticleName);
VisualEditorAddMediaDialog mediaDialog = veCreatePage.searchImage("h");
veCreatePage = mediaDialog.addExistingMedia(numOfMedia);
veCreatePage.verifyMedias(numOfMedia);
veCreatePage.clickPublishButton();
new VisualEditorSaveChangesDialog(this.driver).savePage();
veCreatePage.waitForPageLoad();
ArticlePageObject article = new ArticlePageObject();
article.openVEModeWithMainEditButton();
VisualEditorPageObject ve = new VisualEditorPageObject();
ve.alignMedia(2, Alignment.LEFT);
ve.alignMedia(0, Alignment.CENTER);
ve.verifyEditorSurfacePresent();
ve.verifyVEToolBarPresent();
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
reviewDialog.verifyAddedDiffs(wikiTexts);
saveDialog = reviewDialog.clickReturnToSaveFormButton();
saveDialog.savePage();
article.verifyVEPublishComplete();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.
the class VERecaptchaTests method VEAddRecaptchaTests_001_AddExternalURL.
// Verify that second click on "Save page" button changes recaptcha.
@Test(groups = { "VERecaptchaTests", "VEAddRecaptcha_001", "VEAnon" })
public void VEAddRecaptchaTests_001_AddExternalURL() {
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
ve.typeTextArea(URLsContent.EXTERNAL_URL);
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
saveDialog = saveDialog.clickSaveWithRecaptcha();
saveDialog.verifyRecaptchaImageSrc();
String firstImgSrc = saveDialog.getRecaptchaImageSrc();
saveDialog = saveDialog.clickSaveWithRecaptcha();
saveDialog.verifyRecaptchaIsVisible();
saveDialog.verifyRecaptchaImageSrc();
saveDialog.verifyIsNewRecaptcha(firstImgSrc);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.
the class VETemplateTests method VETemplateTests_003_AddTemplates.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_003", "VEAddTemplate" })
public void VETemplateTests_003_AddTemplates() {
articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
int numBlockTransclusion = ve.getNumberOfBlockTransclusion();
int numInlineTransclusion = ve.getNumberOfInlineTransclusion();
VisualEditorInsertTemplateDialog templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
VisualEditorEditTemplateDialog editTemplateDialog = templateDialog.selectSuggestedTemplate(0);
ve = editTemplateDialog.clickDone();
ve.verifyNumberOfBlockTransclusion(numBlockTransclusion);
ve.verifyNumberOfInlineTransclusion(++numInlineTransclusion);
templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
editTemplateDialog = templateDialog.selectResultTemplate(VEContent.TEMPLATE_SEARCH_3CHARS_PARTIALMATCH, 1);
ve = editTemplateDialog.closeDialog();
ve.verifyNumberOfBlockTransclusion(++numBlockTransclusion);
ve.verifyNumberOfInlineTransclusion(numInlineTransclusion);
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.
the class VETemplateTests method VETemplateTests_006_EditTemplate.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_006", "VEAddTemplate" }, dependsOnGroups = "VETemplateTests_004")
public void VETemplateTests_006_EditTemplate() {
List<String> templateWikiTexts = new ArrayList<>();
templateWikiTexts.add(VEContent.TEMPLATE_WIKITEXT);
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
ve.clickTransclusion(0, Transclusion.INLINE);
VisualEditorEditTemplateDialog editTemplateDialog = ve.openEditTemplateDialog();
editTemplateDialog.typeInParam(VEContent.TEMPLATE_PARAM_LABEL1, VEContent.TEMPLATE_PARAM_VALUE1);
editTemplateDialog.typeInParam(VEContent.TEMPLATE_PARAM_LABEL2, VEContent.TEMPLATE_PARAM_VALUE2);
ve = editTemplateDialog.clickDone();
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
reviewDialog.verifyAddedDiffs(templateWikiTexts);
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 VETemplateTests method VETemplateTests_004_CheckBlockedTransclusion.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_004", "VEAddTemplate", "VETemplateTests_005", "VETemplateTests_006" })
public void VETemplateTests_004_CheckBlockedTransclusion() {
articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
String selectText = PageContent.ARTICLE_TEXT.substring(12, 13);
int numBlockTransclusion = ve.getNumberOfBlockTransclusion();
int numInlineTransclusion = ve.getNumberOfInlineTransclusion();
ve.typeTextArea(PageContent.ARTICLE_TEXT);
ve.selectText(selectText);
VisualEditorInsertTemplateDialog templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
VisualEditorEditTemplateDialog editTemplateDialog = templateDialog.selectResultTemplate(VEContent.TEMPLATE_SEARCH_EXACTMATCH, 0);
ve = editTemplateDialog.clickDone();
ve.verifyNumberOfBlockTransclusion(numBlockTransclusion);
ve.verifyNumberOfInlineTransclusion(++numInlineTransclusion);
templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
editTemplateDialog = templateDialog.selectResultTemplate(VEContent.TEMPLATE_SEARCH_EXACTMATCH, 0);
ve = editTemplateDialog.clickDone();
ve.verifyNumberOfBlockTransclusion(numBlockTransclusion);
ve.verifyNumberOfInlineTransclusion(++numInlineTransclusion);
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
}
Aggregations