Search in sources :

Example 6 with GuidelinesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage in project selenium-tests by Wikia.

the class GuidelinesTests method discussionsModeratorOnDesktopCanSeeGuidelinesHeroUnit.

@Test(groups = "discussions-discussionsModeratorOnDesktopCanSeeGuidelinesHeroUnit")
@Execute(asUser = User.DISCUSSIONS_MODERATOR)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void discussionsModeratorOnDesktopCanSeeGuidelinesHeroUnit() {
    GuidelinesPage guidelinesPage = new GuidelinesPage();
    guidelinesPage.open();
    Assertion.assertTrue(guidelinesPage.isGuidelinesHeroUnitDisplayed());
}
Also used : GuidelinesPage(com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 7 with GuidelinesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage in project selenium-tests by Wikia.

the class GuidelinesTests method regularUserOnDesktopCanNotClickEditGuidelines.

@Test(groups = "discussions-regularUserOnDesktopCanNotSeeEditGuidelines")
@Execute(asUser = User.USER_6)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void regularUserOnDesktopCanNotClickEditGuidelines() {
    GuidelinesPage guidelinesPage = new GuidelinesPage();
    guidelinesPage.open();
    Assertion.assertFalse(guidelinesPage.isEditButtonDisplayed());
}
Also used : GuidelinesPage(com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 8 with GuidelinesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage in project selenium-tests by Wikia.

the class SearchMercuryTests method mercury_search_userIsRedirectedToSearchResultsPage.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_userIsRedirectedToSearchResultsPage", "Mercury_Search_001" })
public void mercury_search_userIsRedirectedToSearchResultsPage() {
    SearchResultsPage searchResults = new GuidelinesPage().open().getTopBar().openSearch().typeInSearch(SEARCH_PHRASE).clickEnterAndNavigateToSearchResults(Skin.MERCURY);
    Assertion.assertTrue(searchResults.isSearchResultsPageOpen());
}
Also used : SearchResultsPage(com.wikia.webdriver.elements.mercury.pages.SearchResultsPage) GuidelinesPage(com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 9 with GuidelinesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage in project selenium-tests by Wikia.

the class SearchMercuryTests method mercury_search_navigateUsingSearchSuggestionsOnMobile.

@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_navigateUsingSearchSuggestionsOnMobile", "Mercury_Search_001" })
public void mercury_search_navigateUsingSearchSuggestionsOnMobile() {
    String clickedSuggestion = new GuidelinesPage().open().getTopBar().openSearch().typeInSearch(SEARCH_PHRASE).clickSearchSuggestion(0, Skin.MERCURY);
    Assertion.assertTrue(new SkinHelper(driver).isSkin(Skin.MOBILE_WIKI));
    Assertion.assertEquals(clickedSuggestion.toLowerCase(), new ArticlePage().getHeader().getPageTitle().toLowerCase());
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) SkinHelper(com.wikia.webdriver.common.skin.SkinHelper) GuidelinesPage(com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 10 with GuidelinesPage

use of com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage in project selenium-tests by Wikia.

the class GuidelinesTests method anonUserOnDesktopCanSeeGuidelinesHeroUnit.

@Test(groups = "discussions-anonUserOnDesktopCanSeeGuidelinesHeroUnit")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanSeeGuidelinesHeroUnit() {
    GuidelinesPage guidelinesPage = new GuidelinesPage();
    guidelinesPage.open();
    Assertion.assertTrue(guidelinesPage.isGuidelinesHeroUnitDisplayed());
}
Also used : GuidelinesPage(com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage) 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)17 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)17 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 Test (org.testng.annotations.Test)17 DiscussionsPage (com.wikia.webdriver.elements.mercury.pages.discussions.DiscussionsPage)4 SkinHelper (com.wikia.webdriver.common.skin.SkinHelper)2 ArticlePage (com.wikia.webdriver.elements.mercury.pages.ArticlePage)1 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)1 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)1