mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-49417 enrol_cohort: fix behat test to use new autocomplete.
This commit is contained in:
parent
1a11bf375c
commit
6b7d74040a
1 changed files with 27 additions and 21 deletions
|
@ -44,18 +44,20 @@ Feature: Access visible and hidden cohorts
|
||||||
| user | course | role |
|
| user | course | role |
|
||||||
| teacher | C1 | editingteacher |
|
| teacher | C1 | editingteacher |
|
||||||
|
|
||||||
|
@javascript
|
||||||
Scenario: Teacher can see visible cohorts defined in the above contexts
|
Scenario: Teacher can see visible cohorts defined in the above contexts
|
||||||
When I log in as "teacher"
|
When I log in as "teacher"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||||
And I select "Cohort sync" from the "Add method" singleselect
|
And I select "Cohort sync" from the "Add method" singleselect
|
||||||
Then the "Cohort" select box should contain "Cohort in category 1"
|
And I open the autocomplete suggestions list
|
||||||
And the "Cohort" select box should contain "System cohort"
|
Then "Cohort in category 1" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should not contain "Cohort hidden in category 1"
|
And "System cohort" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should not contain "System hidden cohort"
|
And "Cohort hidden in category 1" "autocomplete_suggestions" should not exist
|
||||||
And the "Cohort" select box should not contain "Cohort in category 2"
|
And "System hidden cohort" "autocomplete_suggestions" should not exist
|
||||||
And the "Cohort" select box should contain "Cohort empty in category 1"
|
And "Cohort in category 2" "autocomplete_suggestions" should not exist
|
||||||
And the "Cohort" select box should contain "System empty cohort"
|
And "Cohort empty in category 1" "autocomplete_suggestions" should exist
|
||||||
|
And "System empty cohort" "autocomplete_suggestions" should exist
|
||||||
And I set the field "Cohort" to "System cohort"
|
And I set the field "Cohort" to "System cohort"
|
||||||
And I press "Add method"
|
And I press "Add method"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
|
@ -72,18 +74,20 @@ Feature: Access visible and hidden cohorts
|
||||||
And the "Select members from cohort" select box should not contain "Cohort empty in category 1"
|
And the "Select members from cohort" select box should not contain "Cohort empty in category 1"
|
||||||
And the "Select members from cohort" select box should not contain "System empty cohort"
|
And the "Select members from cohort" select box should not contain "System empty cohort"
|
||||||
|
|
||||||
|
@javascript
|
||||||
Scenario: System manager can see all cohorts defined in the above contexts
|
Scenario: System manager can see all cohorts defined in the above contexts
|
||||||
When I log in as "user1"
|
When I log in as "user1"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||||
And I select "Cohort sync" from the "Add method" singleselect
|
And I select "Cohort sync" from the "Add method" singleselect
|
||||||
Then the "Cohort" select box should contain "Cohort in category 1"
|
And I open the autocomplete suggestions list
|
||||||
And the "Cohort" select box should contain "System cohort"
|
Then "Cohort in category 1" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should contain "Cohort hidden in category 1"
|
And "System cohort" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should contain "System hidden cohort"
|
And "Cohort hidden in category 1" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should not contain "Cohort in category 2"
|
And "System hidden cohort" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should contain "Cohort empty in category 1"
|
And "Cohort in category 2" "autocomplete_suggestions" should not exist
|
||||||
And the "Cohort" select box should contain "System empty cohort"
|
And "Cohort empty in category 1" "autocomplete_suggestions" should exist
|
||||||
|
And "System empty cohort" "autocomplete_suggestions" should exist
|
||||||
And I set the field "Cohort" to "System cohort"
|
And I set the field "Cohort" to "System cohort"
|
||||||
And I press "Add method"
|
And I press "Add method"
|
||||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||||
|
@ -98,18 +102,20 @@ Feature: Access visible and hidden cohorts
|
||||||
And the "Select members from cohort" select box should not contain "Cohort empty in category 1"
|
And the "Select members from cohort" select box should not contain "Cohort empty in category 1"
|
||||||
And the "Select members from cohort" select box should not contain "System empty cohort"
|
And the "Select members from cohort" select box should not contain "System empty cohort"
|
||||||
|
|
||||||
|
@javascript
|
||||||
Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above
|
Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above
|
||||||
When I log in as "user2"
|
When I log in as "user2"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||||
And I select "Cohort sync" from the "Add method" singleselect
|
And I select "Cohort sync" from the "Add method" singleselect
|
||||||
Then the "Cohort" select box should contain "Cohort in category 1"
|
And I open the autocomplete suggestions list
|
||||||
And the "Cohort" select box should contain "System cohort"
|
Then "Cohort in category 1" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should contain "Cohort hidden in category 1"
|
And "System cohort" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should not contain "System hidden cohort"
|
And "Cohort hidden in category 1" "autocomplete_suggestions" should exist
|
||||||
And the "Cohort" select box should not contain "Cohort in category 2"
|
And "System hidden cohort" "autocomplete_suggestions" should not exist
|
||||||
And the "Cohort" select box should contain "Cohort empty in category 1"
|
And "Cohort in category 2" "autocomplete_suggestions" should not exist
|
||||||
And the "Cohort" select box should contain "System empty cohort"
|
And "Cohort empty in category 1" "autocomplete_suggestions" should exist
|
||||||
|
And "System empty cohort" "autocomplete_suggestions" should exist
|
||||||
And I set the field "Cohort" to "System cohort"
|
And I set the field "Cohort" to "System cohort"
|
||||||
And I press "Add method"
|
And I press "Add method"
|
||||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue