Fixed issue preventing navigation to various course setting pages

This commit is contained in:
JonahStanley
2013-07-30 13:42:31 -04:00
parent 214ccaab5f
commit 94d0ad5563
4 changed files with 12 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ from common import type_in_codemirror
@step(u'I go to the course updates page')
def go_to_updates(_step):
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(updates_css)

View File

@@ -8,7 +8,7 @@ from selenium.webdriver.common.keys import Keys
@step(u'I go to the static pages page')
def go_to_static(_step):
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(static_css)
@@ -38,13 +38,15 @@ def click_edit_delete(_step, edit_delete, page):
@step(u'I change the name to "([^"]*)"$')
def change_name(_step, new_name):
settings_css = '#settings-mode'
settings_css = '#settings-mode a'
world.css_click(settings_css)
input_css = 'input.setting-input'
name_input = world.css_find(input_css)
old_name = name_input.value
for count in range(len(old_name)):
name_input._element.send_keys(Keys.END, Keys.BACK_SPACE)
if world.is_mac():
name_input._element.send_keys(Keys.COMMAND + 'a')
else:
name_input._element.send_keys(Keys.CONTROL + 'a')
name_input._element.send_keys(Keys.DELETE)
name_input._element.send_keys(new_name)
save_button = 'a.save-button'
world.css_click(save_button)

View File

@@ -11,8 +11,8 @@ TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
@step(u'I go to the textbooks page')
def go_to_uploads(_step):
world.click_course_content()
menu_css = 'li.nav-course-courseware-textbooks'
world.css_find(menu_css).click()
menu_css = 'li.nav-course-courseware-textbooks a'
world.css_click(menu_css)
@step(u'I should see a message telling me to create a new textbook')

View File

@@ -33,7 +33,8 @@ def hide_or_show_captions(step, shown):
# click the button rather than the tooltip, so move the mouse
# away to make it disappear.
button = world.css_find(button_css)
button.mouse_out()
if world.browser.driver_name != 'Firefox':
button.mouse_out()
world.css_click(button_css)
@step('I edit the component')