This commit is contained in:
Eloy Lafuente (stronk7) 2017-01-11 02:42:29 +01:00
commit 777361983c
99 changed files with 562 additions and 543 deletions

View file

@ -255,64 +255,64 @@ Feature: We can change the visibility of categories in the management interface.
And course in management listing should be dimmed "C2"
And course in management listing should be visible "C3"
@javascript @_cross_browser
Scenario: Test courses are hidden when selected category parent is hidden.
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | CAT1 | CAT2 |
| Cat 3 | CAT2 | CAT3 |
And the following "courses" exist:
| category | fullname | shortname | idnumber |
| CAT3 | Course 1 | Course 1 | C1 |
@javascript @_cross_browser
Scenario: Test courses are hidden when selected category parent is hidden.
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | CAT1 | CAT2 |
| Cat 3 | CAT2 | CAT3 |
And the following "courses" exist:
| category | fullname | shortname | idnumber |
| CAT3 | Course 1 | Course 1 | C1 |
And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 1" in the management interface
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 2" in the management interface
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 3" in the management interface
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be visible "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And category in management listing should be dimmed "CAT2"
And category in management listing should be dimmed "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be visible "C1"
And I toggle visibility of course "C1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And category in management listing should be dimmed "CAT2"
And category in management listing should be dimmed "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be dimmed "C1"
And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 1" in the management interface
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 2" in the management interface
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 3" in the management interface
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be visible "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And category in management listing should be dimmed "CAT2"
And category in management listing should be dimmed "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be visible "C1"
And I toggle visibility of course "C1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And category in management listing should be dimmed "CAT2"
And category in management listing should be dimmed "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be dimmed "C1"

View file

@ -5,12 +5,11 @@ Feature: Courses can be searched for and moved in bulk.
I need to be able to search courses in bulk and move them around
Background:
Given the following "categories" exist:
Given the following "categories" exist:
| name | category | idnumber |
| Science | 0 | SCI |
| English | 0 | ENG |
| Miscellaneous | 0 | MISC |
And the following "courses" exist:
| fullname | shortname | category |
| Biology Y1 | BIO1 | MISC |

View file

@ -48,4 +48,3 @@ Feature: Force group mode in a course
And I press "Save and display"
Then "//a/child::img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist
And "//img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist

View file

@ -28,40 +28,40 @@ Feature: View subfolders in a course in-line
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
And I press "Save changes"
@javascript
Scenario: Add a folder with two subfolders - view on separate page
Given I follow "Course 1"
And I should not see "Test subfolder 1"
And I follow "Test folder"
And I should see "Test subfolder 1"
And I press "Edit"
And I press "Create folder"
And I set the field "New folder name" to "Test subfolder 2"
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
And I press "Save changes"
When I follow "Course 1"
Then I should not see "Test subfolder 2"
And I follow "Test folder"
And I should see "Test subfolder 2"
@javascript
Scenario: Add a folder with two subfolders - view on separate page
Given I follow "Course 1"
And I should not see "Test subfolder 1"
And I follow "Test folder"
And I should see "Test subfolder 1"
And I press "Edit"
And I press "Create folder"
And I set the field "New folder name" to "Test subfolder 2"
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
And I press "Save changes"
When I follow "Course 1"
Then I should not see "Test subfolder 2"
And I follow "Test folder"
And I should see "Test subfolder 2"
@javascript
Scenario: Make the subfolders viewable inline on the course page
Given I press "Edit"
And I click on "div.fp-filename" "css_element" in the "div.fp-filename-field" "css_element"
And I press "Create folder"
And I set the field "New folder name" to "Test sub subfolder"
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
And I press "Save changes"
And I should see "Test sub subfolder"
And I navigate to "Edit settings" in current page administration
And I set the field "Display folder contents" to "Inline on a course page"
And I set the field "Show subfolders expanded" to ""
And I press "Save and return to course"
And I should see "Test subfolder 1"
And I should not see "Test sub subfolder"
And I open "Test folder" actions menu
When I click on "Edit settings" "link" in the "Test folder" activity
And I set the field "Show subfolders expanded" to "1"
And I press "Save and return to course"
Then I should see "Test subfolder 1"
And I should see "Test sub subfolder"
@javascript
Scenario: Make the subfolders viewable inline on the course page
Given I press "Edit"
And I click on "div.fp-filename" "css_element" in the "div.fp-filename-field" "css_element"
And I press "Create folder"
And I set the field "New folder name" to "Test sub subfolder"
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
And I press "Save changes"
And I should see "Test sub subfolder"
And I navigate to "Edit settings" in current page administration
And I set the field "Display folder contents" to "Inline on a course page"
And I set the field "Show subfolders expanded" to ""
And I press "Save and return to course"
And I should see "Test subfolder 1"
And I should not see "Test sub subfolder"
And I open "Test folder" actions menu
When I click on "Edit settings" "link" in the "Test folder" activity
And I set the field "Show subfolders expanded" to "1"
And I press "Save and return to course"
Then I should see "Test subfolder 1"
And I should see "Test sub subfolder"