use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage 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.special.SpecialVersionPage 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.special.SpecialVersionPage 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.special.SpecialVersionPage 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");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage in project selenium-tests by Wikia.
the class ChatTests method userCanSendMessageOnWallAndPrivate.
@Test
public void userCanSendMessageOnWallAndPrivate() {
ChatPage chatUserThree = openChatForUser(userThree, userThreePassword);
switchToWindow(1);
new SpecialVersionPage().open();
ChatPage chatUserFour = openChatForUser(userFour, userFourPassword);
chatUserFour.writeOnChat(MESSAGE_ON_MAIN_CHAT);
switchToWindow(0);
Assertion.assertTrue(chatUserFour.isMessageOnChat(MESSAGE_ON_MAIN_CHAT), MESSAGE_ON_CHAT_NOT_DISPLAYED_ERROR);
switchToWindow(1);
chatUserFour.selectPrivateMessageToUser(userThree);
Assertion.assertTrue(chatUserFour.isPrivateMessageHeaderDisplayed());
chatUserFour.writeOnChat(MESSAGE_ON_PRIVATE_CHAT);
switchToWindow(0);
Assertion.assertTrue(chatUserThree.isPrivateMessageHeaderDisplayed(), "PRIVATE MESSAGE HEDER IS NOT DISPLAYED");
Assertion.assertTrue(chatUserThree.isPrivateMessageNotificationDisplayed(), "PRIVATE MESSAGE NOTIFICATION ARE NOT DISPLAYED");
chatUserThree.clickOnUserInPrivateMessageSection(userFour);
Assertion.assertTrue(chatUserThree.isMessageOnChat(MESSAGE_ON_PRIVATE_CHAT), MESSAGE_ON_CHAT_NOT_DISPLAYED_ERROR);
}
Aggregations