diff --git a/cms/djangoapps/contentstore/features/advanced-settings.py b/cms/djangoapps/contentstore/features/advanced-settings.py index ea5b24b21f..3acebecac8 100644 --- a/cms/djangoapps/contentstore/features/advanced-settings.py +++ b/cms/djangoapps/contentstore/features/advanced-settings.py @@ -19,9 +19,7 @@ DISPLAY_NAME_VALUE = '"Robot Super Course"' ############### ACTIONS #################### @step('I select the Advanced Settings$') def i_select_advanced_settings(step): - expand_icon_css = 'li.nav-course-settings i.icon-expand' - if world.browser.is_element_present_by_css(expand_icon_css): - world.css_click(expand_icon_css) + world.click_course_settings() link_css = 'li.nav-course-settings-advanced a' world.css_click(link_css) diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index 1c9fbf0994..9552d35036 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -10,9 +10,7 @@ from selenium.common.exceptions import StaleElementReferenceException ############### ACTIONS #################### @step('I select Checklists from the Tools menu$') def i_select_checklists(step): - expand_icon_css = 'li.nav-course-tools i.icon-expand' - if world.browser.is_element_present_by_css(expand_icon_css): - world.css_click(expand_icon_css) + world.click_tools() link_css = 'li.nav-course-tools-checklists a' world.css_click(link_css) diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index d69266b7de..bd86fff9b7 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -25,9 +25,7 @@ DEFAULT_TIME = "00:00" ############### ACTIONS #################### @step('I select Schedule and Details$') def test_i_select_schedule_and_details(step): - expand_icon_css = 'li.nav-course-settings i.icon-expand' - if world.browser.is_element_present_by_css(expand_icon_css): - world.css_click(expand_icon_css) + world.click_course_settings() link_css = 'li.nav-course-settings-schedule a' world.css_click(link_css) diff --git a/cms/djangoapps/contentstore/features/courses.py b/cms/djangoapps/contentstore/features/courses.py index 5da7720945..aa2e9d68f8 100644 --- a/cms/djangoapps/contentstore/features/courses.py +++ b/cms/djangoapps/contentstore/features/courses.py @@ -62,4 +62,4 @@ def i_am_on_tab(step, tab_name): @step('I see a link for adding a new section$') def i_see_new_section_link(step): link_css = 'a.new-courseware-section-button' - assert world.css_has_text(link_css, '+ New Section') + assert world.css_has_text(link_css, 'New Section') diff --git a/cms/djangoapps/contentstore/features/section.py b/cms/djangoapps/contentstore/features/section.py index 59c5a37b33..9a896d8ebe 100644 --- a/cms/djangoapps/contentstore/features/section.py +++ b/cms/djangoapps/contentstore/features/section.py @@ -62,7 +62,7 @@ def i_click_to_edit_section_name(step): @step('I see the complete section name with a quote in the editor$') def i_see_complete_section_name_with_quote_in_editor(step): - css = '.edit-section-name' + css = '.section-name-edit input[type=text]' assert world.is_css_present(css) assert_equal(world.browser.find_by_css(css).value, 'Section with "Quote"') diff --git a/cms/templates/checklists.html b/cms/templates/checklists.html index e5227c71fd..6f78e952c0 100644 --- a/cms/templates/checklists.html +++ b/cms/templates/checklists.html @@ -9,7 +9,6 @@ - - diff --git a/cms/templates/settings.html b/cms/templates/settings.html index 5baf460e25..2adc0cd980 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -15,7 +15,6 @@ from contentstore import utils - diff --git a/cms/templates/settings_advanced.html b/cms/templates/settings_advanced.html index 0400d95694..242148418e 100644 --- a/cms/templates/settings_advanced.html +++ b/cms/templates/settings_advanced.html @@ -11,7 +11,6 @@ from contentstore import utils <%block name="jsextra"> - diff --git a/cms/templates/settings_discussions_faculty.html b/cms/templates/settings_discussions_faculty.html index fc30b6eebb..5dfb4b76ae 100644 --- a/cms/templates/settings_discussions_faculty.html +++ b/cms/templates/settings_discussions_faculty.html @@ -6,27 +6,26 @@ <%namespace name='static' file='static_content.html'/> <%! -from contentstore import utils +from contentstore import utils %> <%block name="jsextra"> - - + <%block name="content">
-
+

Settings

@@ -74,7 +73,7 @@ from contentstore import utils
A brief description of your education, experience, and expertise -
+
Delete Faculty Member @@ -102,7 +101,7 @@ from contentstore import utils Upload Faculty Photo - Max size: 30KB + Max size: 30KB
@@ -114,7 +113,7 @@ from contentstore import utils A brief description of your education, experience, and expertise - + @@ -143,7 +142,7 @@ from contentstore import utils
- +
randomize all problems @@ -217,7 +216,7 @@ from contentstore import utils
- +
randomize all problems @@ -283,7 +282,7 @@ from contentstore import utils

Discussions

- +

General Settings

@@ -296,7 +295,7 @@ from contentstore import utils
- +
Students and faculty will be able to post anonymously @@ -320,7 +319,7 @@ from contentstore import utils
- +
Students and faculty will be able to post anonymously @@ -329,7 +328,7 @@ from contentstore import utils
- +
This option is disabled since there are previous discussions that are anonymous. @@ -351,7 +350,7 @@ from contentstore import utils - +
  • diff --git a/cms/templates/settings_graders.html b/cms/templates/settings_graders.html index ceab8cd862..2c6846bece 100644 --- a/cms/templates/settings_graders.html +++ b/cms/templates/settings_graders.html @@ -12,7 +12,6 @@ from contentstore import utils - diff --git a/common/djangoapps/terrain/ui_helpers.py b/common/djangoapps/terrain/ui_helpers.py index 40b839ae24..79e9b0afdb 100644 --- a/common/djangoapps/terrain/ui_helpers.py +++ b/common/djangoapps/terrain/ui_helpers.py @@ -123,3 +123,17 @@ def save_the_html(path='/tmp'): f = open('%s/%s' % (path, filename), 'w') f.write(html) f.close() + + +@world.absorb +def click_course_settings(): + course_settings_css = 'li.nav-course-settings' + if world.browser.is_element_present_by_css(course_settings_css): + world.css_click(course_settings_css) + + +@world.absorb +def click_tools(): + tools_css = 'li.nav-course-tools' + if world.browser.is_element_present_by_css(tools_css): + world.css_click(tools_css)