Commit 20ce33dc by JonahStanley

Fixed broken tests from chrome versioning

parent 166aea62
......@@ -242,7 +242,9 @@ def save_button_disabled(step):
@step('I confirm the prompt')
def confirm_the_prompt(step):
prompt_css = 'a.button.action-primary'
world.wait_for(lambda _driver: world.css_visible(prompt_css))
world.css_click(prompt_css)
world.wait_for(lambda _driver: not world.css_visible(prompt_css))
@step(u'I am shown a (.*)$')
......@@ -252,6 +254,7 @@ def i_am_shown_a_notification(step, notification_type):
def type_in_codemirror(index, text):
world.css_click(".CodeMirror", index=index)
world.browser.execute_script("$('div.CodeMirror.CodeMirror-focused > div').css('overflow', '')")
g = world.css_find("div.CodeMirror.CodeMirror-focused > div > textarea")
if world.is_mac():
g._element.send_keys(Keys.COMMAND + 'a')
......
......@@ -39,7 +39,7 @@ def click_component_from_menu(category, boilerplate, expected_css):
elem_css = "a[data-category='{}']:not([data-boilerplate])".format(category)
elements = world.css_find(elem_css)
assert_equal(len(elements), 1)
world.css_click(elem_css)
world.css_click(elem_css, success_condition=lambda: 1 == len(world.css_find(expected_css)))
@world.absorb
......
......@@ -58,7 +58,7 @@ def delete_file(_step, file_name):
world.css_click(delete_css, index=index)
prompt_confirm_css = 'li.nav-item > a.action-primary'
world.css_click(prompt_confirm_css)
world.css_click(prompt_confirm_css, success_condition=lambda: not world.css_visible(prompt_confirm_css))
@step(u'I should see only one "([^"]*)"$')
......
......@@ -19,5 +19,6 @@ def i_see_the_correct_settings_and_values(step):
@step('I have set "show captions" to (.*)')
def set_show_captions(step, setting):
world.css_click('a.edit-button')
world.wait_for(lambda _driver: world.css_visible('a.save-button'))
world.browser.select('Show Captions', setting)
world.css_click('a.save-button')
......@@ -8,7 +8,7 @@ from nose.tools import assert_in, assert_equals
@step(u'I should see the following Partners in the Partners section')
def i_should_see_partner(step):
partners = world.browser.find_by_css(".partner .name span")
names = set(span.text for span in partners)
names = set(span.html for span in partners)
for partner in step.hashes:
assert_in(partner['Partner'], names)
......
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