use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertGalleryDialog in project selenium-tests by Wikia.
the class VEGalleryTests method VEGalleryTests_003_PreviewOnTitle.
//AG03
@Test(groups = { "VEGallery", "VEGalleryTests_003", "VEGalleryPreview" })
public void VEGalleryTests_003_PreviewOnTitle() {
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");
ve = galleryDialog.clickTitleToPreview(7);
ve.verifyPreviewImage();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertGalleryDialog 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);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertGalleryDialog in project selenium-tests by Wikia.
the class VEGalleryTests method VEGalleryTests_001_AddGallery.
//AG01
@Test(groups = { "VEGallery", "VEGalleryTests_001", "VEGalleryTests_005", "VEGalleryAdd" })
public void VEGalleryTests_001_AddGallery() {
int numOfMedias = 9;
int numOfGalleries = 1;
articleName = PageContent.ARTICLE_NAME_PREFIX + article.getTimeStamp();
VisualEditorPageObject ve = article.openVEOnArticle(wikiURL, articleName);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
ve.typeTextArea(PageContent.ARTICLE_TEXT);
VisualEditorInsertGalleryDialog galleryDialog = ve.clickGalleryButton();
galleryDialog = galleryDialog.searchMedia("he");
ve = galleryDialog.addExistingMedia(numOfMedias);
ve.verifyGalleries(numOfGalleries);
ve.verifyMediasInGallery(numOfMedias);
ve.publish();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertGalleryDialog in project selenium-tests by Wikia.
the class VEGalleryTests method VEGalleryTests_004_PreviewOnMetadata.
//AG04
@Test(groups = { "VEGallery", "VEGalleryTests_004", "VEGalleryPreview" })
public void VEGalleryTests_004_PreviewOnMetadata() {
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");
ve = galleryDialog.clickMetaDataToPreview(3);
ve.verifyPreviewImage();
}
Aggregations