Search in sources :

Example 1 with SpecialVersionPage

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

Example 2 with SpecialVersionPage

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

Example 3 with SpecialVersionPage

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

Example 4 with SpecialVersionPage

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

Example 5 with SpecialVersionPage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVersionPage 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);
}
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