From 452a1f1fbbae1d6982f6369c6487f948ff0ec35d Mon Sep 17 00:00:00 2001 From: Ben Patterson Date: Wed, 8 Feb 2017 13:44:47 -0500 Subject: [PATCH] Refactor click since it was resulting in timeout errors; use correct id for one of the LTI stub's buttons. --- common/djangoapps/terrain/stubs/lti.py | 2 +- lms/djangoapps/courseware/features/lti.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/djangoapps/terrain/stubs/lti.py b/common/djangoapps/terrain/stubs/lti.py index fd43cef180..537c3dc5f2 100644 --- a/common/djangoapps/terrain/stubs/lti.py +++ b/common/djangoapps/terrain/stubs/lti.py @@ -194,7 +194,7 @@ class StubLtiHandler(StubHttpRequestHandler):
- +
diff --git a/lms/djangoapps/courseware/features/lti.py b/lms/djangoapps/courseware/features/lti.py index fa2250f9ff..ff3942df58 100644 --- a/lms/djangoapps/courseware/features/lti.py +++ b/lms/djangoapps/courseware/features/lti.py @@ -359,8 +359,9 @@ def click_grade(_step, version): location = world.scenario_dict['LTI'].location.html_id() iframe_name = 'ltiFrame-' + location with world.browser.get_iframe(iframe_name) as iframe: - world.wait_for_visible('#' + version_map[version]['selector']) - iframe.find_by_name(version_map[version]['selector']).first.click() + css_loc = '#' + version_map[version]['selector'] + world.wait_for_visible(css_loc) + world.css_click(css_loc) assert iframe.is_text_present(version_map[version]['expected_text'])