MDL-68143 Workshop: should remember collapsed/expanded sections
[moodle.git] / mod / workshop / tests / behat / workshop_section_remembered.feature
blobd4e4b323de4e9f1a35a7e9d24001ea46ffa4c17c
1 @mod @mod_workshop
2 Feature: Workshop should remember collapsed/expanded sections in view page.
3   In order to keep the last state of collapsed/expanded sections in view page
4   As an user
5   I need to be able to choose collapsed/expanded, and after refresh the page it will display collapsed/expanded I chose before.
7   Background:
8     Given the following "users" exist:
9       | username | firstname | lastname | email                |
10       | teacher1 | Teacher   | 1        | teacher1@example.com |
11       | student1 | Student   | 1        | student1@example.com |
12     And the following "courses" exist:
13       | fullname | shortname |
14       | Course1  | c1        |
15     And the following "course enrolments" exist:
16       | user     | course | role           |
17       | teacher1 | c1     | editingteacher |
18       | student1 | c1     | student        |
19     And the following "activities" exist:
20       | activity | name       | intro                  | course | idnumber  |
21       | workshop | Workshop 1 | Workshop 1 description | c1     | workshop1 |
23   @javascript
24   Scenario: Check section in view page can be remembered.
25     Given I log in as "teacher1"
26     And I am on "Course1" course homepage
27     And I follow "Workshop 1"
28     When I change phase in workshop "Workshop 1" to "Submission phase"
29     And I wait until the page is ready
30     And I log out
31     And I log in as "student1"
32     And I am on "Course1" course homepage
33     And I follow "Workshop 1"
34     Then I should see "You have not submitted your work yet"
35     And I click on "Your submission" "link"
36     And I should not see "You have not submitted your work yet"
37     And I reload the page
38     And I wait until the page is ready
39     And I should not see "You have not submitted your work yet"