def see_a_problem_component(step, category): component_css = '.xmodule_CapaModule' assert_true(world.is_css_present(component_css), 'No problem was added to the unit.') problem_css = '.studio-xblock-wrapper .xblock-student_view' # This view presents the given problem component in uppercase. Assert that the text matches # the component selected assert_true(world.css_contains_text(problem_css, category))
def see_a_problem_component(step, category): component_css = 'div.xmodule_CapaModule' assert_true(world.is_css_present(component_css), 'No problem was added to the unit.') problem_css = 'li.studio-xblock-wrapper div.xblock-student_view' # This view presents the given problem component in uppercase. Assert that the text matches # the component selected (in uppercase) assert_true(world.css_contains_text(problem_css, category.upper())) # pylint: disable=no-value-for-parameter
def check_visibility(self, step, visible): r'the conditional contents are (?P<visible>\w+)$' world.wait_for_ajax_complete() assert_in(visible, ('visible', 'hidden')) if visible == 'visible': world.wait_for_visible('.hidden-contents') assert_true(world.css_visible('.hidden-contents')) else: assert_true(world.is_css_not_present('.hidden-contents')) assert_true(world.css_contains_text('.conditional-message', 'must be attempted before this will become visible.')) # sarina