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());
}
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());
}
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);
}
Aggregations