use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTestsStaff method openChatForUser.
private ChatPage openChatForUser(String userName, String password) {
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(userName, password, wikiURL);
return new ChatPage().open();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTests method blockedUserMessagesAreNotDisplayed.
@Test
public void blockedUserMessagesAreNotDisplayed() {
ChatPage chatUserOne = openChatForUser(userOne, userOnePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserFive = openChatForUser(userFive, userFivePassword);
chatUserFive.clickOnDifferentUser(userOne);
chatUserFive.selectPrivateMessageToUser(userOne);
switchToWindow(0);
chatUserOne.clickOnDifferentUser(userFive);
chatUserOne.selectPrivateMessageToUser(userFive);
chatUserOne.clickOnUserInPrivateMessageSection(userFive);
chatUserOne.blockPrivateMessageFromUser(userFive);
switchToWindow(1);
chatUserFive.clickOnUserInPrivateMessageSection(userOne);
chatUserFive.writeOnChat(MESSAGE_ON_MAIN_CHAT);
switchToWindow(0);
try {
Assertion.assertFalse(chatUserOne.isUserInPrivateSectionDisplayed(userFive), "USER IS DISPLAYED IN PRIVATE SECTION");
} finally {
chatUserOne.allowPrivateMessageFromUser(userFive);
}
Assertion.assertTrue(chatUserOne.isUserInPrivateSectionDisplayed(userFive), USER_IN_PRIVATE_SECTION_NOT_DISPLAYED_ERROR);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTests method usreCanSendMultipleNotifications.
@Test
public void usreCanSendMultipleNotifications() {
ChatPage chatUserFive = openChatForUser(userFive, userFivePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserSix = openChatForUser(userSix, userSixPassword);
chatUserSix.writeOnChat(MESSAGE_ON_MAIN_CHAT);
switchToWindow(0);
Assertion.assertTrue(chatUserFive.isMessageOnChat(MESSAGE_ON_MAIN_CHAT), "MESAGE ON PRIVATE CHAT IS NOT DISPLAYED");
switchToWindow(1);
chatUserSix.selectPrivateMessageToUser(userFive);
Assertion.assertTrue(chatUserSix.isUserInPrivateSectionDisplayed(userFive));
List<String> messagesSent = chatUserSix.sendMultipleMessagesFromUser(MESSAGE_ON_PRIVATE_CHAT, NUMBER_OF_PRIVATE_MESSAGES);
switchToWindow(0);
Assertion.assertTrue(chatUserFive.isPrivateNotificationCountDisplayed(messagesSent.size()), "PRIVATE MESSAGES COUNTER IS NOT CORRECT");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTests method dropDownMenuForRegularUser.
@Test
public void dropDownMenuForRegularUser() {
ChatPage chatUserOne = openChatForUser(userOne, userOnePassword);
switchToWindow(1);
new SpecialVersionPage().open();
openChatForUser(userTwo, userTwoPassword);
switchToWindow(0);
chatUserOne.clickOnDifferentUser(userTwo);
Assertion.assertTrue(chatUserOne.isRegularUserDropdownDisplayed(), "REGULAR USER DROBDOWN IS NOT DISPLAYED");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage in project selenium-tests by Wikia.
the class ChatTests method regularUserCanOpenContributions.
@Test
public void regularUserCanOpenContributions() {
openChatForUser(userOne, userOnePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserFive = openChatForUser(userFive, userFivePassword);
chatUserFive.clickOnDifferentUser(userOne);
chatUserFive.clickOpenUserContributions();
chatUserFive.switchToSecondTab(currentBrowserTab());
Assertion.assertTrue(chatUserFive.isContributionsPageOpened(userOne), "CONTRIBUTION TAB IS NOT OPENED");
}
Aggregations