Exemplo n.º 1
0
def fill_design_page_branched_single_addon(
    selenium, base_url, request, variables, fill_overview
):
    """Fills design page according to branched single addon requirements."""
    experiment_type = getattr(request.module, "experiment_type", None)
    design = DesignPage(selenium, base_url, experiment_url=f"{fill_overview.url}").open()
    design = design.wait_for_page_to_load()
    design.signed_addon_url = f"{variables[experiment_type]['addon_url']}"
    current_branchs = design.current_branches
    control_branch = current_branchs[0]
    control_branch.branch_name = (
        f"{variables[experiment_type]['branches'][0]['branch_name']}"
    )
    control_branch.branch_description = "THIS IS A TEST"
    control_branch.branch_description = (
        f"{variables[experiment_type]['branches'][0]['branch_description']}"
    )
    current_branchs[
        1
    ].branch_name = f"{variables[experiment_type]['branches'][1]['branch_name']}"
    current_branchs[1].branch_description = "THIS IS A TEST"
    current_branchs[
        1
    ].branch_description = (
        f"{variables[experiment_type]['branches'][1]['branch_description']}"
    )
    design.save_btn()
    return design
Exemplo n.º 2
0
def fill_design_page_branched_single_addon(
    selenium, base_url, request, default_data, experiment_type, fill_overview
):
    """Fills design page according to branched single addon requirements."""
    design = DesignPage(selenium, base_url, experiment_url=f"{fill_overview.url}").open()
    design = design.wait_for_page_to_load()
    design.signed_addon_url = default_data.addon_url
    current_branchs = design.current_branches
    control_branch = current_branchs[0]
    control_branch.branch_name = default_data.branches[0].branch_name
    control_branch.branch_description = "THIS IS A TEST"
    control_branch.branch_description = default_data.branches[0].branch_description
    current_branchs[1].branch_name = default_data.branches[1].branch_name
    current_branchs[1].branch_description = "THIS IS A TEST"
    current_branchs[1].branch_description = default_data.branches[1].branch_description
    design.save_btn()
    return design