Search in sources :

Example 1 with SpecialCommunity

use of com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SpecialCommunity in project selenium-tests by Wikia.

the class SpecialCommunityPageTests method verifyAnonEditingFlow.

@Execute(onWikia = "mediawiki119", asUser = User.ANONYMOUS, mockAds = "true")
public void verifyAnonEditingFlow() {
    SpecialCommunity page = new SpecialCommunity();
    WebElement link = page.getLinkFromCards();
    String url = getEditUrl(link.getText(), "veaction=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 2 with SpecialCommunity

use of com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SpecialCommunity 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 3 with SpecialCommunity

use of com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SpecialCommunity in project selenium-tests by Wikia.

the class SpecialCommunityPageTests method verifyAnonEditingForbiddenFlow.

@Execute(onWikia = "muppet", asUser = User.ANONYMOUS, mockAds = "true")
public void verifyAnonEditingForbiddenFlow() {
    SpecialCommunity page = new SpecialCommunity();
    // click the first link from any card
    WebElement link = page.getLinkFromCards();
    String url = getEditUrl(link.getText(), "veaction=edit");
    link.click();
    // should be at register page
    Assertion.assertTrue(page.isStringInURL(urlBuilder.getUrlForPage("www", "/signin")));
    page.loginAs(User.USER);
    // we are back to link
    Assertion.assertEquals(page.getCurrentUrl(), url);
}
Also used : WebElement(org.openqa.selenium.WebElement) SpecialCommunity(com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SpecialCommunity) Execute(com.wikia.webdriver.common.core.annotations.Execute)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)3 SpecialCommunity (com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SpecialCommunity)3 WebElement (org.openqa.selenium.WebElement)3