From 85ff219e1d7b3d0549e0944c171272ccea13a739 Mon Sep 17 00:00:00 2001 From: cahrens Date: Wed, 6 Jan 2016 14:22:10 -0500 Subject: [PATCH] Delete lettuce tests already converted to bok choy. TNL-3915 --- .../features/course-outline.feature | 60 -------- .../contentstore/features/course-outline.py | 133 ------------------ 2 files changed, 193 deletions(-) delete mode 100644 cms/djangoapps/contentstore/features/course-outline.feature delete mode 100644 cms/djangoapps/contentstore/features/course-outline.py diff --git a/cms/djangoapps/contentstore/features/course-outline.feature b/cms/djangoapps/contentstore/features/course-outline.feature deleted file mode 100644 index 2fc93c2c6e..0000000000 --- a/cms/djangoapps/contentstore/features/course-outline.feature +++ /dev/null @@ -1,60 +0,0 @@ -@shard_1 -Feature: CMS.Course Outline - In order to quickly view the details of a course's section and set release dates and grading - As a course author - I want to use the course outline page - - Scenario: The default layout for the outline page is to show sections in expanded view - Given I have a course with multiple sections - When I navigate to the course outline page - Then I see the "Collapse All Sections" link - And all sections are expanded - - Scenario: Expand /collapse for a course with no sections - Given I have a course with no sections - When I navigate to the course outline page - Then I do not see the "Collapse All Sections" link - - Scenario: Collapse link appears after creating first section of a course - Given I have a course with no sections - When I navigate to the course outline page - And I add a section - Then I see the "Collapse All Sections" link - And all sections are expanded - - Scenario: Collapse link is removed after last section of a course is deleted - Given I have a course with 1 section - And I navigate to the course outline page - And I press the section delete icon - When I will confirm all alerts - Then I do not see the "Collapse All Sections" link - - Scenario: Collapsing all sections when all sections are expanded - Given I navigate to the outline 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 outline 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 outline 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 outline 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 - And all sections are expanded diff --git a/cms/djangoapps/contentstore/features/course-outline.py b/cms/djangoapps/contentstore/features/course-outline.py deleted file mode 100644 index 650f4d6475..0000000000 --- a/cms/djangoapps/contentstore/features/course-outline.py +++ /dev/null @@ -1,133 +0,0 @@ -# pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name - -from lettuce import world, step -from common import * -from nose.tools import assert_true, assert_false - -from logging import getLogger -logger = getLogger(__name__) - - -@step(u'I have a course with no sections$') -def have_a_course(step): - world.clear_courses() - course = world.CourseFactory.create() - - -@step(u'I have a course with 1 section$') -def have_a_course_with_1_section(step): - world.clear_courses() - course = world.CourseFactory.create() - section = world.ItemFactory.create(parent_location=course.location) - subsection1 = world.ItemFactory.create( - parent_location=section.location, - category='sequential', - display_name='Subsection One',) - - -@step(u'I have a course with multiple sections$') -def have_a_course_with_two_sections(step): - world.clear_courses() - course = world.CourseFactory.create() - section = world.ItemFactory.create(parent_location=course.location) - subsection1 = world.ItemFactory.create( - parent_location=section.location, - category='sequential', - display_name='Subsection One',) - section2 = world.ItemFactory.create( - parent_location=course.location, - display_name='Section Two',) - subsection2 = world.ItemFactory.create( - parent_location=section2.location, - category='sequential', - display_name='Subsection Alpha',) - subsection3 = world.ItemFactory.create( - parent_location=section2.location, - category='sequential', - display_name='Subsection Beta',) - - -@step(u'I navigate to the course outline page$') -def navigate_to_the_course_outline_page(step): - create_studio_user(is_staff=True) - log_into_studio() - course_locator = 'a.course-link' - world.css_click(course_locator) - - -@step(u'I navigate to the outline page of a course with multiple sections') -def nav_to_the_outline_page_of_a_course_with_multiple_sections(step): - step.given('I have a course with multiple sections') - step.given('I navigate to the course outline page') - - -@step(u'I add a section') -def i_add_a_section(step): - add_section() - - -@step(u'I press the section delete icon') -def i_press_the_section_delete_icon(step): - delete_locator = 'section .outline-section > .section-header a.delete-button' - world.css_click(delete_locator) - - -@step(u'I will confirm all alerts') -def i_confirm_all_alerts(step): - confirm_locator = '.prompt .nav-actions button.action-primary' - world.css_click(confirm_locator) - - -@step(u'I see the "([^"]*) All Sections" link$') -def i_see_the_collapse_expand_all_span(step, text): - if text == "Collapse": - span_locator = '.button-toggle-expand-collapse .collapse-all .label' - elif text == "Expand": - span_locator = '.button-toggle-expand-collapse .expand-all .label' - assert_true(world.css_visible(span_locator)) - - -@step(u'I do not see the "([^"]*) All Sections" link$') -def i_do_not_see_the_collapse_expand_all_span(step, text): - if text == "Collapse": - span_locator = '.button-toggle-expand-collapse .collapse-all .label' - elif text == "Expand": - span_locator = '.button-toggle-expand-collapse .expand-all .label' - assert_false(world.css_visible(span_locator)) - - -@step(u'I click the "([^"]*) All Sections" link$') -def i_click_the_collapse_expand_all_span(step, text): - if text == "Collapse": - span_locator = '.button-toggle-expand-collapse .collapse-all .label' - elif text == "Expand": - span_locator = '.button-toggle-expand-collapse .expand-all .label' - assert_true(world.browser.is_element_present_by_css(span_locator)) - world.css_click(span_locator) - - -@step(u'I ([^"]*) the first section$') -def i_collapse_expand_a_section(step, text): - if text == "collapse": - locator = 'section .outline-section .ui-toggle-expansion' - elif text == "expand": - locator = 'section .outline-section .ui-toggle-expansion' - world.css_click(locator) - - -@step(u'all sections are ([^"]*)$') -def all_sections_are_collapsed_or_expanded(step, text): - subsection_locator = 'div.subsection-list' - subsections = world.css_find(subsection_locator) - for index in range(len(subsections)): - if text == "collapsed": - assert_false(world.css_visible(subsection_locator, index=index)) - elif text == "expanded": - assert_true(world.css_visible(subsection_locator, index=index)) - - -@step(u"I change an assignment's grading status") -def change_grading_status(step): - world.css_find('a.menu-toggle').click() - world.css_find('.menu li').first.click()