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
23 changes: 19 additions & 4 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/',
Comment on lines -11 to 14
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW I've changed the wording because I wasn't entirely sure what list would be used for what, so I hopefully got it right this way. Feel free to suggest any improvements if I'm not making it clear, or getting it completely wrong.

Expand All @@ -26,16 +26,31 @@ const desktopTestURLs = [
'/en-US/contact/',
'/en-US/contribute/',
'/en-US/firefox/download/thanks/',
'/en-US/firefox/releasenotes/',
'/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();
});
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const url = '/firefox/welcome/4/';
test.describe(
`${url} page`,
{
tag: ['@firefox', '@wfc-redirect']
tag: '@firefox'
},
() => {
test('Send to device form success', async ({ page, browserName }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const url = '/firefox/welcome/6/';
test.describe(
`${url} page`,
{
tag: ['@firefox', '@wfc-redirect']
tag: '@firefox'
},
() => {
test('Send set as default button displayed', async ({
Expand Down