sarjona

Self unenrol as a self-enrolled student from the course

Oct 18th, 2021 (edited)
199
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/enrol/self/tests/behat/self_enrolment.feature b/enrol/self/tests/behat/self_enrolment.feature
  2. index 7b0672e120f..0c6704756d2 100644
  3. --- a/enrol/self/tests/behat/self_enrolment.feature
  4. +++ b/enrol/self/tests/behat/self_enrolment.feature
  5. @@ -15,8 +15,6 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
  6.      And the following "course enrolments" exist:
  7.        | user | course | role |
  8.        | teacher1 | C1 | editingteacher |
  9. -    And the "multilang" filter is "on"
  10. -    And the "multilang" filter applies to "content and headings"
  11.  
  12.    # Note: Please keep the javascript tag on this Scenario to ensure that we
  13.    # test use of the singleselect functionality.
  14. @@ -132,19 +130,20 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
  15.  
  16.    @javascript
  17.    Scenario: Self unenrol as a self-enrolled student from the course
  18. -    Given I log in as "teacher1"
  19. -    And I am on "Course 1" course homepage
  20. +    Given the "multilang" filter is "on"
  21. +    And the "multilang" filter applies to "content and headings"
  22. +    And I am on the "C1" "Course" page logged in as "teacher1"
  23.      When I add "Self enrolment" enrolment method with:
  24.        | Custom instance name | Test student enrolment |
  25.      And I am on "Course 1" course homepage
  26. -    And I navigate to "Edit settings" in current page administration
  27. +    And I navigate to "Settings" in current page administration
  28.      And I set the field "Course full name" in the "General" "fieldset" to "<span lang=\"en\" class=\"multilang\">Course</span><span lang=\"it\" class=\"multilang\">Corso</span> 1"
  29.      And I press "Save and display"
  30.      And I log out
  31. -    And I am on the "C1" Course page logged in as student1
  32. +    And I am on the "C1" "Course" page logged in as "student1"
  33.      And I press "Enrol me"
  34.      And I should see "You are enrolled in the course"
  35. -    And I am on the "C1" Course page
  36. +    And I am on the "C1" "course" page
  37.      And I navigate to "Unenrol me from C1" in current page administration
  38.      And I click on "Continue" "button" in the "Confirm" "dialogue"
  39.      Then I should see "You are unenrolled from the course \"Course 1\""
RAW Paste Data