Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions tests/playwright/specs/a11y/includes/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* URL paths for inclusion in page-level a11y scans.
* Pages will be scanned at both desktop and mobile resolutions.
* Different set of pages will be scanned at desktop and mobile resolutions.
*/
const desktopTestURLs = [
'/en-US/',
Expand All @@ -26,15 +26,31 @@ const desktopTestURLs = [
'/en-US/contact/',
'/en-US/contribute/',
'/en-US/firefox/download/thanks/',
'/en-US/firefox/99.0/whatsnew/',
'/en-US/firefox/99.0a1/whatsnew/',
'/en-US/firefox/99.0a2/whatsnew/',
'/en-US/firefox/99.0a2/firstrun/',
'/en-US/firefox/nightly/firstrun/',
'/en-US/foundation/annualreport/2024/',
'/en-US/privacy/',
'/en-US/privacy/websites/cookie-settings/',
'/en-US/products/',
'/en-US/products/vpn/',
'/en-US/products/vpn/download/',
'/en-US/products/vpn/features/',
'/en-US/products/vpn/pricing/'
'/en-US/products/vpn/pricing/',
'/en-US/security/advisories/',
'/en-US/security/known-vulnerabilities/firefox/'
];

const mobileTestURLs = ['/en-US/'];
const mobileTestURLs = [
'/en-US/',
'/en-US/firefox/download/thanks/',
'/en-US/privacy/',
'/en-US/privacy/firefox/',
'/en-US/products/',
'/en-US/products/vpn/',
'/en-US/products/vpn/download/'
];

module.exports = { desktopTestURLs, mobileTestURLs };
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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/.
*/

'use strict';

const { test, expect } = require('@playwright/test');
const openPage = require('../../../scripts/open-page');
const url = '/en-US/firefox/nightly/firstrun/';

test.describe(
`${url} page`,
{
tag: '@firefox'
},
() => {
test.beforeEach(async ({ page, browserName }) => {
await openPage(url, page, browserName);
});

test('Calls to action are displayed', async ({ page, browserName }) => {
test.skip(
browserName !== 'firefox',
'Page shown to Firefox browsers only'
);

const testingButton = page.getByTestId('start-testing');
const codingButton = page.getByTestId('start-coding');
const localizingButton = page.getByTestId('start-localizing');

await expect(testingButton).toBeVisible();
await expect(codingButton).toBeVisible();
await expect(localizingButton).toBeVisible();
});
}
);
Loading