use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class CreatingReplyTests method anonUserOnMobileCanNotWriteNewReply.
// Anonymous on mobile
@Test(groups = MOBILE)
@Execute(asUser = User.ANONYMOUS, onWikia = MercuryWikis.DISCUSSIONS_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void anonUserOnMobileCanNotWriteNewReply() {
final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
userOnMobileMustBeLoggedInToUseReplyCreator(page.getReplyCreatorMobile());
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class CreatingReplyTests method userOnMobileShouldFollowPostWhenAddedReplyOnPostDetailsPage.
@Test(groups = MOBILE)
@Execute(asUser = User.USER_2, onWikia = MercuryWikis.DISCUSSIONS_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileShouldFollowPostWhenAddedReplyOnPostDetailsPage() {
final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
final ReplyCreator replyCreator = page.getReplyCreatorMobile();
assertThatPostIsFollowedWhenReplyAdded(page, replyCreator);
assertThatPostCanBeUnfollowed(page);
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class CreatingReplyTests method userOnDesktopCanCreateReplyOnPostDetailsPage.
@Test(groups = DESKTOP)
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanCreateReplyOnPostDetailsPage() {
final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
final ReplyCreator replyCreator = page.getReplyCreatorDesktop();
assertThatUserCanCreateReply(page, replyCreator);
}
use of com.wikia.webdriver.common.core.annotations.InBrowser 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);
}
}
use of com.wikia.webdriver.common.core.annotations.InBrowser 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);
}
}
Aggregations