Search in sources :

Example 6 with VisualEditorPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject 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();
}
Also used : VisualEditorInsertGalleryDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertGalleryDialog) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) Test(org.testng.annotations.Test)

Example 7 with VisualEditorPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject 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();
}
Also used : VisualEditorAddMediaDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArrayList(java.util.ArrayList) VisualEditorReviewChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 8 with VisualEditorPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject 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();
}
Also used : VisualEditorMediaSettingsDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorMediaSettingsDialog) VisualEditorAddMediaDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 9 with VisualEditorPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject 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();
}
Also used : VisualEditorAddMediaDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 10 with VisualEditorPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject in project selenium-tests by Wikia.

the class VERecaptchaTests method VEAddRecaptchaTests_001_AddExternalURL.

// Verify that second click on "Save page" button changes recaptcha.
@Test(groups = { "VERecaptchaTests", "VEAddRecaptcha_001", "VEAnon" })
public void VEAddRecaptchaTests_001_AddExternalURL() {
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve.typeTextArea(URLsContent.EXTERNAL_URL);
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    saveDialog = saveDialog.clickSaveWithRecaptcha();
    saveDialog.verifyRecaptchaImageSrc();
    String firstImgSrc = saveDialog.getRecaptchaImageSrc();
    saveDialog = saveDialog.clickSaveWithRecaptcha();
    saveDialog.verifyRecaptchaIsVisible();
    saveDialog.verifyRecaptchaImageSrc();
    saveDialog.verifyIsNewRecaptcha(firstImgSrc);
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test)

Aggregations

VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)85 Test (org.testng.annotations.Test)69 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)44 VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)17 Execute (com.wikia.webdriver.common.core.annotations.Execute)15 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)12 WebElement (org.openqa.selenium.WebElement)11 VisualEditorReviewChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog)9 VisualEditorAddMediaDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog)7 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)7 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)6 VisualEditorOptionsDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorOptionsDialog)5 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)4 VisualEditorInsertGalleryDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertGalleryDialog)4 VisualEditorInsertTemplateDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog)4 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)4 ArrayList (java.util.ArrayList)4 VisualEditorAddMapDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMapDialog)3 VisualEditorEditTemplateDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorEditTemplateDialog)3 WikiHistoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.WikiHistoryPageObject)2