use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTests method regularUserCanOpenMessageWall.
@Test
public void regularUserCanOpenMessageWall() {
openChatForUser(userOne, userOnePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserFive = openChatForUser(userFive, userFivePassword);
chatUserFive.clickOnDifferentUser(userOne);
chatUserFive.clickOpenUserMessageWall();
chatUserFive.switchToSecondTab(currentBrowserTab());
Assertion.assertTrue(chatUserFive.isMessageWallOpened(userOne), "MESSAGE WALL TAB IS NOT OPENED");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTests method staffCanBanUser.
@Test
public void staffCanBanUser() {
ChatPage userToBeBaned = openChatForUser(userToBeBanned, userToBeBannedPassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserStaff = openChatForUser(userStaff, userStaffPassword);
chatUserStaff.clickOnDifferentUser(userToBeBanned);
chatUserStaff.banUser(userToBeBanned);
switchToWindow(0);
try {
Assertion.assertTrue(userToBeBaned.isUserKickedFromChat(), "BANED USER IS ABLE TO WRITE MESSAGE");
} finally {
switchToWindow(1);
chatUserStaff.unBanUser(userToBeBanned);
}
Assertion.assertTrue(chatUserStaff.isChatUnbanMessageDisplayed(userToBeBanned), "UNBAN MESSAGE IS NOT DISPLAYED");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTests method userCanNotBlockPrivateMessagesFromStaff.
@Test
public void userCanNotBlockPrivateMessagesFromStaff() {
openChatForUser(userStaff, userStaffPassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserOne = openChatForUser(userOne, userOnePassword);
chatUserOne.clickOnDifferentUser(userStaff);
chatUserOne.selectPrivateMessageToUser(userStaff);
chatUserOne.openUserDropDownInPrivateMessageSection(userStaff);
Assertion.assertFalse(chatUserOne.isBlockPrivateMessageButtonDisplayed(), "USER CAN BLOCK PRIVATE MESSAGES FROM STAFF");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTestsStaff method staffUserCanNotBlockPrivateMessages.
@Test
public void staffUserCanNotBlockPrivateMessages() {
openChatForUser(credentials.userNameStaff, credentials.passwordStaff);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserStaff2 = openChatForUser(credentials.userNameStaff2, credentials.passwordStaff2);
chatUserStaff2.selectPrivateMessageToUser(credentials.userNameStaff);
Assertion.assertTrue(chatUserStaff2.isPrivateChatOpen(), "PRIVATE CHAT IS NOT OPENED");
chatUserStaff2.clickOnUserInPrivateMessageSection(credentials.userNameStaff);
Assertion.assertFalse(chatUserStaff2.isBlockPrivateMessageButtonDisplayed(), "BLOCK PRIVATE MESSAGE BUTTON IS DISPLAYED");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTestsStaff method verifyStaffUsersCanSwitchBetweenMainAndPrivateSections.
@Test
public void verifyStaffUsersCanSwitchBetweenMainAndPrivateSections() {
ChatPage chatUserOne = openChatForUser(credentials.userNameStaff, credentials.passwordStaff);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserTwo = openChatForUser(credentials.userNameStaff2, credentials.passwordStaff2);
chatUserTwo.writeOnChat(MESSAGE_ON_MAIN_CHAT);
switchToWindow(0);
Assertion.assertTrue(chatUserOne.isMessageOnChat(MESSAGE_ON_MAIN_CHAT), MESSAGE_ON_CHAT_NOT_DISPLAYED_ERROR);
chatUserOne.selectPrivateMessageToUser(credentials.userNameStaff2);
Assertion.assertTrue(chatUserOne.isPrivateChatOpen(), "PRIVATE CHAT IS NOT OPENED");
chatUserOne.clickOnMainChat();
Assertion.assertTrue(chatUserOne.isMessageOnChat(MESSAGE_ON_MAIN_CHAT), MESSAGE_ON_CHAT_NOT_DISPLAYED_ERROR);
}
Aggregations