From 089a61c6af348ac4b079e8606fccaa41410a02c6 Mon Sep 17 00:00:00 2001 From: Frances Botsford Date: Fri, 6 Dec 2013 21:12:52 -0500 Subject: [PATCH] studio outline test fixes --- .../contentstore/features/common.py | 6 +- .../contentstore/features/section.py | 6 +- .../coffee/spec/views/overview_spec.coffee | 124 ++++++++++-------- cms/static/js/views/overview.js | 8 +- cms/static/sass/views/_outline.scss | 5 +- .../js/blank-slate-template.underscore | 19 --- .../js/new-section-template.underscore | 15 --- .../js/new-subsection-template.underscore | 18 --- .../js/no-outline-content.underscore | 3 - cms/templates/overview.html | 18 +-- cms/templates/widgets/units.html | 2 +- 11 files changed, 90 insertions(+), 134 deletions(-) delete mode 100644 cms/templates/js/blank-slate-template.underscore delete mode 100644 cms/templates/js/new-section-template.underscore delete mode 100644 cms/templates/js/new-subsection-template.underscore delete mode 100644 cms/templates/js/no-outline-content.underscore diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 4a500c9e16..cd9c00c09c 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -43,9 +43,9 @@ def i_confirm_with_ok(_step): @step(u'I press the "([^"]*)" delete icon$') def i_press_the_category_delete_icon(_step, category): if category == 'section': - css = 'a.delete-button.delete-section-button span.delete-icon' + css = 'a.action.delete-section-button' elif category == 'subsection': - css = 'a.delete-button.delete-subsection-button span.delete-icon' + css = 'a.action.delete-subsection-button' else: assert False, 'Invalid category: %s' % category world.css_click(css) @@ -254,7 +254,7 @@ def create_course_with_unit(): world.wait_for_js_to_load() css_selectors = [ - 'div.section-item a.expand-collapse-icon', 'a.new-unit-item' + 'div.section-item a.expand-collapse', 'a.new-unit-item' ] for selector in css_selectors: world.css_click(selector) diff --git a/cms/djangoapps/contentstore/features/section.py b/cms/djangoapps/contentstore/features/section.py index b6f55969bb..b1e9ee2e12 100644 --- a/cms/djangoapps/contentstore/features/section.py +++ b/cms/djangoapps/contentstore/features/section.py @@ -29,7 +29,7 @@ def i_have_added_new_section(_step): @step('I click the Edit link for the release date$') def i_click_the_edit_link_for_the_release_date(_step): - button_css = 'div.section-published-date a.edit-button' + button_css = 'div.section-published-date a.edit-release-date' world.css_click(button_css) @@ -88,7 +88,7 @@ def i_see_a_release_date_for_my_section(_step): status_text = world.css_text(css) # e.g. 11/06/2012 at 16:25 - msg = 'Will Release:' + msg = 'Release date:' date_regex = r'(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d?, \d{4}' if not re.search(date_regex, status_text): print status_text, date_regex @@ -117,7 +117,7 @@ def the_section_release_date_picker_not_visible(_step): def the_section_release_date_is_updated(_step): css = 'span.published-status' status_text = world.css_text(css) - assert_equal(status_text, 'Will Release: 12/25/2013 at 00:00 UTC') + assert_equal(status_text, 'Release date: 12/25/2013 at 00:00 UTC') def save_section_name(name): diff --git a/cms/static/coffee/spec/views/overview_spec.coffee b/cms/static/coffee/spec/views/overview_spec.coffee index 2082e4747b..02de783412 100644 --- a/cms/static/coffee/spec/views/overview_spec.coffee +++ b/cms/static/coffee/spec/views/overview_spec.coffee @@ -6,65 +6,77 @@ define ["js/views/overview", "js/views/feedback_notification", "sinon", "js/base appendSetFixtures """
- Will Release: 06/12/2013 at 04:00 UTC + Release date: 06/12/2013 at 04:00 UTC - Edit + Edit section release date
""" - + appendSetFixtures """ -
-
-

Section Release Date

-
-
- - -
-
- - -
-
-

On the date set above, this section – – will be released to students. Any units marked private will only be visible to admins.

-
-
- SaveCancel -
-
+ @@ -211,14 +211,14 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v context_course.location.course_id, subsection.location, False, True ) %> -
  • - +
  • @@ -283,12 +283,10 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v aria-hidden="" role="dialog">
    - -
    +

    ${_("Section Release Date")}

    ${_('On the date set below, this section - {name} - will be released to students. Any units marked private will only be visible to admins.').format(name='')}

    -
    • @@ -299,9 +297,7 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
    -
    -

    ${_("Form Actions")}

      diff --git a/cms/templates/widgets/units.html b/cms/templates/widgets/units.html index f5f35736cb..b9c89eb5bd 100644 --- a/cms/templates/widgets/units.html +++ b/cms/templates/widgets/units.html @@ -41,7 +41,7 @@ This def will enumerate through a passed in subsection and list all of the units Delete unit
    • - +