Search in sources :

Example 11 with VisualEditorSaveChangesDialog

use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog in project selenium-tests by Wikia.

the class VisualEditorMenu method clickPublishButton.

public VisualEditorSaveChangesDialog clickPublishButton() {
    wait.forElementNotPresent(publishButtonDisabled);
    wait.forElementVisible(enabledPublishButton);
    WebElement publishButton = enabledPublishButton.findElement(labelBy);
    wait.forElementClickable(publishButton);
    publishButton.click();
    return new VisualEditorSaveChangesDialog(driver);
}
Also used : WebElement(org.openqa.selenium.WebElement) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)

Example 12 with VisualEditorSaveChangesDialog

use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog 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();
}
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) VisualEditorOptionsDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorOptionsDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test)

Example 13 with VisualEditorSaveChangesDialog

use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog 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 14 with VisualEditorSaveChangesDialog

use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog 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 15 with VisualEditorSaveChangesDialog

use of com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog 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

VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)18 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)17 Test (org.testng.annotations.Test)17 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)16 VisualEditorReviewChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog)9 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)6 ArrayList (java.util.ArrayList)4 VisualEditorEditTemplateDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorEditTemplateDialog)3 VisualEditorOptionsDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorOptionsDialog)3 Execute (com.wikia.webdriver.common.core.annotations.Execute)2 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)2 VisualEditorInsertTemplateDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog)2 WikiHistoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.WikiHistoryPageObject)2 VisualEditorAddMapDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMapDialog)1 VisualEditorAddMediaDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog)1 VisualEditorHyperLinkDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorHyperLinkDialog)1 WebElement (org.openqa.selenium.WebElement)1