def video_name_persisted(step): world.css_click("a.save-button") reload_the_page(step) world.wait_for_xmodule() world.edit_component() world.verify_setting_entry(world.get_setting_entry("Display Name"), "Display Name", "3.4", True)
def video_name_persisted(step): world.save_component() reload_the_page(step) world.wait_for_xmodule() world.edit_component() world.verify_setting_entry(world.get_setting_entry(DISPLAY_NAME), DISPLAY_NAME, '3.4', True)
def set_show_captions(step, setting): # Prevent cookies from overriding course settings world.browser.cookies.delete('hide_captions') world.edit_component() world.select_editor_tab('Advanced') world.browser.select('Show Transcript', setting) world.save_component()
def enter_xml_in_advanced_problem(_step, text): """ Edits an advanced problem (assumes only on page), types the provided XML, and saves the component. """ world.edit_component() type_in_codemirror(0, text) world.save_component()
def video_name_persisted(step): world.save_component() reload_the_page(step) world.wait_for_xmodule() world.edit_component() world.verify_setting_entry(world.get_setting_entry('Display Name'), 'Display Name', '3.4', True)
def set_show_captions(step, setting): # Prevent cookies from overriding course settings world.browser.cookies.delete('hide_captions') world.edit_component() world.select_editor_tab('Advanced') world.browser.select('Transcript Display', setting) world.save_component()
def enter_xml_in_advanced_problem(step, text): """ Edits an advanced problem (assumes only on page), types the provided XML, and saves the component. """ world.edit_component() type_in_codemirror(0, text) world.save_component()
def video_name_persisted(step): world.save_component() reload_the_page(step) world.wait_for_xmodule() world.edit_component() world.verify_setting_entry( world.get_setting_entry('Display Name'), 'Display Name', '3.4', True )
def video_name_persisted(step): world.save_component() reload_the_page(step) world.wait_for_xmodule() world.edit_component() world.verify_setting_entry( world.get_setting_entry(DISPLAY_NAME), DISPLAY_NAME, '3.4', True )
def i_edit_blank_problem_for_annotation_response(_step): world.edit_component(1) text = """ <problem> <annotationresponse> <annotationinput><text>Text of annotation</text></annotationinput> </annotationresponse> </problem>""" type_in_codemirror(0, text) world.save_component()
def i_enter_bad_xml(step): world.edit_component() type_in_codemirror( 0, """<problem><h1>Smallest Canvas</h1> <p>You want to make the smallest canvas you can.</p> <multiplechoiceresponse> <choicegroup type="MultipleChoice"> <choice correct="false"><verbatim><canvas id="myCanvas" width = 10 height = 100> </canvas></verbatim></choice> <choice correct="true"><code><canvas id="myCanvas" width = 10 height = 10> </canvas></code></choice> </choicegroup> </multiplechoiceresponse> </problem>""") world.save_component(step)
def i_enter_bad_xml(step): world.edit_component() type_in_codemirror( 0, """<problem><h1>Smallest Canvas</h1> <p>You want to make the smallest canvas you can.</p> <multiplechoiceresponse> <choicegroup type="MultipleChoice"> <choice correct="false"><verbatim><canvas id="myCanvas" width = 10 height = 100> </canvas></verbatim></choice> <choice correct="true"><code><canvas id="myCanvas" width = 10 height = 10> </canvas></code></choice> </choicegroup> </multiplechoiceresponse> </problem>""" ) world.save_component(step)
def i_edit_the_component(_step): world.edit_component()
def videoalpha_name_persisted(step): world.css_click('a.save-button') reload_the_page(step) world.edit_component() world.verify_setting_entry(world.get_setting_entry('Display Name'), 'Display Name', '3.4', True)
def open_high_level_source(): world.edit_component() world.css_click('.launch-latex-compiler > a')
def i_click_on_edit_icon(step): world.edit_component()
def edit_component_and_select_settings(): world.edit_component() world.ensure_settings_visible()
def i_can_edit_problem(_step): world.edit_component()
def i_edit_and_select_settings(_step): world.edit_component()
def i_click_on_edit_icon(step): world.edit_component() world.wait_for(lambda _driver: world.css_visible('a.visual-tab')) world.css_click('a.visual-tab')
def i_click_on_edit_icon(_step): world.edit_component()
def video_name_persisted(step): world.css_click('a.save-button') reload_the_page(step) world.edit_component() world.verify_setting_entry(world.get_setting_entry('Display Name'), 'Display Name', '3.4', True)