Add performance testing to Cypress results

This commit is contained in:
Gabe Kangas
2023-01-04 22:15:10 -08:00
parent 74cbc949ea
commit 80ab351cbe
8 changed files with 3845 additions and 17 deletions

View File

@@ -0,0 +1,14 @@
describe('Lighthouse Metrics', () => {
beforeEach(() => {
cy.visit('http://localhost:8080');
});
it('Capture Metrics', () => {
cy.lighthouse({
accessibility: 97,
'best-practices': 97,
seo: 97,
performance: 90,
});
});
});

View File

@@ -0,0 +1,14 @@
describe('Lighthouse Metrics', () => {
beforeEach(() => {
cy.visit('http://localhost:8080');
});
it('Capture Metrics', () => {
cy.lighthouse({
accessibility: 97,
'best-practices': 97,
seo: 97,
performance: 60, // Once the performance issues are fixed revert this 90,
});
});
});

View File

@@ -23,3 +23,6 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
import 'cypress-audit/commands';
import '@cypress-audit/lighthouse/commands';