def test_firefox_channel_updates_correctly(selenium, base_url, fill_overview): """Test selecting a Firefox Channel.""" timeline_pop_form = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}").open() assert timeline_pop_form.firefox_channel == "Firefox Channel" channel = "Nightly" timeline_pop_form.firefox_channel = channel assert timeline_pop_form.firefox_channel == channel
def test_platform_selection_updates_correctly(selenium, base_url, fill_overview): """Test platform selection updates.""" timeline_pop_form = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}").open() assert timeline_pop_form.platform == "All Platforms" channel = "All Linux" timeline_pop_form.platform = channel assert timeline_pop_form.platform == channel
def test_firefox_max_version_updates_correctly(selenium, base_url, fill_overview): """Test setting a Firefox max version.""" timeline_pop_form = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}").open() assert timeline_pop_form.firefox_max_version == "Versions" version = "78.0" timeline_pop_form.firefox_max_version = version assert timeline_pop_form.firefox_max_version == version
def test_population_percentage_updates_correctly(selenium, base_url, fill_overview): """Test Population percentage updates.""" timeline_pop_form = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}").open() assert timeline_pop_form.population_percentage == "0.0000" percentage = "37.0" timeline_pop_form.population_percentage = percentage assert timeline_pop_form.population_percentage == percentage
def test_proposed_enrollment_duration_updates_correctly( selenium, base_url, fill_overview): """Test proposed enrolled duration updates.""" timeline_pop_form = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}").open() assert timeline_pop_form.proposed_enrollment_duration == "" duration = "50" timeline_pop_form.proposed_enrollment_duration = duration assert timeline_pop_form.proposed_enrollment_duration == duration
def test_proposed_start_date_fills_correctly(selenium, base_url, fill_overview): """Test proposed start date fills.""" timeline_pop_form = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}").open() assert timeline_pop_form.proposed_start_date == "" date = f"{datetime.datetime.now()}" new_date = parse(date) today = f"{new_date.date()}" timeline_pop_form.proposed_start_date = today assert timeline_pop_form.proposed_start_date == today
def save_and_continue_btn(self): self.find_element(*self._save_and_continue_btn_locator).click() from pages.experiment_timeline_and_population import TimelineAndPopulationPage return TimelineAndPopulationPage( self.driver, self.base_url ).wait_for_page_to_load()
def fill_timeline_page_pref_rollout( selenium, base_url, request, default_data, experiment_type, fill_overview ): """Fills timeline page according to pref rollout requirements.""" timeline = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}" ).open() timeline.wait_for_page_to_load() date = f"{datetime.datetime.now()}" new_date = parse(date) today = f"{new_date.date()}" timeline.proposed_start_date = today timeline.proposed_experiment_duration = "25" timeline.rollout_playbook = "Low Risk Schedule" timeline.firefox_channel = default_data.channels timeline.firefox_min_version = f"{default_data.min_version}.0" timeline.firefox_max_version = f"{default_data.max_version}.0" timeline.save_btn() return timeline
def fill_timeline_page( selenium, base_url, request, default_data, experiment_type, fill_overview ): """Fills timeline page.""" timeline = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}" ).open() timeline.wait_for_page_to_load() date = f"{datetime.datetime.now()}" new_date = parse(date) today = f"{new_date.date()}" timeline.proposed_start_date = today timeline.proposed_experiment_duration = "25" timeline.population_percentage = "100.0" timeline.firefox_channel = default_data.channels timeline.firefox_min_version = f"{default_data.min_version}.0" timeline.firefox_max_version = f"{default_data.max_version}.0" timeline.save_btn() return timeline
def fill_timeline_page(selenium, base_url, request, variables, experiment_type, fill_overview): """Fills timeline page.""" timeline = TimelineAndPopulationPage( selenium, base_url, experiment_url=f"{fill_overview.url}").open() timeline.wait_for_page_to_load() date = f"{datetime.datetime.now()}" new_date = parse(date) today = f"{new_date.date()}" timeline.proposed_start_date = today timeline.proposed_experiment_duration = "25" timeline.population_precentage = "100.0" if request.node.get_closest_marker("use_variables"): timeline.firefox_channel = f"{variables[experiment_type]['channels']}" timeline.firefox_min_version = f"{variables[experiment_type]['min_version']}" timeline.firefox_max_version = f"{variables[experiment_type]['max_version']}" else: timeline.firefox_channel = "nightly" timeline.firefox_min_version = "75" timeline.firefox_max_version = "100" timeline.save_btn() return timeline