Search in sources :

Example 1 with NotificationsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject in project selenium-tests by Wikia.

the class MessageWallNotificationsFollowersMessageTests method userIsNotifiedWhenOtherUserWritesMessageOnFollowedMessageWal.

@Test(groups = { "MessageWallNotificationsFollowersMessageTests_003" }, dependsOnMethods = "followerNotificationNewMessage_setup_2")
public void userIsNotifiedWhenOtherUserWritesMessageOnFollowedMessageWal() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userName5, credentials.password5, wikiURL);
    NotificationsComponentObject notifications = new NotificationsComponentObject(driver);
    notifications.showNotifications();
    notifications.verifyNotification(title, credentials.userName6);
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) NotificationsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject) Test(org.testng.annotations.Test)

Example 2 with NotificationsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject in project selenium-tests by Wikia.

the class MessageWallNotificationsOwnerTests method userIsNotifiedWhenOtherUserWritesMessageOnHerMessageWal.

@Test(groups = { "MessageWallNotificationsOwnerTests_002" }, dependsOnMethods = "wallOwnerReceivesNotification_setup")
public void userIsNotifiedWhenOtherUserWritesMessageOnHerMessageWal() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userName10, credentials.password10, wikiURL);
    NotificationsComponentObject notifications = new NotificationsComponentObject(driver);
    notifications.showNotifications();
    notifications.verifyNotification(title, credentials.userName9);
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) NotificationsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject) Test(org.testng.annotations.Test)

Example 3 with NotificationsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject in project selenium-tests by Wikia.

the class MessageWallNotificationsThreadParticipantTests method userIsNotifiedWhenOtherUserWritesResponseToHerResponseOnMessageWal.

@Test(groups = { "MessageWallNotificationsThreadParticipantTests_004" }, dependsOnMethods = "threadCreatorNotification_setup_3")
public void userIsNotifiedWhenOtherUserWritesResponseToHerResponseOnMessageWal() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userName4, credentials.password4, wikiURL);
    NotificationsComponentObject notifications = new NotificationsComponentObject(driver);
    notifications.showNotifications();
    notifications.verifyNotification(title, credentials.userName3, "replied to " + credentials.userName3);
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) NotificationsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject) Test(org.testng.annotations.Test)

Example 4 with NotificationsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject in project selenium-tests by Wikia.

the class MessageWallNotificationsThreadCreatorTests method userIsNotifiedWhenOtherUserWritesResponseOnHerMessageWal.

@Test(groups = { "MessageWallNotificationsThreadCreatorTests_003" }, dependsOnMethods = "threadCreatorNotification_setup_2")
public void userIsNotifiedWhenOtherUserWritesResponseOnHerMessageWal() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userName11, credentials.password11, wikiURL);
    NotificationsComponentObject notifications = new NotificationsComponentObject(driver);
    notifications.showNotifications();
    notifications.verifyNotification(title, credentials.userName12, "replied to your message");
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) NotificationsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject) Test(org.testng.annotations.Test)

Example 5 with NotificationsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject in project selenium-tests by Wikia.

the class ForumNotificationsTests method userIsNotifiedWhenRegularAndStaffUsersReplyToHerDiscussion.

@Test(groups = { "ForumNotificationsTests_004", "ForumNotificationsTests", "NotificationsTests" }, dependsOnMethods = { "forumNotificationsTests_003_userCLeavesReply", "forumNotificationsTests_002_userBLeavesReply", "forumNotificationsTests_001_userAStartsDiscussion" })
@Execute(asUser = User.USER)
public void userIsNotifiedWhenRegularAndStaffUsersReplyToHerDiscussion() {
    ForumPage forumMainPage = new ForumPage();
    NotificationsComponentObject notifications = new NotificationsComponentObject(driver);
    forumMainPage.openForumMainPage(wikiURL);
    notifications.showNotifications();
    String anchoredLink = null;
    try {
        anchoredLink = notifications.getNotificationLink(User.STAFF.getUserName() + " and " + User.USER_2.getUserName() + " replied to your thread on the " + URLDecoder.decode(forumBoardTitle, "UTF-8").replace("_", " "));
    } catch (UnsupportedEncodingException e) {
        PageObjectLogging.logError("Could not decode forum board name", e);
    }
    String anchor = anchoredLink.substring(anchoredLink.indexOf("#"));
    Assertion.assertEquals(anchor, "#2");
}
Also used : UnsupportedEncodingException(java.io.UnsupportedEncodingException) ForumPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage) NotificationsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

NotificationsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject)6 Test (org.testng.annotations.Test)6 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)5 Execute (com.wikia.webdriver.common.core.annotations.Execute)1 ForumPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1