MDL-59195 mod_assign: add behat tests for comments error
[moodle.git] / mod / assign / tests / behat / assign_comments_no_error.feature
CommitLineData
910b0273
DS
1@mod @mod_assign
2Feature: Switch role does not cause an error message in assignsubmission_comments
3
4 Background:
5 Given the following "courses" exist:
6 | fullname | shortname |
7 | Course 1 | C1 |
8 And the following "users" exist:
9 | username |
10 | teacher1 |
11 And the following "course enrolments" exist:
12 | course | user | role |
13 | C1 | teacher1 | editingteacher |
14 And I log in as "teacher1"
15 And I am on "Course 1" course homepage
16 And I turn editing mode on
17 And I add a "Assignment" to section "1" and I fill the form with:
18 | Assignment name | Test assignment |
19 | Description | This is the description text |
20 | Students submit in groups | Yes |
21
22 Scenario: I switch role to student and an error doesn't occur
23 When I follow "Switch role to..." in the user menu
24 And I press "Student"
25 And I follow "Test assignment"
26 Then I should see "This is the description text"