Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@format @format_weeksFeature: Sections can be edited and deleted in weekly sections formatIn order to rearrange my course contentsAs a teacherI need to edit and delete sectionsBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com |And the following "courses" exist:| fullname | shortname | format | coursedisplay | numsections | startdate || Course 1 | C1 | weeks | 0 | 5 | 957139200 |And the following "activities" exist:| activity | name | intro | course | idnumber | section || assign | Test assignment name | Test assignment description | C1 | assign1 | 0 || book | Test book name | | C1 | book1 | 1 || lesson | Test lesson name | Test lesson description | C1 | lesson1 | 4 || choice | Test choice name | Test choice description | C1 | choice1 | 5 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher |And I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onScenario: View the default name of the general section in weeks formatWhen I edit the section "0"Then the field "Section name" matches value ""And I should see "General"Scenario: Edit the default name of the general section in weeks formatWhen I edit the section "0" and I fill the form with:| Section name | This is the general section |Then I should see "This is the general section" in the "page" "region"Scenario: View the default name of the second section in weeks formatWhen I edit the section "2"Then the field "Section name" matches value ""And I should see "8 May - 14 May"Scenario: Edit section summary in weeks formatWhen I edit the section "2" and I fill the form with:| Description | Welcome to section 2 |Then I should see "Welcome to section 2" in the "page" "region"Scenario: Edit section default name in weeks formatGiven I should see "8 May - 14 May" in the "8 May - 14 May" "section"When I edit the section "2" and I fill the form with:| Section name | This is the second week |Then I should see "This is the second week" in the "page" "region"And I should not see "8 May - 14 May"@javascriptScenario: Inline edit section name in weeks formatWhen I set the field "Edit section name" in the "1 May - 7 May" "section" to "Midterm evaluation"Then I should not see "1 May - 7 May" in the "region-main" "region"And "New name for week" "field" should not existAnd I should see "Midterm evaluation" in the "Midterm evaluation" "section"And I am on "Course 1" course homepageAnd I should not see "1 May - 7 May" in the "region-main" "region"And I should see "Midterm evaluation" in the "Midterm evaluation" "section"Scenario: Deleting the last section in weeks formatGiven I should see "29 May - 4 June" in the "29 May - 4 June" "section"When I delete section "5"Then I should see "Are you absolutely sure you want to completely delete \"29 May - 4 June\" and all the activities it contains?"And I press "Delete"And I should not see "29 May - 4 June"And I should see "22 May - 28 May"Scenario: Deleting the middle section in weeks formatGiven I should see "29 May - 4 June" in the "29 May - 4 June" "section"When I delete section "4"And I press "Delete"Then I should not see "29 May - 4 June"And I should not see "Test lesson name"And I should see "Test choice name" in the "22 May - 28 May" "section"And I should see "22 May - 28 May"@javascriptScenario: Adding sections in weeks formatWhen I follow "Add week"Then I should see "5 June - 11 June" in the "5 June - 11 June" "section"