Commit a5858aaf by Tim Krones

Fix tests that were failing prior to changes in previous commit.

parent 7a42ee57
......@@ -50,6 +50,9 @@ class BaseIntegrationTest(SeleniumBaseTest):
def _get_feedback_message(self):
return self._page.find_element_by_css_selector(".feedback .message")
def scroll_down(self, pixels=50):
self.browser.execute_script("$(window).scrollTop({})".format(pixels))
def get_element_html(self, element):
return element.get_attribute('innerHTML').strip()
......
......@@ -129,9 +129,11 @@ class InteractionTestFixture(BaseIntegrationTest):
input_div = self._get_input_div_by_value(item_key)
self.wait_until_has_class('correct', input_div)
self.wait_until_exists('.reset-button')
self.wait_until_html_in(self.feedback['final'], self._get_feedback_message())
# Scroll "Reset exercise" button into view to make sure Selenium can successfully click it
self.scroll_down()
reset = self._page.find_element_by_css_selector('.reset-button')
reset.click()
......
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