diff --git a/lms/djangoapps/courseware/features/lti.feature b/lms/djangoapps/courseware/features/lti.feature index 84514b533b..c0eed13ff6 100644 --- a/lms/djangoapps/courseware/features/lti.feature +++ b/lms/djangoapps/courseware/features/lti.feature @@ -26,12 +26,6 @@ Feature: LMS.LTI component | False | Then I view the LTI but incorrect_signature warning is rendered - #4 - Scenario: LTI component in LMS is correctly rendered in new page - Given the course has correct LTI credentials with registered Instructor - And the course has an LTI component with correct fields - Then I view the LTI and it is rendered in new page - #5 Scenario: LTI component in LMS is correctly rendered in iframe Given the course has correct LTI credentials with registered Instructor diff --git a/lms/djangoapps/courseware/features/lti.py b/lms/djangoapps/courseware/features/lti.py index b175e5802d..f4d496d83f 100644 --- a/lms/djangoapps/courseware/features/lti.py +++ b/lms/djangoapps/courseware/features/lti.py @@ -44,25 +44,16 @@ def check_lti_iframe_content(text): )) -@step('I view the LTI and it is rendered in (.*)$') -def lti_is_rendered(_step, rendered_in): - if rendered_in.strip() == 'iframe': - world.wait_for_present('iframe') - assert world.is_css_present('iframe', wait_time=2) - assert not world.is_css_present('.link_lti_new_window', wait_time=0) - assert not world.is_css_present('.error_message', wait_time=0) +@step('I view the LTI and it is rendered in iframe$') +def lti_is_rendered_iframe(_step): + world.wait_for_present('iframe') # pylint: disable=no-member + assert world.is_css_present('iframe', wait_time=2) # pylint: disable=no-member + assert not world.is_css_present('.link_lti_new_window', wait_time=0) # pylint: disable=no-member + assert not world.is_css_present('.error_message', wait_time=0) # pylint: disable=no-member - # iframe is visible - assert world.css_visible('iframe') - check_lti_iframe_content("This is LTI tool. Success.") - - elif rendered_in.strip() == 'new page': - assert not world.is_css_present('iframe', wait_time=2) - assert world.is_css_present('.link_lti_new_window', wait_time=0) - assert not world.is_css_present('.error_message', wait_time=0) - click_and_check_lti_popup() - else: # incorrect rendered_in parameter - assert False + # iframe is visible + assert world.css_visible('iframe') # pylint: disable=no-member + check_lti_iframe_content("This is LTI tool. Success.") @step('I view the permission alert$')