use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog 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.VisualEditorAddMediaDialog in project selenium-tests by Wikia.
the class VEImageTests method editImageCaption.
@Test(groups = { "VEImageTests", "VEMediaSetting" })
@Execute(asUser = User.USER_9)
public void editImageCaption() {
String captionText = "test123";
VisualEditorPageObject ve = new VisualEditorPageObject().openVEOnArticle(wikiURL, PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis());
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorAddMediaDialog mediaDialog = ve.clickImageButton();
mediaDialog = mediaDialog.searchMedia("h");
ve = mediaDialog.addExistingMedia(1);
ve.verifyVideos(1);
ve.selectMedia();
VisualEditorMediaSettingsDialog mediaSettingsDialog = ve.openMediaSettings();
mediaSettingsDialog.typeCaption(captionText);
ve = mediaSettingsDialog.clickApplyChangesButton();
ve.verifyVideoCaption(captionText);
ve.publish();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog in project selenium-tests by Wikia.
the class VEImageTests method previewImage.
@Test(groups = { "VEImageTests", "VEMediaPreview" })
@Execute(asUser = User.USER_9)
public void previewImage() {
String mediaTitle = "Thomas Wright 1792 - 1849";
VisualEditorPageObject ve = new VisualEditorPageObject().openVEOnArticle(wikiURL, PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis());
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
VisualEditorAddMediaDialog mediaDialog = ve.clickImageButton();
mediaDialog = mediaDialog.searchMedia(mediaTitle);
ve = mediaDialog.previewExistingPhotoByTitle(mediaTitle);
ve.verifyPreviewImage();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog in project selenium-tests by Wikia.
the class VEVideoTests method addExistingVideo.
@Test(groups = { "VEVideo", "VEAddExistingVideo" })
@Execute(asUser = User.USER)
public void addExistingVideo() {
VisualEditorPageObject ve = new VisualEditorPageObject().openVEOnArticle(wikiURL, PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis());
VisualEditorAddMediaDialog mediaDialog = ve.searchVideo("y");
VisualEditorPageObject veNew = mediaDialog.addExistingMedia(2);
veNew.verifyVideos(2);
veNew.verifyVEToolBarPresent();
veNew.publish();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog in project selenium-tests by Wikia.
the class VEVideoTests method previewVideo.
@Test(groups = { "VEVideo", "VEVideoPreview" })
@Execute(asUser = User.USER_9)
public void previewVideo() {
String mediaTitle = "Short film directed by Guy Ritchie starring David Beckham - H&M Spring 2013";
String articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
VisualEditorPageObject ve = new VisualEditorPageObject().openVEOnArticle(wikiURL, articleName);
VisualEditorAddMediaDialog mediaDialog = ve.searchVideo(mediaTitle);
ve = mediaDialog.previewExistingVideoByTitle(mediaTitle);
ve.verifyPreviewVideo();
}
Aggregations