AutorÃa | Ultima modificación | Ver Log |
@mod @mod_subsectionFeature: The module menu replaces the delegated section menuIn order to use subsectionsAs an teacherI need to see the delegated section action menu instead of module menu.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 | 2 | 1 |And the following "activity" exists:| activity | subsection || name | Subsection1 || course | C1 || idnumber | subsection1 || section | 1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher |And I am on the "C1" "Course" page logged in as "teacher1"@javascriptScenario: The action menu for subsection page meets the module menuGiven I click on "Subsection1" "link" in the "region-main" "region"And I turn editing mode on# Open the action menu.When I click on "Edit" "icon" in the "[data-region='header-actions-container']" "css_element"Then I should not see "Move right"And I should not see "Assign roles"And I should not see "Highlight"And I should see "Edit settings"And I should not see "Move"# Duplicate is not implemented yet.And I should not see "Duplicate"And I should see "Hide"And I should see "Delete"And I should see "Permalink"@javascriptScenario: The action menu for subsection module has less options than a regular activityGiven I turn editing mode onWhen I open "Subsection1" actions menuThen I should not see "Move right"And I should not see "Assign roles"And I should not see "Highlight"And I should see "View"And I should see "Edit settings"And I should see "Move"# Duplicate is not implemented yet.And I should not see "Duplicate"And I should see "Hide"And I should see "Delete"@javascriptScenario: The action menu for subsection module in section page has less options than a regular activityGiven I click on "Section 1" "link"And I turn editing mode onWhen I open "Subsection1" actions menuThen I should not see "Move right"And I should not see "Assign roles"And I should not see "Highlight"And I should see "View"And I should see "Edit settings"And I should see "Move"# Duplicate is not implemented yet.And I should not see "Duplicate"And I should see "Hide"And I should see "Delete"And I should see "Permalink"@javascriptScenario: View option in subsection action menuGiven I turn editing mode onAnd I open "Subsection1" actions menuWhen I choose "View" in the open action menu# Subsection page. Subsection name should be the title.Then I should see "Subsection1" in the "h1" "css_element"And "Section 1" "text" should exist in the ".breadcrumb" "css_element"# Open the section header action menu.And I click on "Edit" "icon" in the "[data-region='header-actions-container']" "css_element"And "View" "link" should not exist in the "[data-region='header-actions-container']" "css_element"And I click on "Section 1" "link" in the ".breadcrumb" "css_element"# Section page. Section name should be the title.And I should see "Section 1" in the "h1" "css_element"And "Subsection1" "text" should not exist in the ".breadcrumb" "css_element"# Open the section header action menu.And I open "Subsection1" actions menuAnd I choose "View" in the open action menuAnd I should see "Subsection1" in the "h1" "css_element"@javascriptScenario: Edit settings option in subsection action menuGiven I turn editing mode onAnd I open "Subsection1" actions menuWhen I choose "Edit settings" in the open action menuAnd the field "Section name" matches value "Subsection1"And I click on "Cancel" "button"And I am on the "C1 > Subsection1" "course > section" page# Subsection page. Open the section header action menu.And I click on "Edit" "icon" in the "[data-region='header-actions-container']" "css_element"And I choose "Edit settings" in the open action menuAnd the field "Section name" matches value "Subsection1"And I click on "Cancel" "button"And I am on the "C1 > Section 1" "course > section" page# Section page. Open Subsection1 module action menu.And I open "Subsection1" actions menuAnd I choose "Edit settings" in the open action menuAnd the field "Section name" matches value "Subsection1"@javascriptScenario: Permalink option in subsection action menuGiven I turn editing mode onAnd I open "Subsection1" actions menuWhen I choose "Permalink" in the open action menuThen I click on "Copy to clipboard" "link"And I should see "Text copied to clipboard"And I am on the "C1 > Subsection1" "course > section" page# Subsection page. Open the section header action menu.And I click on "Edit" "icon" in the "[data-region='header-actions-container']" "css_element"And I choose "Permalink" in the open action menuAnd I click on "Copy to clipboard" "link"And I should see "Text copied to clipboard"And I am on the "C1 > Section 1" "course > section" page# Section page. Open Subsection1 module action menu.And I open "Subsection1" actions menuAnd I choose "Permalink" in the open action menuAnd I click on "Copy to clipboard" "link"And I should see "Text copied to clipboard"@javascriptScenario: Delete option in subsection action menuGiven the following "activities" exist:| activity | course | idnumber | name | intro | section || subsection | C1 | subsection2 | Subsection2 | Test Subsection2 | 1 || subsection | C1 | subsection3 | Subsection3 | Test Subsection3 | 1 |Given I turn editing mode onAnd "Subsection1" "link" should existAnd "Subsection2" "link" should existAnd "Subsection3" "link" should existAnd I open "Subsection1" actions menuWhen I choose "Delete" in the open action menuAnd I click on "Delete" "button" in the "Delete subsection?" "dialogue"And "Subsection1" "link" should not exist in the "#region-main-box" "css_element"And I am on the "C1 > Section 1" "course > section" page# Section page. Open Subsection2 module action menu.And I open "Subsection2" actions menuAnd I choose "Delete" in the open action menuAnd I click on "Delete" "button" in the "Delete subsection?" "dialogue"And "Subsection2" "link" should not exist in the "#region-main-box" "css_element"And I am on the "C1 > Subsection3" "course > section" page# Subsection page. Open the section header action menu.And I click on "Edit" "icon" in the "[data-region='header-actions-container']" "css_element"And I choose "Delete" in the open action menuAnd I click on "Delete" "button" in the "Delete subsection?" "dialogue"And I should not see "Subsection3"And I should see "Course 1" in the "h1" "css_element"@javascriptScenario: Hide/Show option in subsection action menuGiven I turn editing mode onAnd I should not see "Hidden from students"And I open "Subsection1" actions menuWhen I choose "Hide" in the open action menuThen I should see "Hidden from students"Given I am on the "C1 > Subsection1" "course > section" pageAnd I should see "Hidden from students"# Subsection page. Open the section header action menu.And I click on "Edit" "icon" in the "[data-region='header-actions-container']" "css_element"And I choose "Show" in the open action menuAnd I should not see "Hidden from students"And I click on "Section 1" "link" in the ".breadcrumb" "css_element"And I should not see "Hidden from students"# Section page. Open Subsection1 module action menu.And I open "Subsection1" actions menuAnd I choose "Hide" in the open action menuAnd I should see "Hidden from students"@javascriptScenario: Hide/Show option in course page action menu for subsectionsGiven I am on the "C1" "Course" pageAnd I turn editing mode onWhen I hide section "Subsection1"Then I should see "Hidden from students"And I show section "Subsection1"And I should not see "Hidden from students"@javascriptScenario: Hide/Show option in subsection page action menu for subsectionsGiven I am on the "C1 > Subsection1" "course > section" pageAnd I turn editing mode onWhen I hide section "Subsection1"Then I should see "Hidden from students"And I show section "Subsection1"And I should not see "Hidden from students"@javascriptScenario: Subsections can't change visibility in hidden sections.Given I am on the "C1" "Course" pageAnd I turn editing mode onAnd I hide section "Section 1"When I open section "Subsection1" edit menuThen I should not see "Hide"And I should not see "Show"And I am on the "C1 > Section 1" "course > section" pageAnd I open section "Subsection1" edit menuAnd I should not see "Hide"And I should not see "Show"@javascriptScenario: Move option in subsection action menuGiven the following "activities" exist:| activity | course | idnumber | name | intro | section || subsection | C1 | subsection2 | Subsection2 | Test Subsection2 | 1 |And I turn editing mode onAnd I open "Subsection1" actions menuWhen I choose "Move" in the open action menuAnd I should see "Move Subsection1 after" in the "Move subsection" "dialogue"# Can't be moved inside same subsection.And I click on "Subsection1" "link" in the "Move subsection" "dialogue"And I should see "Move Subsection1 after" in the "Move subsection" "dialogue"# Can't be moved inside other subsection.And I click on "Subsection2" "link" in the "Move subsection" "dialogue"And I should see "Move Subsection1 after" in the "Move subsection" "dialogue"# Can be moved to other position.And I click on "General" "link" in the "Move subsection" "dialogue"Then I should not see "Move Subsection1 after"And I should see "Subsection1" in the "General" "section"And I should not see "Subsection1" in the "Section 1" "section"# Section page. Subsection is still content, so Move option should exist.And I am on the "C1 > Section 1" "course > section" pageAnd I open "Subsection2" actions menuAnd I should see "Move"# Subsection page. Move option should not exist.And I am on the "C1 > Subsection1" "course > section" pageAnd I click on "Edit" "icon" in the "[data-region='header-actions-container']" "css_element"And "Move" "link" should not exist in the "[data-region='header-actions-container']" "css_element"