1441 |
ariadna |
1 |
@core @core_courseformat
|
|
|
2 |
Feature: Validate some section editing has a non-ajax alternative
|
|
|
3 |
In order to edit the course sections faster
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able use some edit tools without ajax.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "course" exists:
|
|
|
9 |
| fullname | Course 1 |
|
|
|
10 |
| shortname | C1 |
|
|
|
11 |
| category | 0 |
|
|
|
12 |
| numsections | 3 |
|
|
|
13 |
| initsections | 1 |
|
|
|
14 |
And the following "activities" exist:
|
|
|
15 |
| activity | name | intro | course | idnumber | section |
|
|
|
16 |
| assign | Activity sample 1 | Test assignment description | C1 | sample1 | 1 |
|
|
|
17 |
And the following "users" exist:
|
|
|
18 |
| username | firstname | lastname | email |
|
|
|
19 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
20 |
And the following "course enrolments" exist:
|
|
|
21 |
| user | course | role |
|
|
|
22 |
| teacher1 | C1 | editingteacher |
|
|
|
23 |
|
|
|
24 |
Scenario: Section settings can be accessed without ajax
|
|
|
25 |
Given I log in as "teacher1"
|
|
|
26 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
27 |
When I click on "Edit settings" "link" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
28 |
Then I should see "Section name"
|
|
|
29 |
And I set the field "Section name" to "New name"
|
|
|
30 |
And I press "Save changes"
|
|
|
31 |
And I should see "New name"
|
|
|
32 |
|
|
|
33 |
Scenario: Hide and show a section can be done without ajax
|
|
|
34 |
Given I log in as "teacher1"
|
|
|
35 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
36 |
And I should not see "Show" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
37 |
When I click on "Hide" "link" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
38 |
Then I should see "Show" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
39 |
And I should not see "Hide" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
40 |
And I click on "Show" "link" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
41 |
And I should not see "Show" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
42 |
And I should see "Hide" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
43 |
|
|
|
44 |
Scenario: Delete a section can be done without ajax
|
|
|
45 |
Given I log in as "teacher1"
|
|
|
46 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
47 |
When I click on "Delete" "link" in the "Section 1" "core_courseformat > Section actions menu"
|
|
|
48 |
Then I should see "Delete section?"
|
|
|
49 |
And I should see "This will delete Section 1 and all the activities it contains."
|
|
|
50 |
And I click on "Delete" "button"
|
|
|
51 |
And I should not see "Section 1"
|