mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 09:30:17 +01:00
MDL-70152 forum: Create behat data generator
* Convert track_read_posts.feature to use activity and discussion data generators as exmaple. Co-authored-by: Jun Pataleta <jun@moodle.com>
This commit is contained in:
parent
090baf556e
commit
c38a977f3d
@ -16,22 +16,22 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And I log in as "admin"
|
||||
|
||||
Scenario: Tracking forum posts off
|
||||
Given the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| trackingtype | 0 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And I log out
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | forum1 |
|
||||
| type | general |
|
||||
| name | Test forum name |
|
||||
| description | Test forum description |
|
||||
| trackingtype | 0 |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | forum1 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then I should not see "1 unread post"
|
||||
@ -40,19 +40,19 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
||||
|
||||
Scenario: Tracking forum posts optional with user tracking on
|
||||
Given the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | 00001 |
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| trackingtype | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And I log out
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | forum1 |
|
||||
| name | Test forum name |
|
||||
| type | general |
|
||||
| description | Test forum description |
|
||||
| trackingtype | 1 |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | forum1 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then I should see "1 unread post"
|
||||
@ -76,12 +76,14 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
And I log out
|
||||
When I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
@ -99,12 +101,14 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
@ -125,12 +129,14 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
||||
| name | Test forum name |
|
||||
| intro | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
And I log out
|
||||
When I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
@ -151,12 +157,14 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
||||
| name | Test forum name |
|
||||
| description | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
And the following config values are set as admin:
|
||||
| forum_allowforcedreadtracking | 0 |
|
||||
And I log out
|
||||
@ -185,12 +193,14 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
|
||||
| name | Test forum name |
|
||||
| description | Test forum description |
|
||||
| section | 1 |
|
||||
| type | generalforum |
|
||||
| type | general |
|
||||
| trackingtype | 2 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a new discussion to "Test forum name" forum with:
|
||||
| Subject | Test post subject |
|
||||
| Message | Test post message |
|
||||
And the following "mod_forum > discussion" exists:
|
||||
| forum | 00001 |
|
||||
| course | C1 |
|
||||
| user | admin |
|
||||
| name | Test post subject |
|
||||
| message | Test post message |
|
||||
And the following config values are set as admin:
|
||||
| forum_allowforcedreadtracking | 0 |
|
||||
And I log out
|
||||
|
Loading…
x
Reference in New Issue
Block a user