Advertisement
saraarjona

availability/tests/behat/edit_availability.feature

Jul 10th, 2023 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. @javascript
  2. Scenario: Edit section availability using course page link
  3. # Setting a restriction up
  4. Given I log in as "teacher1"
  5. And I am on "Course 1" course homepage with editing mode on
  6. And I edit the section "1"
  7. And I expand all fieldsets
  8. And I press "Add restriction..."
  9. And I click on "Date" "button" in the "Add restriction..." "dialogue"
  10. And I press "Save changes"
  11. # Testing edit settings link
  12. When I click on "Edit settings" "link" in the "section-1" "core_availability > Section availability"
  13. Then I should see "Restrict access"
  14. And I should not see "General"
  15. And I click on "Cancel" "button"
  16. # Edit settings link not displayed when editing mode is off.
  17. And I am on "Course 1" course homepage with editing mode off
  18. And I should not see "Edit settings" in the "section-1" "core_availability > Section availability"
  19.  
  20. @javascript
  21. Scenario: Edit activity availability using course page link
  22. # Setting a restriction up
  23. Given I am on the "MyForum" "forum activity editing" page logged in as teacher1
  24. And I expand all fieldsets
  25. And I press "Add restriction..."
  26. And I click on "Date" "button" in the "Add restriction..." "dialogue"
  27. When I press "Save and return to course"
  28. # Edit settings link not displayed when editing mode is off.
  29. Then "Edit settings" "link" should not exist in the "MyForum" "core_availability > Activity availability"
  30. # Testing edit settings link
  31. But I am on "Course 1" course homepage with editing mode on
  32. And "Edit settings" "link" should exist in the "MyForum" "core_availability > Activity availability"
  33. And I click on "Edit settings" "link" in the "MyForum" "core_availability > Activity availability"
  34. And I should see "Restrict access"
  35. And I should not see "Content"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement