Skip to content

Commit

Permalink
Pin ESR 115 for unsupported operating systems (Fixes #13753) (#15141)
Browse files Browse the repository at this point in the history
* Pin ESR 115 for unsupported operating systems (Fixes #13753)

* Review fixes
  • Loading branch information
alexgibson authored Sep 17, 2024
1 parent 1940447 commit f466de0
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<p>{{ ftl('download-button-please-download-esr') }}</p>
<div class="download-platform-list">
<p>
<a class="mzp-c-button mzp-t-product download-link os_win64 ga-product-download" href="https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=win64&lang={{ LANG }}" data-cta-text="Download Firefox Extended Support Release 64-bit" data-cta-type="firefox">
<a class="mzp-c-button mzp-t-product download-link os_win64 ga-product-download" href="https://download.mozilla.org/?product=firefox-esr115-latest-ssl&os=win64&lang={{ LANG }}" data-cta-text="Download Firefox Extended Support Release 64-bit" data-cta-type="firefox">
{{ ftl('download-firefox-esr-64') }}
</a>
</p>
<p>
<a class="mzp-c-button mzp-t-product download-link os_win ga-product-download" href="https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=win&lang={{ LANG }}" data-cta-text="Download Firefox Extended Support Release 32-bit" data-cta-type="firefox">
<a class="mzp-c-button mzp-t-product download-link os_win ga-product-download" href="https://download.mozilla.org/?product=firefox-esr115-latest-ssl&os=win&lang={{ LANG }}" data-cta-text="Download Firefox Extended Support Release 32-bit" data-cta-type="firefox">
{{ ftl('download-firefox-esr-32') }}
</a>
</p>
Expand All @@ -42,7 +42,7 @@
<p>{{ ftl('download-button-please-download-esr') }}</p>

<div class="download-platform-list">
<a class="mzp-c-button mzp-t-product download-link ga-product-download" href="https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=osx&lang={{ LANG }}" data-cta-text="Firefox Extended Support Release MacOS" data-cta-type="firefox">
<a class="mzp-c-button mzp-t-product download-link ga-product-download" href="https://download.mozilla.org/?product=firefox-esr115-latest-ssl&os=osx&lang={{ LANG }}" data-cta-text="Firefox Extended Support Release MacOS" data-cta-type="firefox">
{{ ftl('download-firefox-esr') }}
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,23 +240,23 @@ 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();

// Assert ESR button is displayed instead of Firefox Developer Edition button.
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();

// Assert ESR button is displayed instead of Firefox Nightly button.
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 {
Expand All @@ -270,23 +270,23 @@ 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();

// Assert ESR button is displayed instead of Firefox Developer Edition button.
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();

// Assert ESR button is displayed instead of Firefox Nightly button.
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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
69 changes: 54 additions & 15 deletions tests/playwright/specs/products/firefox/firefox-new.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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).
Expand All @@ -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/
);
}
});
Expand Down
18 changes: 18 additions & 0 deletions tests/unit/spec/base/datalayer-productdownload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down

0 comments on commit f466de0

Please sign in to comment.