diff --git a/mod/forum/tests/behat/track_read_posts.feature b/mod/forum/tests/behat/track_read_posts.feature index 2b4ad1c4b64..583e38ef4aa 100644 --- a/mod/forum/tests/behat/track_read_posts.feature +++ b/mod/forum/tests/behat/track_read_posts.feature @@ -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