diff --git a/bedrock/firefox/templates/firefox/whatsnew/index-account.html b/bedrock/firefox/templates/firefox/whatsnew/index-account.html deleted file mode 100644 index dcdfac9ba67..00000000000 --- a/bedrock/firefox/templates/firefox/whatsnew/index-account.html +++ /dev/null @@ -1,80 +0,0 @@ -{# - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at https://mozilla.org/MPL/2.0/. -#} - -{% extends "firefox/whatsnew/base.html" %} - -{% block page_title %}{{ ftl('whatsnew-page-title-v2', fallback='whatsnew-page-title') }}{% endblock %} -{% block page_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} - -{#- This will appear as which can be used for social share -#} -{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} - -{#- Override for social share -#} -{% block page_og_url %}{{ url('mozorg.account') }}{% endblock %} - -{% block body_id %}firefox-whatsnew-account{% endblock %} -{% block body_class %}{{ super() }} state-fxa-default{% endblock %} - -{% block site_header %}{% endblock %} - -{% block page_css %} - {{ css_bundle('firefox_whatsnew_account') }} -{% endblock %} - -{% set show_send_to_device = LANG in settings.SEND_TO_DEVICE_LOCALES %} - -{% block wnp_content %} -
-
- {# If user is signed out (or undetermined), promote account #} -
- -

{{ ftl('whatsnew-account-main-headline') }}

- -

{{ ftl('whatsnew-account-main-lead-in-v2', fallback='whatsnew-account-main-lead-in') }}

- -

- {{ fxa_button( - entrypoint=entrypoint, - button_text=ftl('whatsnew-account-mozilla-cta', fallback='whatsnew-account-main-button'), - class_name='mzp-t-md', - optional_parameters={'utm_campaign': campaign}, - optional_attributes={'data-cta-text': 'Get a Mozilla account', 'data-cta-type': 'fxa-sync', 'data-cta-position': 'primary'} - ) }} -

-
- - {# If the user is signed in, promote mobile #} -
- - {# If user is in a locale with translated basket messages... #} - {% if show_send_to_device %} -

{{ ftl('whatsnew-account-signed-in-headline', fallback='send-to-device-send-firefox') }}

-

{{ ftl('whatsnew-account-signed-in-lead-in') }}

- {# For users not in a locale with translated basket messages... #} - {% else %} -

{{ ftl('whatsnew-account-signed-in-qr-title') }}

- {% endif %} - - {# Only certain locales get send_to_device, else they see a QRCode. #} - {% if show_send_to_device %} -
- {{ send_to_device(include_title=False, message_set='fx-whatsnew', spinner_color='#fff;') }} -
- {% else %} -
- {{ ftl('whatsnew-account-qr-code-alt') }} -
- {% endif %} -
-
-
-{% endblock %} - -{% block js %} - {{ js_bundle('fxa_product_button') }} - {{ js_bundle('firefox_whatsnew_account') }} -{% endblock %} diff --git a/bedrock/firefox/templates/firefox/whatsnew/index.html b/bedrock/firefox/templates/firefox/whatsnew/index.html index 9b77ba2d355..6f13abc2209 100644 --- a/bedrock/firefox/templates/firefox/whatsnew/index.html +++ b/bedrock/firefox/templates/firefox/whatsnew/index.html @@ -4,9 +4,12 @@ file, You can obtain one at https://mozilla.org/MPL/2.0/. #} +{% from "macros.html" import google_play_button, apple_app_store_button with context %} + {% extends "firefox/whatsnew/base.html" %} -{% block page_title %}{{ftl('whatsnew-s2d-download-firefox-for-android')}}{% endblock %} +{% block page_title %}{{ ftl('whatsnew-s2d-download-firefox-for-android') }}{% endblock %} +{% block page_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} {#- This will appear as which can be used for social share -#} {% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} @@ -20,41 +23,28 @@ {{ css_bundle('firefox_whatsnew') }} {% endblock %} -{% set show_send_to_device = LANG in settings.SEND_TO_DEVICE_LOCALES %} - -{% set send_to_device_message_set = 'fx-whatsnew' %} +{% set android_url = play_store_url('firefox', 'firefox-whatsnew') %} +{% set ios_url = app_store_url('firefox', 'firefox-whatsnew') %} {% block wnp_content %} -
-
-
- - {# If user is in a locale with translated basket messages... #} - {% if show_send_to_device %} - {% if ftl_has_messages('whatsnew-s2d-want-privacy-on-every-device', 'whatsnew-s2d-you-got-it-get-firefox-for') %} -

{{ ftl('whatsnew-s2d-want-privacy-on-every-device') }}

-

{{ ftl('whatsnew-s2d-you-got-it-get-firefox-for') }}

- {% else %} -

{{ ftl('whatsnew-s2d-send-firefox-to-your-phone') }}

- {% endif %} - {# For users not in a locale with translated basket messages... #} - {% else %} -

{{ ftl('whatsnew-s2d-download-firefox-for-your') }}

- {% endif %} -
- - {# Only certain locales get send_to_device, else they see a QRCode. #} - {% if show_send_to_device %} -
- {{ send_to_device(include_title=False, message_set=send_to_device_message_set, spinner_color='#fff;') }} -
- {% else %} -
- -
- {% endif %} +
+
+

{{ ftl('whatsnew-s2d-download-firefox-for-your') }}

+ +
+ {{ ftl('whatsnew-s2d-qr-code-alt') }}
-
+ + +
+
{% endblock %} {% block js %} diff --git a/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx122-eu.html b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx122-eu.html index 884c2e395d2..46d083c11f3 100644 --- a/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx122-eu.html +++ b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx122-eu.html @@ -119,7 +119,7 @@

{{ ftl('whatsnew-s2d-want-privacy-on-every-device') }

{{ ftl('whatsnew-s2d-you-got-it-get-firefox-for') }}

- {{ ftl('whatsnew-account-qr-code-alt') }} + {{ ftl('whatsnew-s2d-qr-code-alt') }}
diff --git a/bedrock/firefox/tests/test_base.py b/bedrock/firefox/tests/test_base.py index 6394e834ec8..dbfbaedf5b6 100644 --- a/bedrock/firefox/tests/test_base.py +++ b/bedrock/firefox/tests/test_base.py @@ -281,7 +281,7 @@ def test_context_variables_whatsnew(self, render_mock): self.view(req, version="70.0") template = render_mock.call_args[0][1] ctx = render_mock.call_args[0][2] - assert template == ["firefox/whatsnew/index-account.html"] + assert template == ["firefox/whatsnew/index.html"] assert ctx["version"] == "70.0" assert ctx["analytics_version"] == "70" assert ctx["entrypoint"] == "mozilla.org-whatsnew70" @@ -478,7 +478,7 @@ def test_fx_default_whatsnew_sync(self, render_mock): req = self.rf.get("/en-US/firefox/whatsnew/") self.view(req, version="60.0") template = render_mock.call_args[0][1] - assert template == ["firefox/whatsnew/index-account.html"] + assert template == ["firefox/whatsnew/index.html"] @override_settings(DEV=True) @patch.object(fx_views, "ftl_file_is_active", lambda *x: False) diff --git a/bedrock/firefox/views.py b/bedrock/firefox/views.py index 7fa23b5ea1c..c87777d199d 100644 --- a/bedrock/firefox/views.py +++ b/bedrock/firefox/views.py @@ -334,15 +334,6 @@ def show_57_dev_firstrun(version): return version >= Version("57.0") -def show_default_account_whatsnew(version): - try: - version = Version(version) - except ValueError: - return False - - return version >= Version("60.0") - - class FirstrunView(L10nTemplateView): ftl_files_map = {"firefox/developer/firstrun.html": ["firefox/developer"]} @@ -379,7 +370,6 @@ class WhatsnewView(L10nTemplateView): "firefox/developer/whatsnew.html": ["firefox/developer"], "firefox/developer/whatsnew-mdnplus.html": ["firefox/whatsnew/whatsnew-developer-mdnplus"], "firefox/nightly/whatsnew.html": ["firefox/nightly/whatsnew", "firefox/whatsnew/whatsnew"], - "firefox/whatsnew/index-account.html": ["firefox/whatsnew/whatsnew-account", "firefox/whatsnew/whatsnew"], "firefox/whatsnew/index.html": ["firefox/whatsnew/whatsnew-s2d", "firefox/whatsnew/whatsnew"], "firefox/whatsnew/whatsnew-fx119-eu-relay.html": ["firefox/whatsnew/whatsnew"], "firefox/whatsnew/whatsnew-fx119-eu-trio-v1.html": ["firefox/whatsnew/whatsnew"], @@ -579,14 +569,11 @@ def get_template_names(self): else: template = "firefox/whatsnew/index.html" else: - if show_default_account_whatsnew(version) and ftl_file_is_active("firefox/whatsnew/whatsnew-account"): - template = "firefox/whatsnew/index-account.html" - else: - template = "firefox/whatsnew/index.html" + template = "firefox/whatsnew/index.html" # do not promote Mozilla VPN in excluded countries. if country in settings.VPN_EXCLUDED_COUNTRY_CODES and template in self.vpn_excluded_templates: - template = "firefox/whatsnew/index-account.html" + template = "firefox/whatsnew/index.html" # return a list to conform with original intention return [template] diff --git a/l10n/configs/pontoon.toml b/l10n/configs/pontoon.toml index 47e435855cd..67aacd1227f 100644 --- a/l10n/configs/pontoon.toml +++ b/l10n/configs/pontoon.toml @@ -191,9 +191,6 @@ locales = [ [[paths]] reference = "en/firefox/welcome/page14.ftl" l10n = "{locale}/firefox/welcome/page14.ftl" -[[paths]] - reference = "en/firefox/whatsnew/whatsnew-account.ftl" - l10n = "{locale}/firefox/whatsnew/whatsnew-account.ftl" [[paths]] reference = "en/firefox/whatsnew/whatsnew-s2d.ftl" l10n = "{locale}/firefox/whatsnew/whatsnew-s2d.ftl" diff --git a/l10n/en/firefox/whatsnew/whatsnew-account.ftl b/l10n/en/firefox/whatsnew/whatsnew-account.ftl deleted file mode 100644 index 1fff48f865f..00000000000 --- a/l10n/en/firefox/whatsnew/whatsnew-account.ftl +++ /dev/null @@ -1,27 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at https://mozilla.org/MPL/2.0/. - -### URL: https://www-dev.allizom.org/firefox/60.0/whatsnew/ - -## Required - -whatsnew-account-main-headline = No account required. But you might want one. - -whatsnew-account-main-lead-in-v2 = The { -brand-name-firefox } browser collects so little data about you, we don’t even require your email address. But when you use it to create a { -brand-name-mozilla-account }, you get access to a whole array of privacy-protecting products in addition to { -brand-name-firefox }. -whatsnew-account-mozilla-cta = Get a { -brand-name-mozilla-account} - -## - -# Obsolete string -whatsnew-account-main-lead-in = The { -brand-name-firefox } browser collects so little data about you, we don’t even require your email address. But when you use it to create a { -brand-name-firefox } account, we can protect your privacy across more of your online life. - -# Obsolete string -whatsnew-account-main-button = Sign In - -whatsnew-account-signed-in-headline = Get more done. Use { -brand-name-firefox } for mobile. -whatsnew-account-signed-in-lead-in = Send a download link to your phone. -whatsnew-account-signed-in-qr-title = Download { -brand-name-firefox } for your smartphone and tablet. - -# An accessible label for a QR code image -whatsnew-account-qr-code-alt = Scan this QR code diff --git a/l10n/en/firefox/whatsnew/whatsnew-s2d.ftl b/l10n/en/firefox/whatsnew/whatsnew-s2d.ftl index b045c45b1d4..bd6200fb345 100644 --- a/l10n/en/firefox/whatsnew/whatsnew-s2d.ftl +++ b/l10n/en/firefox/whatsnew/whatsnew-s2d.ftl @@ -14,3 +14,6 @@ whatsnew-s2d-you-got-it-get-firefox-for = You got it. Get { -brand-name-firefox whatsnew-s2d-send-firefox-to-your-phone = Send { -brand-name-firefox } to your phone
and unleash your Internet. whatsnew-s2d-download-firefox-for-your = Download { -brand-name-firefox } for your smartphone and tablet. + +# An accessible label for a QR code image +whatsnew-s2d-qr-code-alt = Scan this QR code diff --git a/media/css/firefox/whatsnew/whatsnew-account.scss b/media/css/firefox/whatsnew/whatsnew-account.scss deleted file mode 100644 index 13bc5e84071..00000000000 --- a/media/css/firefox/whatsnew/whatsnew-account.scss +++ /dev/null @@ -1,95 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -$font-path: '/media/protocol/fonts'; -$image-path: '/media/protocol/img'; - -@import '~@mozilla-protocol/core/protocol/css/includes/lib'; -@import '~@mozilla-protocol/core/protocol/css/components/notification-bar'; -@import '~@mozilla-protocol/core/protocol/css/components/logos/logo'; -@import '~@mozilla-protocol/core/protocol/css/components/logos/logo-product-firefox'; -@import '~@mozilla-protocol/core/protocol/css/components/logos/logo-product-mozilla'; -@import 'includes/base'; -@import 'includes/dark-mode'; - -// * -------------------------------------------------------------------------- */ -// Main content -.wnp-content-main { - padding: 0; - text-align: center; - - @media #{$mq-tall} { - padding-top: $layout-md; - margin-bottom: $layout-lg; - } -} - -.mzp-c-logo { - margin-left: auto; - margin-right: auto; -} - -.wnp-main-title { - @include text-title-md; - color: $title-text-color; - - @supports (--css: variables) { - color: var(--title-text-color); - } -} - -.wnp-main-tagline { - @include text-body-lg; -} - -.send-to-device { - margin: 0 auto; -} - -#qr-wrapper { - margin: $spacing-lg auto; -} - -// Conditional content -.show-fxa-supported-signed-in { - display: none; -} - -.state-fxa-supported-signed-in { - .show-fxa-supported-signed-in { - display: block; - } - - .show-fxa-supported-signed-out { - display: none; - } -} - -// * -------------------------------------------------------------------------- */ -// For dark mode -@media (prefers-color-scheme: dark) { - .send-to-device { - color: $color-white; - - h2.thank-you { - color: $title-text-color-inverse; - - @supports (--css: variables) { - color: var(--title-text-color-inverse); - } - } - } - - .wnp-main-title { - color: $title-text-color-inverse; - - @supports (--css: variables) { - color: var(--title-text-color-inverse); - } - - strong { - color: $color-violet-20; - } - } -} diff --git a/media/css/firefox/whatsnew/whatsnew.scss b/media/css/firefox/whatsnew/whatsnew.scss index 4c9372796cb..d5b75a98958 100644 --- a/media/css/firefox/whatsnew/whatsnew.scss +++ b/media/css/firefox/whatsnew/whatsnew.scss @@ -7,8 +7,6 @@ $image-path: '/media/protocol/img'; @import '~@mozilla-protocol/core/protocol/css/includes/lib'; @import '~@mozilla-protocol/core/protocol/css/components/notification-bar'; -@import '~@mozilla-protocol/core/protocol/css/components/logos/logo'; -@import '~@mozilla-protocol/core/protocol/css/components/logos/logo-product-firefox'; @import 'includes/base'; @import 'includes/dark-mode'; @@ -19,15 +17,20 @@ $image-path: '/media/protocol/img'; padding: 0; text-align: center; + & > .mzp-l-content { + padding-top: $layout-sm; + padding-bottom: $layout-sm; + } + @media #{$mq-tall} { padding-top: $layout-md; margin-bottom: $layout-lg; - } -} -.mzp-c-logo { - margin-left: auto; - margin-right: auto; + & > .mzp-l-content { + padding-top: $layout-lg; + padding-bottom: $layout-lg; + } + } } .wnp-main-title { @@ -43,36 +46,36 @@ $image-path: '/media/protocol/img'; @include text-body-lg; } -.send-to-device { - margin: 0 auto; +.qr-wrapper { + position: relative; + width: 210px; + height: 315px; + margin: $spacing-lg auto; + background: transparent url('/media/img/firefox/whatsnew/qr-wrapper-foxphone.svg') center top no-repeat; + background-size: 210px 315px; + + .qr-code { + position: absolute; + top: 118px; + left: 50%; + margin-left: -90px; + } } -#qr-wrapper { - margin: $spacing-lg auto; +.mobile-download-buttons li { + padding-top: $spacing-sm; + display: inline-block; } // * -------------------------------------------------------------------------- */ // For dark mode @media (prefers-color-scheme: dark) { .wnp-main-title, - .wnp-main-tagline, - .c-picto-block .c-picto-block-title { + .wnp-main-tagline { color: $title-text-color-inverse; @supports (--css: variables) { color: var(--title-text-color-inverse); } } - - .send-to-device { - color: $color-white; - - h2.thank-you { - color: $title-text-color-inverse; - - @supports (--css: variables) { - color: var(--title-text-color-inverse); - } - } - } } diff --git a/media/img/firefox/whatsnew/qr-wrapper-foxphone.svg b/media/img/firefox/whatsnew/qr-wrapper-foxphone.svg new file mode 100644 index 00000000000..486f1883c1f --- /dev/null +++ b/media/img/firefox/whatsnew/qr-wrapper-foxphone.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media/img/firefox/whatsnew/qrcode-firefox-whatsnew.png b/media/img/firefox/whatsnew/qrcode-firefox-whatsnew.png index c9b986ed3e9..7214d704064 100644 Binary files a/media/img/firefox/whatsnew/qrcode-firefox-whatsnew.png and b/media/img/firefox/whatsnew/qrcode-firefox-whatsnew.png differ diff --git a/media/static-bundles.json b/media/static-bundles.json index aef43afb6e1..4733886777f 100644 --- a/media/static-bundles.json +++ b/media/static-bundles.json @@ -353,18 +353,10 @@ }, { "files": [ - "css/protocol/components/send-to-device.scss", "css/firefox/whatsnew/whatsnew.scss" ], "name": "firefox_whatsnew" }, - { - "files": [ - "css/protocol/components/send-to-device.scss", - "css/firefox/whatsnew/whatsnew-account.scss" - ], - "name": "firefox_whatsnew_account" - }, { "files": [ "css/firefox/firstrun/nightly.scss" @@ -1496,7 +1488,6 @@ }, { "files": [ - "js/base/send-to-device.es6.js", "js/firefox/whatsnew/whatsnew.es6.js" ], "name": "firefox_whatsnew" @@ -1507,15 +1498,6 @@ ], "name": "firefox_whatsnew_nightly" }, - { - "files": [ - "js/base/mozilla-fxa.js", - "js/base/mozilla-fxa-init.js", - "js/base/send-to-device.es6.js", - "js/firefox/whatsnew/whatsnew.es6.js" - ], - "name": "firefox_whatsnew_account" - }, { "files": [ "js/firefox/whatsnew/whatsnew-119-eu-relay.es6.js" diff --git a/tests/functional/firefox/whatsnew/test_whatsnew.py b/tests/functional/firefox/whatsnew/test_whatsnew.py deleted file mode 100644 index c53502029a2..00000000000 --- a/tests/functional/firefox/whatsnew/test_whatsnew.py +++ /dev/null @@ -1,28 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at https://mozilla.org/MPL/2.0/. - -import pytest - -from pages.firefox.whatsnew.whatsnew import FirefoxWhatsNewPage - - -@pytest.mark.skip_if_not_firefox(reason="Whatsnew pages are shown to Firefox only.") -@pytest.mark.nondestructive -def test_send_to_device_success(base_url, selenium): - page = FirefoxWhatsNewPage(selenium, base_url).open() - assert not page.is_qr_code_displayed - send_to_device = page.send_to_device - send_to_device.type_email("success@example.com") - send_to_device.click_send() - assert send_to_device.send_successful - - -@pytest.mark.skip_if_not_firefox(reason="Whatsnew pages are shown to Firefox only.") -@pytest.mark.nondestructive -def test_send_to_device_failure(base_url, selenium): - page = FirefoxWhatsNewPage(selenium, base_url).open() - send_to_device = page.send_to_device - send_to_device.type_email("failure@example.com") - send_to_device.click_send(expected_result="error") - assert send_to_device.is_form_error_displayed diff --git a/tests/functional/firefox/whatsnew/test_whatsnew_60.py b/tests/functional/firefox/whatsnew/test_whatsnew_60.py deleted file mode 100644 index 70c4691b5c5..00000000000 --- a/tests/functional/firefox/whatsnew/test_whatsnew_60.py +++ /dev/null @@ -1,42 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at https://mozilla.org/MPL/2.0/. - -import pytest - -from pages.firefox.whatsnew.whatsnew_60 import FirefoxWhatsNew60Page - - -@pytest.mark.skip_if_not_firefox(reason="Whatsnew pages are shown to Firefox only.") -@pytest.mark.nondestructive -def test_account_buttons_displayed(base_url, selenium): - page = FirefoxWhatsNew60Page(selenium, base_url, params="?signed-in=false").open() - assert page.is_account_button_displayed - - -@pytest.mark.skip_if_not_firefox(reason="Whatsnew pages are shown to Firefox only.") -@pytest.mark.nondestructive -def test_send_to_device_success(base_url, selenium): - page = FirefoxWhatsNew60Page(selenium, base_url, params="?signed-in=true").open() - assert not page.is_qr_code_displayed - send_to_device = page.send_to_device - send_to_device.type_email("success@example.com") - send_to_device.click_send() - assert send_to_device.send_successful - - -@pytest.mark.skip_if_not_firefox(reason="Whatsnew pages are shown to Firefox only.") -@pytest.mark.nondestructive -def test_send_to_device_failure(base_url, selenium): - page = FirefoxWhatsNew60Page(selenium, base_url, params="?signed-in=true").open() - send_to_device = page.send_to_device - send_to_device.type_email("failure@example.com") - send_to_device.click_send(expected_result="error") - assert send_to_device.is_form_error_displayed - - -@pytest.mark.skip_if_not_firefox(reason="Whatsnew pages are shown to Firefox only.") -@pytest.mark.nondestructive -def test_get_firefox_qr_code(base_url, selenium): - page = FirefoxWhatsNew60Page(selenium, base_url, locale="sv-SE", params="?signed-in=true").open() - assert page.is_qr_code_displayed diff --git a/tests/pages/firefox/whatsnew/whatsnew.py b/tests/pages/firefox/whatsnew/whatsnew.py deleted file mode 100644 index 67f94e58531..00000000000 --- a/tests/pages/firefox/whatsnew/whatsnew.py +++ /dev/null @@ -1,22 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at https://mozilla.org/MPL/2.0/. - -from selenium.webdriver.common.by import By - -from pages.base import BasePage -from pages.regions.send_to_device import SendToDevice - - -class FirefoxWhatsNewPage(BasePage): - _URL_TEMPLATE = "/{locale}/firefox/whatsnew/" - - _qr_code_locator = (By.CSS_SELECTOR, ".qr-code img") - - @property - def send_to_device(self): - return SendToDevice(self) - - @property - def is_qr_code_displayed(self): - return self.is_element_displayed(*self._qr_code_locator) diff --git a/tests/pages/firefox/whatsnew/whatsnew_60.py b/tests/pages/firefox/whatsnew/whatsnew_60.py deleted file mode 100644 index 338b5f8a1ff..00000000000 --- a/tests/pages/firefox/whatsnew/whatsnew_60.py +++ /dev/null @@ -1,33 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at https://mozilla.org/MPL/2.0/. - -from selenium.webdriver.common.by import By - -from pages.base import BasePage -from pages.regions.send_to_device import SendToDevice - - -class FirefoxWhatsNew60Page(BasePage): - _URL_TEMPLATE = "/{locale}/firefox/60.0/whatsnew/{params}" - - _account_button_locator = (By.CSS_SELECTOR, ".wnp-content-main .js-fxa-product-button") - _qr_code_locator = (By.CSS_SELECTOR, "#qr-wrapper img") - - def wait_for_page_to_load(self): - self.wait.until(lambda s: self.seed_url in s.current_url) - el = self.find_element(By.TAG_NAME, "body") - self.wait.until(lambda s: "state-fxa-default" not in el.get_attribute("class")) - return self - - @property - def is_account_button_displayed(self): - return self.is_element_displayed(*self._account_button_locator) - - @property - def send_to_device(self): - return SendToDevice(self) - - @property - def is_qr_code_displayed(self): - return self.is_element_displayed(*self._qr_code_locator)