studio-overview-togglesection.feature 2.61 KB
Newer Older
1 2
Feature: Overview Toggle Section
	In order to quickly view the details of a course's section or to scan the inventory of sections
3 4
    As a course author
    I want to toggle the visibility of each section's  subsection details in the overview listing
5 6 7

	Scenario: The default layout for the overview page is to show sections in expanded view
		Given I have a course with multiple sections
8 9 10
    When I navigate to the course overview page
    Then I see the "Collapse All Sections" link
    And all sections are expanded
11

Will Daly committed
12
	Scenario: Expand /collapse for a course with no sections
13
		Given I have a course with no sections
14 15
    When I navigate to the course overview page
    Then I do not see the "Collapse All Sections" link
16 17 18

	Scenario: Collapse link appears after creating first section of a course
		Given I have a course with no sections
19 20 21 22
    When I navigate to the course overview page
    And I add a section
    Then I see the "Collapse All Sections" link
    And all sections are expanded
23

24
    # Skipped because Ubuntu ChromeDriver hangs on alert
25
    @skip
26
	Scenario: Collapse link is not removed after last section of a course is deleted
27
		Given I have a course with 1 section
28 29 30
    And I navigate to the course overview page
    When I press the "section" delete icon
    And I confirm the alert
31
		Then I see the "Collapse All Sections" link
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

	Scenario: Collapsing all sections when all sections are expanded
		Given I navigate to the courseware page of a course with multiple sections
		And all sections are expanded
		When I click the "Collapse All Sections" link
		Then I see the "Expand All Sections" link
		And all sections are collapsed

	Scenario: Collapsing all sections when 1 or more sections are already collapsed
		Given I navigate to the courseware page of a course with multiple sections
		And all sections are expanded
		When I collapse the first section
		And I click the "Collapse All Sections" link
		Then I see the "Expand All Sections" link
		And all sections are collapsed

	Scenario: Expanding all sections when all sections are collapsed
		Given I navigate to the courseware page of a course with multiple sections
		And I click the "Collapse All Sections" link
		When I click the "Expand All Sections" link
		Then I see the "Collapse All Sections" link
		And all sections are expanded

	Scenario: Expanding all sections when 1 or more sections are already expanded
		Given I navigate to the courseware page of a course with multiple sections
		And I click the "Collapse All Sections" link
		When I expand the first section
		And I click the "Expand All Sections" link
		Then I see the "Collapse All Sections" link
61
		And all sections are expanded