From 6e51338a674e8a981fd07bb80284eb97aa28d32e Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 7 Mar 2024 14:04:59 +0100 Subject: [PATCH] chore: fix issue with accessbility score not been evaluated proeprly Signed-off-by: blam --- .lighthouseci/scripts/guest-auth.js | 1 - lighthouserc.js | 5 +++-- package.json | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.lighthouseci/scripts/guest-auth.js b/.lighthouseci/scripts/guest-auth.js index 7f686cbbc6..9f0d35bcf7 100644 --- a/.lighthouseci/scripts/guest-auth.js +++ b/.lighthouseci/scripts/guest-auth.js @@ -7,5 +7,4 @@ module.exports = async (browser, context) => { await page.evaluate(() => { localStorage.setItem('@backstage/core:SignInPage:provider', 'guest'); }); - await page.goto('http://localhost:3000'); }; diff --git a/lighthouserc.js b/lighthouserc.js index 5e21730b7d..894b73a441 100644 --- a/lighthouserc.js +++ b/lighthouserc.js @@ -16,6 +16,7 @@ module.exports = { ci: { collect: { + // headful: true, url: [ /** Software Catalog */ 'http://localhost:3000/catalog', @@ -52,7 +53,7 @@ module.exports = { outputPath: './.lighthouseci/reports', preset: 'desktop', }, - startServerCommand: 'yarn dev', + startServerCommand: 'yarn start:lighthouse', startServerReadyPattern: 'webpack compiled successfully', startServerReadyTimeout: 600000, numberOfRuns: 1, @@ -64,7 +65,7 @@ module.exports = { 'categories:pwa': 'off', 'categories:best-practices': 'off', 'categories:seo': 'off', - 'categories:accessibility': ['error', { minScore: 0.89 }], + 'categories:accessibility': ['error', { minScore: 0.95 }], }, }, }, diff --git a/package.json b/package.json index 551d07d0e0..c45a3ec4fa 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "start": "yarn workspace example-app start", "start-backend": "yarn workspace example-backend start", "start-backend:next": "yarn workspace example-backend-next start", + "start:lighthouse": "concurrently 'yarn start' 'yarn start-backend:next'", "start:microsite": "cd microsite/ && yarn start", "start:next": "yarn workspace example-app-next start", "storybook": "yarn ./storybook run start",