1 |
efrain |
1 |
@mod @mod_forum @javascript
|
|
|
2 |
Feature: A student can favourite a discussion via the forum settings menu
|
|
|
3 |
|
|
|
4 |
Background:
|
|
|
5 |
Given the following "users" exist:
|
|
|
6 |
| username | firstname | lastname | email |
|
|
|
7 |
| student1 | Student | 1 | student1@example.com |
|
|
|
8 |
And the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category |
|
|
|
10 |
| Course 1 | C1 | 0 |
|
|
|
11 |
And the following "course enrolments" exist:
|
|
|
12 |
| user | course | role |
|
|
|
13 |
| student1 | C1 | student |
|
|
|
14 |
And the following "activity" exists:
|
|
|
15 |
| course | C1 |
|
|
|
16 |
| activity | forum |
|
|
|
17 |
| name | Test forum name |
|
|
|
18 |
| idnumber | forum1 |
|
|
|
19 |
And the following "mod_forum > discussions" exist:
|
|
|
20 |
| user | forum | name | message |
|
|
|
21 |
| admin | forum1 | Discussion 1 | Discussion contents 1, first message |
|
|
|
22 |
And the following "mod_forum > posts" exist:
|
|
|
23 |
| user | parentsubject | subject | message |
|
|
|
24 |
| admin | Discussion 1 | Reply 1 to discussion 1 | Discussion contents 1, second message |
|
|
|
25 |
| student1 | Discussion 1 | Reply 2 to discussion 1 | Discussion contents 1, third message |
|
|
|
26 |
|
|
|
27 |
Scenario: Student can favourite a discussion from within an individual discussion
|
|
|
28 |
Given I am on the "Test forum name" "forum activity" page logged in as student1
|
|
|
29 |
When I open the action menu in "[data-container='discussion-tools']" "css_element"
|
|
|
30 |
And I click on "[title='Star this discussion']" "css_element"
|
|
|
31 |
And I wait "3" seconds
|
|
|
32 |
And I open the action menu in "[data-container='discussion-tools']" "css_element"
|
|
|
33 |
And I click on "[title='Unstar this discussion']" "css_element"
|
|
|
34 |
|
|
|
35 |
Scenario: Student can favourite a discussion from the discussion list
|
|
|
36 |
When I am on the "Test forum name" "forum activity" page logged in as student1
|
|
|
37 |
And I click on "Discussion 1" action menu
|
|
|
38 |
And I click on "[title='Star this discussion']" "css_element"
|
|
|
39 |
And I click on "Discussion 1" action menu
|
|
|
40 |
And I click on "[title='Unstar this discussion']" "css_element"
|