From f466de024de4d89a541d3ff6e4617fba7967a2a7 Mon Sep 17 00:00:00 2001 From: Alex Gibson Date: Tue, 17 Sep 2024 03:18:31 +0100 Subject: [PATCH] Pin ESR 115 for unsupported operating systems (Fixes #13753) (#15141) * Pin ESR 115 for unsupported operating systems (Fixes #13753) * Review fixes --- .../includes/download-unsupported.html | 6 +- .../firefox/firefox-channel-desktop.spec.js | 12 ++-- .../firefox/firefox-developer.spec.js | 8 +-- .../products/firefox/firefox-new.spec.js | 69 +++++++++++++++---- .../spec/base/datalayer-productdownload.js | 18 +++++ 5 files changed, 85 insertions(+), 28 deletions(-) diff --git a/bedrock/firefox/templates/firefox/includes/download-unsupported.html b/bedrock/firefox/templates/firefox/includes/download-unsupported.html index 2376c497415..2b246275ce4 100644 --- a/bedrock/firefox/templates/firefox/includes/download-unsupported.html +++ b/bedrock/firefox/templates/firefox/includes/download-unsupported.html @@ -19,12 +19,12 @@

{{ ftl('download-button-please-download-esr') }}

- + {{ ftl('download-firefox-esr-64') }}

- + {{ ftl('download-firefox-esr-32') }}

@@ -42,7 +42,7 @@

{{ ftl('download-button-please-download-esr') }}

diff --git a/tests/playwright/specs/products/firefox/firefox-channel-desktop.spec.js b/tests/playwright/specs/products/firefox/firefox-channel-desktop.spec.js index 22199bef78b..4fe6418914d 100644 --- a/tests/playwright/specs/products/firefox/firefox-channel-desktop.spec.js +++ b/tests/playwright/specs/products/firefox/firefox-channel-desktop.spec.js @@ -240,7 +240,7 @@ test.describe( await expect(betaDownloadOsxUnsupported).toBeVisible(); await expect(betaDownloadOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); await expect(osxBetaDownload).not.toBeVisible(); @@ -248,7 +248,7 @@ test.describe( await expect(devDownloadOsxUnsupported).toBeVisible(); await expect(devDownloadOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); await expect(osxDevDownload).not.toBeVisible(); @@ -256,7 +256,7 @@ test.describe( await expect(nightlyDownloadOsxUnsupported).toBeVisible(); await expect(nightlyDownloadOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); await expect(osxNightlyDownload).not.toBeVisible(); } else { @@ -270,7 +270,7 @@ test.describe( await expect(betaDownloadWinUnsupported).toBeVisible(); await expect(betaDownloadWinUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win64/ + /\?product=firefox-esr115-latest-ssl&os=win64/ ); await expect(win64BetaDownload).not.toBeVisible(); @@ -278,7 +278,7 @@ test.describe( await expect(devDownloadWinUnsupported).toBeVisible(); await expect(devDownloadWinUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win64/ + /\?product=firefox-esr115-latest-ssl&os=win64/ ); await expect(winDevDownload).not.toBeVisible(); @@ -286,7 +286,7 @@ test.describe( await expect(nightlyDownloadWinUnsupported).toBeVisible(); await expect(nightlyDownloadWinUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win64/ + /\?product=firefox-esr115-latest-ssl&os=win64/ ); await expect(winNightlyDownload).not.toBeVisible(); } diff --git a/tests/playwright/specs/products/firefox/firefox-developer.spec.js b/tests/playwright/specs/products/firefox/firefox-developer.spec.js index a5390a8285c..792719b68ea 100644 --- a/tests/playwright/specs/products/firefox/firefox-developer.spec.js +++ b/tests/playwright/specs/products/firefox/firefox-developer.spec.js @@ -154,12 +154,12 @@ test.describe( await expect(introDownloadOsxUnsupported).toBeVisible(); await expect(introDownloadOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); await expect(footerDownloadOsxUnsupported).toBeVisible(); await expect(footerDownloadOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); // Assert regular download buttons are not displayed. @@ -176,12 +176,12 @@ test.describe( await expect(introDownloadWinUnsupported).toBeVisible(); await expect(introDownloadWinUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win64/ + /\?product=firefox-esr115-latest-ssl&os=win64/ ); await expect(footerDownloadWinUnsupported).toBeVisible(); await expect(footerDownloadWinUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win64/ + /\?product=firefox-esr115-latest-ssl&os=win64/ ); // Assert regular download buttons are not displayed. diff --git a/tests/playwright/specs/products/firefox/firefox-new.spec.js b/tests/playwright/specs/products/firefox/firefox-new.spec.js index a30a18f7ce4..6e20872858e 100644 --- a/tests/playwright/specs/products/firefox/firefox-new.spec.js +++ b/tests/playwright/specs/products/firefox/firefox-new.spec.js @@ -115,26 +115,38 @@ test.describe( 'css=#download-button-thanks .fx-unsupported-message.mac .download-link' ); - const downloadWinUnsupported = page.locator( + const downloadWinUnsupported64bit = page.locator( 'css=#download-button-thanks .fx-unsupported-message.win .download-link.os_win64' ); + const downloadWinUnsupported32bit = page.locator( + 'css=#download-button-thanks .fx-unsupported-message.win .download-link.os_win' + ); + const downloadFeaturesOsxUnsupported = page.locator( 'css=#download-features .fx-unsupported-message.mac .download-link' ); - const downloadFeaturesWinUnsupported = page.locator( + const downloadFeaturesWinUnsupported64bit = page.locator( 'css=#download-features .fx-unsupported-message.win .download-link.os_win64' ); + const downloadFeaturesWinUnsupported32bit = page.locator( + 'css=#download-features .fx-unsupported-message.win .download-link.os_win' + ); + const downloadDiscoverOsxUnsupported = page.locator( 'css=#download-discover .fx-unsupported-message.mac .download-link' ); - const downloadDiscoverWinUnsupported = page.locator( + const downloadDiscoverWinUnsupported64bit = page.locator( 'css=#download-discover .fx-unsupported-message.win .download-link.os_win64' ); + const downloadDiscoverWinUnsupported32bit = page.locator( + 'css=#download-discover .fx-unsupported-message.win .download-link.os_win' + ); + if (browserName === 'webkit') { // Set macOS 10.14 UA strings. await page.addInitScript({ @@ -151,17 +163,17 @@ test.describe( await expect(downloadOsxUnsupported).toBeVisible(); await expect(downloadOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); await expect(downloadFeaturesOsxUnsupported).toBeVisible(); await expect(downloadFeaturesOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); await expect(downloadDiscoverOsxUnsupported).toBeVisible(); await expect(downloadDiscoverOsxUnsupported).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=osx/ + /\?product=firefox-esr115-latest-ssl&os=osx/ ); } else { // Set Windows 8.1 UA strings (64-bit). @@ -176,20 +188,47 @@ test.describe( await expect(downloadDiscoverButton).not.toBeVisible(); // Assert Firefox ESR windows download button is displayed. - await expect(downloadWinUnsupported).toBeVisible(); - await expect(downloadWinUnsupported).toHaveAttribute( + await expect(downloadWinUnsupported64bit).toBeVisible(); + await expect(downloadWinUnsupported64bit).toHaveAttribute( + 'href', + /\?product=firefox-esr115-latest-ssl&os=win64/ + ); + await expect(downloadWinUnsupported32bit).not.toBeVisible(); + await expect(downloadWinUnsupported32bit).toHaveAttribute( + 'href', + /\?product=firefox-esr115-latest-ssl&os=win/ + ); + await expect(downloadFeaturesWinUnsupported64bit).toBeVisible(); + await expect( + downloadFeaturesWinUnsupported64bit + ).toHaveAttribute( + 'href', + /\?product=firefox-esr115-latest-ssl&os=win64/ + ); + await expect( + downloadFeaturesWinUnsupported32bit + ).not.toBeVisible(); + await expect( + downloadFeaturesWinUnsupported32bit + ).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win/ + /\?product=firefox-esr115-latest-ssl&os=win/ ); - await expect(downloadFeaturesWinUnsupported).toBeVisible(); - await expect(downloadFeaturesWinUnsupported).toHaveAttribute( + await expect(downloadDiscoverWinUnsupported64bit).toBeVisible(); + await expect( + downloadDiscoverWinUnsupported64bit + ).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win/ + /\?product=firefox-esr115-latest-ssl&os=win64/ ); - await expect(downloadDiscoverWinUnsupported).toBeVisible(); - await expect(downloadDiscoverWinUnsupported).toHaveAttribute( + await expect( + downloadDiscoverWinUnsupported32bit + ).not.toBeVisible(); + await expect( + downloadDiscoverWinUnsupported32bit + ).toHaveAttribute( 'href', - /\?product=firefox-esr-latest-ssl&os=win/ + /\?product=firefox-esr115-latest-ssl&os=win/ ); } }); diff --git a/tests/unit/spec/base/datalayer-productdownload.js b/tests/unit/spec/base/datalayer-productdownload.js index 8570c8a0d97..01b74048b76 100644 --- a/tests/unit/spec/base/datalayer-productdownload.js +++ b/tests/unit/spec/base/datalayer-productdownload.js @@ -245,6 +245,12 @@ describe('TrackProductDownload.getEventFromUrl', function () { ); expect(testEvent['release_channel']).toBe('esr'); }); + it('should identify release_channel for Firefox ESR 115', function () { + const testEvent = TrackProductDownload.getEventFromUrl( + 'https://download.mozilla.org/?product=firefox-esr115-latest-ssl&os=osx&lang=en-US' + ); + expect(testEvent['release_channel']).toBe('esr115'); + }); it('should identify release_channel for Firefox MSI', function () { const testEvent = TrackProductDownload.getEventFromUrl( 'https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64&lang=en-US' @@ -257,6 +263,18 @@ describe('TrackProductDownload.getEventFromUrl', function () { ); expect(testEvent['release_channel']).toBe('esr'); }); + it('should identify release_channel for Firefox ESR 115 64-bit', function () { + const testEvent = TrackProductDownload.getEventFromUrl( + 'https://download.mozilla.org/?product=firefox-esr115-latest-ssl&os=win64&lang=en-US' + ); + expect(testEvent['release_channel']).toBe('esr115'); + }); + it('should identify release_channel for Firefox ESR 115 32-bit', function () { + const testEvent = TrackProductDownload.getEventFromUrl( + 'https://download.mozilla.org/?product=firefox-esr115-latest-ssl&os=win&lang=en-US' + ); + expect(testEvent['release_channel']).toBe('esr115'); + }); it('should identify release_channel for Firefox iOS', function () { const testEvent = TrackProductDownload.getEventFromUrl( 'https://itunes.apple.com/app/firefox-private-safe-browser/id989804926'