Search in sources :

Example 51 with VisualEditorPageObject

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

Example 52 with VisualEditorPageObject

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

Example 53 with VisualEditorPageObject

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

the class VECopyAndPasteTests method VECopyAndPasteTests_001_copyAndPaste.

@Test(groups = { "VECopyAndPasteTests", "VECopyAndPasteTests_001" })
@RelatedIssue(issueID = "QAART-888")
public void VECopyAndPasteTests_001_copyAndPaste() throws InterruptedException {
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    String text = PageContent.ARTICLE_TEXT;
    ve.typeTextArea(text);
    ve.copyAndPaste();
    ve.verifyFormatting(Formatting.PARAGRAPH, text + text);
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyFormattingFromVE(Formatting.PARAGRAPH, text + text);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 54 with VisualEditorPageObject

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

the class VisualEditorEditingTests method VisualEditorEditing_006_editSummary.

@Test(groups = { "VisualEditorEditing", "VisualEditorEditing_006" })
public void VisualEditorEditing_006_editSummary() {
    String summaryText = "This is an example summary text being used by test: VisualEditorEditing_006_editSummary";
    String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve.typeTextArea("a");
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    saveDialog.typeEditSummary(summaryText);
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
    WikiHistoryPageObject historyPage = article.openArticleHistoryPage();
    historyPage.verifyLatestEditSummary(summaryText);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) WikiHistoryPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.WikiHistoryPageObject) Test(org.testng.annotations.Test)

Example 55 with VisualEditorPageObject

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

the class VisualEditorEditingTests method VisualEditorEditing_005_switchToSourceMode.

@Test(groups = { "VisualEditorEditing", "VisualEditorEditing_005" })
public void VisualEditorEditing_005_switchToSourceMode() {
    String articleName2 = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditorPageObject ve = base.openVEOnArticle(wikiURL, articleName2);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve = ve.typeInSourceEditor(text);
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyAddedDiffs(firstSourceEditText);
    ve = reviewDialog.closeDialog();
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve = ve.typeInSourceEditor(text);
    saveDialog = ve.clickPublishButton();
    reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyAddedDiffs(secondSourceEditText);
    saveDialog = reviewDialog.clickReturnToSaveFormButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
    article.verifyContent(text);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorReviewChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog) 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