source: moodle/trunk/fuentes/course/tests/behat/view_subfolders_inline.feature @ 1331

Last change on this file since 1331 was 1331, checked in by jrpelegrina, 3 years ago

Updated to moodle 3.0.3

File size: 2.9 KB
Line 
1@core @core_course
2Feature: View subfolders in a course in-line
3  In order to provide different view options for folders
4  As a teacher
5  I need to add a folders and subfolders and view them inline
6
7  Background:
8    Given the following "users" exist:
9      | username | firstname | lastname | email |
10      | teacher1 | Teacher | 1 | teacher1@example.com |
11    And the following "courses" exist:
12      | fullname | shortname | format | coursedisplay | numsections |
13      | Course 1 | C1 | topics | 0 | 5 |
14    And the following "course enrolments" exist:
15      | user | course | role |
16      | teacher1 | C1 | editingteacher |
17    And I log in as "teacher1"
18    And I follow "Course 1"
19    And I turn editing mode on
20    And I add a "Folder" to section "3" and I fill the form with:
21      | Name | Test folder |
22      | Display folder contents | On a separate page |
23    And I should see "Test folder"
24    And I follow "Test folder"
25    And I press "Edit"
26    And I press "Create folder"
27    And I set the field "New folder name" to "Test subfolder 1"
28    And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
29    And I press "Save changes"
30
31    @javascript
32    Scenario: Add a folder with two subfolders - view on separate page
33      Given I follow "Course 1"
34      And I should not see "Test subfolder 1"
35      And I follow "Test folder"
36      And I should see "Test subfolder 1"
37      And I press "Edit"
38      And I press "Create folder"
39      And I set the field "New folder name" to "Test subfolder 2"
40      And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
41      And I press "Save changes"
42      When I follow "Course 1"
43      Then I should not see "Test subfolder 2"
44      And I follow "Test folder"
45      And I should see "Test subfolder 2"
46
47    @javascript
48    Scenario: Make the subfolders viewable inline on the course page
49      Given I press "Edit"
50      And I click on "div.fp-filename" "css_element" in the "div.fp-filename-field" "css_element"
51      And I press "Create folder"
52      And I set the field "New folder name" to "Test sub subfolder"
53      And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
54      And I press "Save changes"
55      And I should see "Test sub subfolder"
56      And I navigate to "Edit settings" node in "Folder administration"
57      And I set the field "Display folder contents" to "Inline on a course page"
58      And I set the field "Show subfolders expanded" to ""
59      And I press "Save and return to course"
60      And I should see "Test subfolder 1"
61      And I should not see "Test sub subfolder"
62      And I open "Test folder" actions menu
63      When I click on "Edit settings" "link" in the "Test folder" activity
64      And I set the field "Show subfolders expanded" to "1"
65      And I press "Save and return to course"
66      Then I should see "Test subfolder 1"
67      And I should see "Test sub subfolder"
Note: See TracBrowser for help on using the repository browser.