From 85b75badd7b4db72dccc518f40c0e5615a955eb6 Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Fri, 22 Feb 2013 14:06:27 -0500 Subject: [PATCH] Refactor lettuce commands for navigation to the advanced settings page --- .../features/advanced-settings.feature | 16 ++++++---------- .../contentstore/features/advanced-settings.py | 6 ++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cms/djangoapps/contentstore/features/advanced-settings.feature b/cms/djangoapps/contentstore/features/advanced-settings.feature index c5fcd950fb..f7bebeb2fc 100644 --- a/cms/djangoapps/contentstore/features/advanced-settings.feature +++ b/cms/djangoapps/contentstore/features/advanced-settings.feature @@ -8,24 +8,20 @@ Feature: Advanced (manual) course policy Then I see only the display name Scenario: Test if there are no policy settings without existing UI controls - Given I have opened a new course in Studio - When I select the Advanced Settings - And I delete the display name + Given I am on the Advanced Course Settings page in Studio + When I delete the display name Then there are no advanced policy settings And I reload the page Then there are no advanced policy settings Scenario: Add new entries, and they appear alphabetically after save - Given I have opened a new course in Studio - When I select the Advanced Settings - And I create New Entries + Given I am on the Advanced Course Settings page in Studio + When I create New Entries Then they are alphabetized And I reload the page Then they are alphabetized Scenario: Test how multi-line input appears - Given I have opened a new course in Studio - When I select the Advanced Settings - And I create a JSON object + Given I am on the Advanced Course Settings page in Studio + When I create a JSON object Then it is displayed as formatted - diff --git a/cms/djangoapps/contentstore/features/advanced-settings.py b/cms/djangoapps/contentstore/features/advanced-settings.py index 5c92fc8bce..ebf2e0e41f 100644 --- a/cms/djangoapps/contentstore/features/advanced-settings.py +++ b/cms/djangoapps/contentstore/features/advanced-settings.py @@ -18,6 +18,12 @@ def i_select_advanced_settings(step): css_click(link_css) +@step('I am on the Advanced Course Settings page in Studio$') +def i_am_on_advanced_course_settings(step): + step.given('I have opened a new course in Studio') + step.given('I select the Advanced Settings') + + @step('I see only the display name$') def i_see_only_display_name(step): assert_policy_entries(["display_name"], ['"Robot Super Course"'])