use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage in project selenium-tests by Wikia.
the class ChatTests method verifySwitchingBetweenMainAndPrivateSections.
@Test
public void verifySwitchingBetweenMainAndPrivateSections() {
ChatPage chatUserOne = openChatForUser(userOne, userOnePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserTwo = openChatForUser(userTwo, userTwoPassword);
chatUserTwo.writeOnChat(MESSAGE_ON_MAIN_CHAT);
switchToWindow(0);
Assertion.assertTrue(chatUserOne.isMessageOnChat(MESSAGE_ON_MAIN_CHAT), MESSAGE_ON_CHAT_NOT_DISPLAYED_ERROR);
chatUserOne.selectPrivateMessageToUser(userTwo);
Assertion.assertTrue(chatUserOne.isUserInPrivateSectionDisplayed(userTwo), USER_IN_PRIVATE_SECTION_NOT_DISPLAYED_ERROR);
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);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage in project selenium-tests by Wikia.
the class ChatTests method blockedUserCanNotCreatePrivateMessage.
@Test
public void blockedUserCanNotCreatePrivateMessage() {
ChatPage chatUserOne = openChatForUser(userOne, userOnePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserFive = openChatForUser(userFive, userFivePassword);
switchToWindow(0);
chatUserOne.clickOnDifferentUser(userFive);
chatUserOne.selectPrivateMessageToUser(userFive);
Assertion.assertTrue(chatUserOne.isUserInPrivateSectionDisplayed(userFive));
chatUserOne.clickOnUserInPrivateMessageSection(userFive);
chatUserOne.blockPrivateMessageFromUser(userFive);
switchToWindow(1);
chatUserFive.refreshPage();
chatUserFive.clickOnDifferentUser(userOne);
Assertion.assertFalse(chatUserFive.isPrivateMessageButtonDisplayed(), "PRIVATE MESSAGE BUTTON IS DISPLAYED");
switchToWindow(0);
chatUserOne.allowPrivateMessageFromUser(userFive);
Assertion.assertTrue(chatUserOne.isUserInPrivateSectionDisplayed(userFive), USER_IN_PRIVATE_SECTION_NOT_DISPLAYED_ERROR);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage in project selenium-tests by Wikia.
the class ChatTests method userCanBeKickedOutFromChat.
@Test
public void userCanBeKickedOutFromChat() {
ChatPage chatUserOne = openChatForUser(userOne, userOnePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatStaffUser = openChatForUser(userStaff, userStaffPassword);
chatStaffUser.clickOnDifferentUser(userOne);
chatStaffUser.clickOnUserOptionsKickButton();
switchToWindow(0);
Assertion.assertTrue(chatUserOne.isUserKickedFromChat(), "USER IS NOT KICKED FROM CHAT");
}
Aggregations