def test_color_setting(request, name): """ Tests color settings Metadata: test_flag: visuals """ sel.force_navigate("my_settings_visual") cg = ColorGroup('Header Accent Color') default_color = cg.active set_header_color(name) assert is_header_color_changed(name), "Header Accent Color setting failed" reset_default_color(default_color)
def reset_default_color(default_color): cg = ColorGroup('Header Accent Color') if cg.active != default_color: cg.choose(default_color) sel.click(form_buttons.save)
def is_header_color_changed(name): cg = ColorGroup('Header Accent Color') if cg.active == name: return cg.status(name)
def set_header_color(name): cg = ColorGroup('Header Accent Color') if cg.active != name: cg.choose(name) sel.click(form_buttons.save)