use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class VETemplateTests method VETemplateTests_001_SearchTemplate.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_001", "VETemplateSearch" })
public void VETemplateTests_001_SearchTemplate() {
articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorInsertTemplateDialog templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
//1 character search 'a', not matching article name, no result
templateDialog.typeInSearchInput(VEContent.TEMPLATE_SEARCH_1CHAR_NOMATCH);
templateDialog.verifyNoResultTemplate();
//2 characters search 'ab', not matching article name, no result
templateDialog.clearSearchInput();
templateDialog.typeInSearchInput(VEContent.TEMPLATE_SEARCH_2CHARS_NOMATCH);
templateDialog.verifyNoResultTemplate();
//3 characters search 'per', not matching article name, 2 results on template name
templateDialog.clearSearchInput();
templateDialog.typeInSearchInput(VEContent.TEMPLATE_SEARCH_3CHARS_PARTIALMATCH);
templateDialog.verifyIsResultTemplate();
//2 characters search 'ar', matching article name, 3 results on the article
templateDialog.clearSearchInput();
templateDialog.typeInSearchInput(VEContent.TEMPLATE_SEARCH_MATCH_ARTICLE);
templateDialog.verifyIsResultTemplate();
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue 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.common.core.annotations.RelatedIssue 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.common.core.annotations.RelatedIssue 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();
}
use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.
the class VEVideoTests method removeVideoFromArticle.
@Test(enabled = false, groups = { "VEVideo", "VEAddExistingVideo" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "SUS-757")
public void removeVideoFromArticle() {
String articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
VisualEditorPageObject ve = new VisualEditorPageObject().openVEOnArticle(wikiURL, articleName);
VisualEditorPageObject veNew = ve.addVideoToContent(VideoContent.NON_PREMIUM_VIDEO_URL);
veNew.verifyVideos(1);
veNew.publish();
ve.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
ve.selectMediaAndDelete();
ve.verifyNoVideo();
ve.publish();
}
Aggregations