Search in sources :

Example 6 with SpecialVersionPage

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);
}
Also used : ChatPage(com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage) SpecialVersionPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage) Test(org.testng.annotations.Test)

Example 7 with SpecialVersionPage

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");
}
Also used : ChatPage(com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage) SpecialVersionPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage) Test(org.testng.annotations.Test)

Example 8 with SpecialVersionPage

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");
}
Also used : ChatPage(com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage) SpecialVersionPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage) Test(org.testng.annotations.Test)

Example 9 with SpecialVersionPage

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");
}
Also used : ChatPage(com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage) SpecialVersionPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage) Test(org.testng.annotations.Test)

Example 10 with SpecialVersionPage

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);
}
Also used : ChatPage(com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage) SpecialVersionPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage) Test(org.testng.annotations.Test)

Aggregations

SpecialVersionPage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage)18 Test (org.testng.annotations.Test)18 ChatPage (com.wikia.webdriver.pageobjectsfactory.pageobject.chatpageobject.ChatPage)16 Execute (com.wikia.webdriver.common.core.annotations.Execute)2 GlobalNavigation (com.wikia.webdriver.pageobjectsfactory.pageobject.globalnav.GlobalNavigation)2 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)1