Search in sources :

Example 36 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class CommunityPageSalesPitchDialogTests method verifyEditPageIsNotCountedAsPageview.

@Execute(disableCommunityPageSalesPitchDialog = "false")
public void verifyEditPageIsNotCountedAsPageview() {
    String articleTitle = PageContent.ARTICLE_NAME_PREFIX + ArticlePageObject.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject();
    // 2nd pageview
    article.open(articleTitle);
    article.navigateToArticleEditPage();
    // 3rd pageview
    article.open(articleTitle);
    article.navigateToArticleEditPage();
    // 4th pageview
    article.open(articleTitle);
    Assertion.assertTrue(new SalesPitchDialog().isDialogVisible());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SalesPitchDialog(com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SalesPitchDialog) Execute(com.wikia.webdriver.common.core.annotations.Execute)

Example 37 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class CommunityPageSalesPitchDialogTests method verifyDialogContentRedirectToSpecialCommunity.

@Execute(disableCommunityPageSalesPitchDialog = "false")
public void verifyDialogContentRedirectToSpecialCommunity() {
    String articleTitle = PageContent.ARTICLE_NAME_PREFIX + ArticlePageObject.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject();
    // 2nd pageview
    article.open(articleTitle);
    // 3rd pageview
    article.open(articleTitle);
    // 4th pageview
    article.open(articleTitle);
    Assertion.assertTrue(new SalesPitchDialog().clickDialogContent().isCommunityPageOpen());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SalesPitchDialog(com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SalesPitchDialog) Execute(com.wikia.webdriver.common.core.annotations.Execute)

Example 38 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class SpecialCommunityPageTests method verifyUserEditingFlow.

@Execute(onWikia = "muppet", asUser = User.USER, mockAds = "true")
public void verifyUserEditingFlow() {
    SpecialCommunity page = new SpecialCommunity();
    WebElement link = page.getLinkFromCards();
    String url = getEditUrl(link.getText(), "action=edit");
    link.click();
    Assertion.assertEquals(url, page.getCurrentUrl());
}
Also used : WebElement(org.openqa.selenium.WebElement) SpecialCommunity(com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SpecialCommunity) Execute(com.wikia.webdriver.common.core.annotations.Execute)

Example 39 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class CategoriesTests method discussionsAdministratorOnMobileCanEditCategory.

@Test(groups = { MOBILE })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR, onWikia = MercuryWikis.DISCUSSIONS_MOBILE)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void discussionsAdministratorOnMobileCanEditCategory() {
    CategoryPill.Data editableCategory = setUp(MercuryWikis.DISCUSSIONS_MOBILE);
    final PostsListPage page = new PostsListPage().open(siteId);
    final String editedName = createUniqueCategoryName();
    CategoriesFieldset categoriesFieldset = page.getFiltersPopOver().click().getCategoriesFieldset().clickEdit().renameMobile(editableCategory.getName(), editedName).clickApproveButton();
    page.waitForPageReload();
    CategoryPill.Data editedCategory = categoriesFieldset.findCategoryOrElseThrow(editedName);
    try {
        assertTrue(categoriesFieldset.hasCategory(editedName), String.format(CATEGORY_SHOULD_BE_VISILBE_IN_LIST_MESSAGE, editedName));
        assertTrue(isCategoryIn(page.getPostsCreatorMobile(), editedName), String.format(CATEGORY_SHOULD_BE_VISIBLE_IN_CREATOR_MESSAGE, editedName));
    } finally {
        cleanUp(editedCategory);
    }
}
Also used : CategoryPill(com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill) PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) CategoriesFieldset(com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 40 with Execute

use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.

the class CategoriesTests method discussionsAdministratorOnDesktopCanAddCategory.

@Test(groups = { DESKTOP })
@Execute(asUser = User.DISCUSSIONS_ADMINISTRATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsAdministratorOnDesktopCanAddCategory() {
    final PostsListPage page = new PostsListPage().open(siteId);
    final String categoryName = createUniqueCategoryName();
    final CategoriesFieldset categoriesFieldset = addCategory(page.getCategories(), categoryName);
    page.waitForPageReload();
    final CategoryPill.Data data = categoriesFieldset.findCategoryOrElseThrow(categoryName);
    try {
        assertTrue(categoriesFieldset.hasCategory(categoryName), String.format(CATEGORY_SHOULD_BE_VISILBE_IN_LIST_MESSAGE, categoryName));
        assertTrue(isCategoryIn(page.getPostsCreatorDesktop(), categoryName), String.format(CATEGORY_SHOULD_BE_VISIBLE_IN_CREATOR_MESSAGE, categoryName));
    } finally {
        removeCategoryRemotely(siteId, data);
    }
}
Also used : CategoryPill(com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill) PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) CategoriesFieldset(com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)413 Test (org.testng.annotations.Test)402 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)146 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)72 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)68 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)58 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)55 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)30 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)30 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)24 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)23 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)22 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)21 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)19 ForumPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage)18 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)17