use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog 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.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog 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.VisualEditorInsertTemplateDialog 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.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog in project selenium-tests by Wikia.
the class VETemplateTests method VETemplateTests_002_SuggestedTemplate.
@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VETemplate", "VETemplateTests_002", "VETemplateSuggestion" })
public void VETemplateTests_002_SuggestedTemplate() {
articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorInsertTemplateDialog templateDialog = (VisualEditorInsertTemplateDialog) ve.openDialogFromMenu(InsertDialog.TEMPLATE);
templateDialog.verifyNoResultTemplate();
templateDialog.verifyIsSuggestedTemplate();
}
Aggregations