Search in sources :

Example 56 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class VisualEditorEntryTests method VisualEditorEntryTest_007_template.

@Test(groups = { "VisualEditorEntry", "VisualEditorEntryTest_007", "templateEntry" }, dataProviderClass = VisualEditorDataProvider.class, dataProvider = "templateEntryPoints")
public void VisualEditorEntryTest_007_template(boolean isRTEext, boolean isVEext, EditorPref editorPref, Editor expectedEditor) {
    wikiURL = urlBuilder.getUrlForWiki(VisualEditorDataProvider.getTestWiki(isRTEext, isVEext));
    ArticlePageObject article = new ArticlePageObject();
    article.loginAs(credentials.getUserBaseOnEditorPref(editorPref), credentials.getPassBaseOnEditorPref(editorPref), wikiURL);
    article.open(URLsContent.TEMPLATE_PAGE);
    article.verifyMainEditEditor(expectedEditor);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Test(org.testng.annotations.Test)

Example 57 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class NavigationBar method ArrowDownAndEnterSuggestion.

/**
   * Arrow down through suggestions, and click enter on the desired one
   */
public ArticlePageObject ArrowDownAndEnterSuggestion(String suggestionText) {
    wait.forElementVisible(suggestionsList.get(0));
    int position = 0;
    for (WebElement suggestion : suggestionsList) {
        if (suggestion.getText().contains(suggestionText)) {
            position++;
        }
    }
    Assertion.assertNotEquals(0, position, "suggestion " + suggestionText + "not found");
    if (position != 0) {
        for (int i = 0; i < position; i++) {
            searchInput.sendKeys(Keys.ARROW_DOWN);
        }
        searchInput.sendKeys(Keys.ENTER);
        PageObjectLogging.log("ArrowDownToSuggestion", "arrowed down to desired suggestion" + suggestionText + "and clicked enter", true);
        return new ArticlePageObject();
    } else {
        return null;
    }
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) WebElement(org.openqa.selenium.WebElement)

Example 58 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class InteractiveMapPageObject method openEmbedMapPageEdit.

public WikiArticleEditMode openEmbedMapPageEdit(String wikiURL) {
    ArticlePageObject article = new ArticlePageObject();
    article.navigateToArticleEditPage(wikiURL, URLsContent.EMBEDED_MAP_ARTICLE);
    return new WikiArticleEditMode();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) WikiArticleEditMode(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.editmode.WikiArticleEditMode)

Example 59 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class CreateNewWikiPageObjectStep3 method submit.

public ArticlePageObject submit() {
    changeImplicitWait(250, TimeUnit.MILLISECONDS);
    try {
        new WebDriverWait(driver, 180).until(CommonExpectedConditions.elementNotPresent(loadingIndicatorBy));
    } finally {
        restoreDefaultImplicitWait();
    }
    scrollAndClick(submitButton);
    PageObjectLogging.log("submit", "Submit button clicked", true, driver);
    return new ArticlePageObject();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) WebDriverWait(org.openqa.selenium.support.ui.WebDriverWait)

Example 60 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class CategoriesArticleTests method CategoriesTestsArticle_005_anonEdit.

@Test(groups = { "CategoriesTestsArticle_005", "CategoriesTestsArticle" })
public void CategoriesTestsArticle_005_anonEdit() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    ArticlePageObject article = new ArticlePageObject().open();
    String categoryName = PageContent.CATEGORY_NAME_PREFIX + DateTime.now().getMillis();
    article.addCategory(categoryName);
    EditCategoryComponentObject editCategory = article.editCategory(categoryName);
    categoryName = PageContent.CATEGORY_NAME_PREFIX + DateTime.now().getMillis();
    editCategory.editCategoryName(categoryName);
    article.submitCategory();
    article.verifyCategoryPresent(categoryName);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) EditCategoryComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.editcategory.EditCategoryComponentObject) Test(org.testng.annotations.Test)

Aggregations

ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)181 Test (org.testng.annotations.Test)169 Execute (com.wikia.webdriver.common.core.annotations.Execute)68 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)51 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)44 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)41 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)39 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)35 VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)16 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)15 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)14 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)11 VisualEditorReviewChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog)9 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)7 SalesPitchDialog (com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SalesPitchDialog)7 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)6 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)6 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)5 EmbedMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.EmbedMapComponentObject)5 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)4