From ff0c56b7fbbea652a05c640f6aa4372633e97d1e Mon Sep 17 00:00:00 2001 From: Peter Fogg Date: Mon, 3 Jun 2013 14:21:50 -0400 Subject: [PATCH] Cleaning up code -- removed unnecessary lines, fixed indentation, renamed method. --- .../component_settings_editor_helpers.py | 4 ---- cms/djangoapps/contentstore/features/video.py | 2 +- cms/static/coffee/src/views/unit.coffee | 3 --- cms/templates/unit.html | 20 +++++++++---------- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 6dbf881b58..43c012dff2 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -14,10 +14,6 @@ def create_component_instance(step, component_button_css, instance_id, expected_ @world.absorb def click_new_component_button(step, component_button_css): - # step.given('I have opened a new course section in Studio') - # step.given('I have added a new subsection') - # step.given('I expand the first section') - # world.css_click('a.new-unit-item') step.given('I have clicked the new unit button') world.css_click(component_button_css) diff --git a/cms/djangoapps/contentstore/features/video.py b/cms/djangoapps/contentstore/features/video.py index 52a8ec6c2e..7cbe8a2258 100644 --- a/cms/djangoapps/contentstore/features/video.py +++ b/cms/djangoapps/contentstore/features/video.py @@ -12,7 +12,7 @@ def does_not_autoplay(step): @step('creating a video takes a single click') -def click_new_component_button(step): +def video_takes_a_single_click(step): assert(not world.is_css_present('.xmodule_VideoModule')) world.css_click("a[data-location='i4x://edx/templates/video/default']") assert(world.is_css_present('.xmodule_VideoModule')) diff --git a/cms/static/coffee/src/views/unit.coffee b/cms/static/coffee/src/views/unit.coffee index a072fcba4b..11d219a546 100644 --- a/cms/static/coffee/src/views/unit.coffee +++ b/cms/static/coffee/src/views/unit.coffee @@ -65,9 +65,6 @@ class CMS.Views.UnitEdit extends Backbone.View event.preventDefault() type = $(event.currentTarget).data('type') - if type == 'video' - $('.new-component-video .new-component-template a').click() - return @$newComponentTypePicker.slideUp(250) @$(".new-component-#{type}").slideDown(250) $('html, body').animate({ diff --git a/cms/templates/unit.html b/cms/templates/unit.html index 12fd392477..bb2a8f5193 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -54,16 +54,16 @@
Add New Component