unsubscribe_watchlist.feature 1.48 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@javascript @core @core_view
Feature: Unsubscribing from watchlist via link in email
In order to unsubscribe from watchlist for page I am watching
As a user
I follow unsubscription link in email

Background:
Given the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
    | UserA | Kupuhipa1 | UserA@example.org | Angela | User | mahara | internal | member |
    | UserB | Kupuhipa1 | UserB@example.org | Bob | User | mahara | internal | member |

And the following "pages" exist:
    | title | description | ownertype | ownername |
    | Page UserA_01 | Page 01 | user | UserA |
    | Page UserA_02 | Page 02 | user | UserA |

And the following "permissions" exist:
    | title | accesstype |
    | Page UserA_01 | loggedin |

Scenario: Viewing a list of pages I watch from the dashboard (Bug 1444784)
 Given I log in as "UserB" with password "Kupuhipa1"
 And I choose "Notifications" in "Settings" from user menu
 And I select "Email" from "Watchlist"
 And I press "Save"
 And I am on homepage
 And I follow "Page UserA_01"
 And I press "More..."
 And I follow "Add page to watchlist"
 And I should see "This page has been added to your watchlist."
 And I trigger cron
 # Testing the unsubscribe link in the email sent
 And I unsubscribe from "Page UserA_01" owned by "UserB"
 And I should see "You have successfully unsubscribed"
 And I am on homepage
 And I follow "Page UserA_01"
 And I press "More..."
 And I should see "Add page to watchlist"