Commit 94d0ad55 by JonahStanley

Fixed issue preventing navigation to various course setting pages

parent 214ccaab
...@@ -9,7 +9,7 @@ from common import type_in_codemirror ...@@ -9,7 +9,7 @@ from common import type_in_codemirror
@step(u'I go to the course updates page') @step(u'I go to the course updates page')
def go_to_updates(_step): def go_to_updates(_step):
menu_css = 'li.nav-course-courseware' menu_css = 'li.nav-course-courseware'
updates_css = 'li.nav-course-courseware-updates' updates_css = 'li.nav-course-courseware-updates a'
world.css_click(menu_css) world.css_click(menu_css)
world.css_click(updates_css) world.css_click(updates_css)
......
...@@ -8,7 +8,7 @@ from selenium.webdriver.common.keys import Keys ...@@ -8,7 +8,7 @@ from selenium.webdriver.common.keys import Keys
@step(u'I go to the static pages page') @step(u'I go to the static pages page')
def go_to_static(_step): def go_to_static(_step):
menu_css = 'li.nav-course-courseware' menu_css = 'li.nav-course-courseware'
static_css = 'li.nav-course-courseware-pages' static_css = 'li.nav-course-courseware-pages a'
world.css_click(menu_css) world.css_click(menu_css)
world.css_click(static_css) world.css_click(static_css)
...@@ -38,13 +38,15 @@ def click_edit_delete(_step, edit_delete, page): ...@@ -38,13 +38,15 @@ def click_edit_delete(_step, edit_delete, page):
@step(u'I change the name to "([^"]*)"$') @step(u'I change the name to "([^"]*)"$')
def change_name(_step, new_name): def change_name(_step, new_name):
settings_css = '#settings-mode' settings_css = '#settings-mode a'
world.css_click(settings_css) world.css_click(settings_css)
input_css = 'input.setting-input' input_css = 'input.setting-input'
name_input = world.css_find(input_css) name_input = world.css_find(input_css)
old_name = name_input.value if world.is_mac():
for count in range(len(old_name)): name_input._element.send_keys(Keys.COMMAND + 'a')
name_input._element.send_keys(Keys.END, Keys.BACK_SPACE) else:
name_input._element.send_keys(Keys.CONTROL + 'a')
name_input._element.send_keys(Keys.DELETE)
name_input._element.send_keys(new_name) name_input._element.send_keys(new_name)
save_button = 'a.save-button' save_button = 'a.save-button'
world.css_click(save_button) world.css_click(save_button)
......
...@@ -11,8 +11,8 @@ TEST_ROOT = settings.COMMON_TEST_DATA_ROOT ...@@ -11,8 +11,8 @@ TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
@step(u'I go to the textbooks page') @step(u'I go to the textbooks page')
def go_to_uploads(_step): def go_to_uploads(_step):
world.click_course_content() world.click_course_content()
menu_css = 'li.nav-course-courseware-textbooks' menu_css = 'li.nav-course-courseware-textbooks a'
world.css_find(menu_css).click() world.css_click(menu_css)
@step(u'I should see a message telling me to create a new textbook') @step(u'I should see a message telling me to create a new textbook')
......
...@@ -33,7 +33,8 @@ def hide_or_show_captions(step, shown): ...@@ -33,7 +33,8 @@ def hide_or_show_captions(step, shown):
# click the button rather than the tooltip, so move the mouse # click the button rather than the tooltip, so move the mouse
# away to make it disappear. # away to make it disappear.
button = world.css_find(button_css) button = world.css_find(button_css)
button.mouse_out() if world.browser.driver_name != 'Firefox':
button.mouse_out()
world.css_click(button_css) world.css_click(button_css)
@step('I edit the component') @step('I edit the component')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment