Commit 9cce3a9a by JonahStanley

Cleaned up some tests and made them work for firefox

parent 46d0e5ed
......@@ -42,9 +42,9 @@ def add_other_user(_step, name):
world.wait(0.5)
email_css = 'input#user-email-input'
f = world.css_find(email_css)
f._element.send_keys(name, EMAIL_EXTENSION)
world.css_fill(email_css, name + EMAIL_EXTENSION)
world.trigger_event(email_css)
from pdb import set_trace;set_trace()
confirm_css = 'form.create-user button.action-primary'
world.css_click(confirm_css)
......
......@@ -41,13 +41,9 @@ def change_name(_step, new_name):
settings_css = '#settings-mode a'
world.css_click(settings_css)
input_css = 'input.setting-input'
name_input = world.css_find(input_css)
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)
world.css_fill(input_css, new_name)
if world.is_firefox():
world.trigger_event(input_css)
save_button = 'a.save-button'
world.css_click(save_button)
......
......@@ -45,6 +45,8 @@ def click_new_textbook(_step, on):
def name_textbook(_step, name):
input_css = ".textbook input[name=textbook-name]"
world.css_fill(input_css, name)
if world.is_firefox():
world.trigger_event(input_css)
@step(u'I name the (first|second|third) chapter "([^"]*)"')
......@@ -52,6 +54,8 @@ def name_chapter(_step, ordinal, name):
index = ["first", "second", "third"].index(ordinal)
input_css = ".textbook .chapter{i} input.chapter-name".format(i=index+1)
world.css_fill(input_css, name)
if world.is_firefox():
world.trigger_event(input_css)
@step(u'I type in "([^"]*)" for the (first|second|third) chapter asset')
......@@ -59,6 +63,8 @@ def asset_chapter(_step, name, ordinal):
index = ["first", "second", "third"].index(ordinal)
input_css = ".textbook .chapter{i} input.chapter-asset-path".format(i=index+1)
world.css_fill(input_css, name)
if world.is_firefox():
world.trigger_event(input_css)
@step(u'I click the Upload Asset link for the (first|second|third) chapter')
......
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