コード例 #1
0
ファイル: test_install.py プロジェクト: kgeorgiou/testpilot
def test_bottom_install_button(base_url, selenium, firefox, notifications):
    page = Home(selenium, base_url).open()
    page.bottom_install_button()
    firefox.browser.wait_for_notification(
        notifications.AddOnInstallConfirmation).install()
    firefox.browser.wait_for_notification(
        notifications.AddOnInstallComplete).close()
コード例 #2
0
def test_bottom_install_button(base_url, selenium, firefox, notifications):
    page = Home(selenium, base_url).open()
    page.bottom_install_button()
    firefox.browser.wait_for_notification(
        notifications.AddOnInstallConfirmation).install()
    firefox.browser.wait_for_notification(
        notifications.AddOnInstallComplete).close()
コード例 #3
0
def test_enable_and_disable_experiment(base_url, selenium, firefox,
                                       notifications):
    """Test enabling of an experiment."""
    page = Home(selenium, base_url + '/experiments').open()
    selenium.add_cookie({
        'name': 'updates-last-viewed-date',
        'value': datetime.datetime.now().isoformat(),
        'max_age': 120,
        'domain': 'example.com'
    })
    selenium.execute_script(
        "document.querySelector('.landing-experiments').scrollIntoView();")

    if not page.featured.is_displayed:
        selenium.execute_script(
            "document.querySelector('.landing-experiments').scrollIntoView();")
        experiments = page.header.click_install_button()
    else:
        experiments = page.bottom_install_button()

    firefox.browser.wait_for_notification(
        notifications.AddOnInstallComplete).close()

    experiment = experiments.find_experiment(experiment='Dev Example')
    experiment.enable()
    firefox.browser.wait_for_notification(
        notifications.AddOnInstallConfirmation).install()
    firefox.browser.wait_for_notification(
        notifications.AddOnInstallComplete).close()
    exp_detail = Detail(selenium, base_url)
    assert exp_detail.enabled_popup.is_popup_displayed()
    exp_detail.enabled_popup.close()
    experiment.disable()
    assert experiment.enable_button.is_displayed()
コード例 #4
0
def test_bottom_install_button(base_url, selenium, firefox, notifications):
    page = Home(selenium, base_url).open()
    experiments = page.bottom_install_button()
    firefox.browser.wait_for_notification(
        notifications.AddOnInstallComplete).close()
    assert experiments.welcome_popup.is_title_displayed()