MDL-84291 course: remove max section behat tests
This commit is contained in:
@@ -381,17 +381,3 @@ Feature: Course index depending on role
|
||||
And I turn editing mode on
|
||||
When I set the field "Edit section name" in the "page-header" "region" to "Custom section name"
|
||||
Then I should see "Custom section name" in the "courseindex-content" "region"
|
||||
|
||||
@javascript
|
||||
Scenario: We cannot add a section when the number of section reaches maxsections but as soon as we reach under the limit we can add a section again.
|
||||
Given the following config values are set as admin:
|
||||
| maxsections | 4 | moodlecourse|
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
Then I should see "Section 1" in the "courseindex-content" "region"
|
||||
And ".disabled" "css_element" should exist in the "[data-action='addSection']" "css_element"
|
||||
And I should see "You have reached the maximum number of sections allowed for a course."
|
||||
And I delete section "4"
|
||||
And I click on "Delete" "button" in the ".modal" "css_element"
|
||||
And ".disabled" "css_element" should not exist in the "[data-action='addSection']" "css_element"
|
||||
And I should not see "You have reached the maximum number of sections allowed for a course."
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
@core @core_course
|
||||
Feature: The maximum number of weeks/topics in a course can be configured
|
||||
In order to set boundaries to courses size
|
||||
As a manager
|
||||
I need to limit the number of weeks/topics a course can have
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| manager1 | Manager | 1 | manager1@example.com |
|
||||
And the following "system role assigns" exist:
|
||||
| user | course | role |
|
||||
| manager1 | Acceptance test site | manager |
|
||||
And I log in as "admin"
|
||||
And I navigate to "Courses > Default settings > Course default settings" in site administration
|
||||
|
||||
@javascript
|
||||
Scenario: The number of sections can be increased and the limits are applied to courses
|
||||
Given I set the field "Maximum number of sections" to "100"
|
||||
When I press "Save changes"
|
||||
And the field "Maximum number of sections" matches value "100"
|
||||
And the "Number of sections" select box should contain "100"
|
||||
And I log out
|
||||
And I log in as "manager1"
|
||||
And the following "course" exists:
|
||||
| fullname | New course fullname |
|
||||
| shortname | New course shortname |
|
||||
| format | topics |
|
||||
| numsections | 90 |
|
||||
| initsections | 1 |
|
||||
And I am on the "New course fullname" course page
|
||||
Then I should see "Section 90"
|
||||
|
||||
@javascript
|
||||
Scenario: The number of sections can be reduced to 0 and the limits are applied to courses
|
||||
Given I set the field "Maximum number of sections" to "0"
|
||||
When I press "Save changes"
|
||||
And the field "Maximum number of sections" matches value "0"
|
||||
And the "Number of sections" select box should contain "0"
|
||||
And the "Number of sections" select box should not contain "52"
|
||||
And I log out
|
||||
And I log in as "manager1"
|
||||
And the following "course" exists:
|
||||
| fullname | New course fullname |
|
||||
| shortname | New course shortname |
|
||||
| format | topics |
|
||||
| numsections | 0 |
|
||||
| initsections | 1 |
|
||||
And I am on the "New course fullname" course page
|
||||
Then I should not see "Section 1"
|
||||
@@ -1,29 +0,0 @@
|
||||
@mod @mod_subsection
|
||||
Feature: Teacher can only add subsection when certain conditions are met
|
||||
In order to limit subsections
|
||||
As an teacher
|
||||
I need to create subsections only when possible
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category | numsections | initsections |
|
||||
| Course 1 | C1 | 0 | 5 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
|
||||
@javascript
|
||||
Scenario: We cannot add subsections when maxsections is reached
|
||||
Given the following config values are set as admin:
|
||||
| maxsections | 10 | moodlecourse |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I click on "Add content" "button" in the "Section 1" "section"
|
||||
And I click on "Subsection" "link" in the ".dropdown-menu.show" "css_element"
|
||||
When the following config values are set as admin:
|
||||
| maxsections | 4 | moodlecourse |
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "You have reached the maximum number of sections allowed for a course."
|
||||
Reference in New Issue
Block a user