use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject 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();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class VEGalleryTests method VEGalleryTests_005_Remove.
@Test(groups = { "VEGallery", "VEGalleryTests_005", "VEGalleryRemove" }, dependsOnGroups = "VEGalleryTests_001")
public void VEGalleryTests_005_Remove() {
VisualEditorPageObject ve = article.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
ve.deleteGallery(0);
ve.verifyGalleries(0);
ve.publish();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class VECategoryTests method VECategoryTests_001_AddNewCategory.
//CA01
@Test(groups = { "VECategoryTests", "VECategoryTests_001", "VEAddCategory", "VECategoryTests_002" })
public void VECategoryTests_001_AddNewCategory() {
articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorOptionsDialog optionsDialog = (VisualEditorOptionsDialog) ve.openDialogFromMenu(InsertDialog.CATEGORIES);
optionsDialog.addCategory(testCategory);
ve = optionsDialog.clickApplyChangesButton();
ve.verifyVEToolBarPresent();
VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
reviewDialog.verifyAddedDiffs(categoryWikiTexts);
saveDialog = reviewDialog.clickReturnToSaveFormButton();
ArticlePageObject article = saveDialog.savePage();
article.verifyVEPublishComplete();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class VECategoryTests method VECategoryTests_003_NewCategorySuggestions.
//CA03
@Test(groups = { "VECategoryTests", "VECategoryTests_003", "VEAddCategory" })
public void VECategoryTests_003_NewCategorySuggestions() {
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.verifyLinkSuggestions(categorySearchStr, CategoryResultType.NEW);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.
the class VEGalleryTests method VEGalleryTests_002_GalleryCart.
//AG02
@Test(groups = { "VEGallery", "VEGalleryTests_002", "VEGalleryCart" })
public void VEGalleryTests_002_GalleryCart() {
int numOfMediaToRemoveFirst = 1;
int numOfMediaToRemoveSecond = 2;
int numOfMediaToAdd = 2;
int initialNumOfMedia = 7;
int expectedNumOfMedia = initialNumOfMedia;
String randomArticleName = PageContent.ARTICLE_NAME_PREFIX + article.getTimeStamp();
VisualEditorPageObject ve = article.openVEOnArticle(wikiURL, randomArticleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorInsertGalleryDialog galleryDialog = ve.clickGalleryButton();
galleryDialog = galleryDialog.searchMedia("he");
//verify # of cart items = 9
galleryDialog.addMediaToCart(initialNumOfMedia);
galleryDialog.verifyNumOfCartItems(expectedNumOfMedia);
//verify # of cart items = 8
galleryDialog.removeMediaFromCart(numOfMediaToRemoveFirst);
expectedNumOfMedia = expectedNumOfMedia - numOfMediaToRemoveFirst;
galleryDialog.verifyNumOfCartItems(expectedNumOfMedia);
//verify # of cart item = 11
galleryDialog = galleryDialog.searchMedia("a");
galleryDialog.addMediaToCart(numOfMediaToAdd);
expectedNumOfMedia = expectedNumOfMedia + numOfMediaToAdd;
galleryDialog.verifyNumOfCartItems(expectedNumOfMedia);
//verify # of cart item = 9
galleryDialog = galleryDialog.searchMedia("he");
galleryDialog.removeMediaFromCart(numOfMediaToRemoveSecond);
expectedNumOfMedia = expectedNumOfMedia - numOfMediaToRemoveSecond;
galleryDialog.verifyNumOfCartItems(expectedNumOfMedia);
}
Aggregations