Skip to content

Commit

Permalink
fix smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fpbrault committed Sep 19, 2024
1 parent c73700d commit 2351fc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/samples/headless-ssr/cypress/e2e/smoke.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ const msgSelector = '#hydrated-msg';
const timestampSelector = '#timestamp';
const resultListSelector = '.result-list li';
const searchBoxSelector = '.search-box input';
const routes = ['generic', 'react'] as const;
const routes = ['generic?tab=all', 'react?tab=all'] as const;

const isPageDev =
process.env.NODE_ENV === 'development' &&
Cypress.env('NEXTJS_ROUTER') === 'pages';

// Note: Thresholds might need to be adjusted as the page tested changes (e.g. more components are added etc)
const vitals: Record<(typeof routes)[number], Cypress.ReportWebVitalsConfig> = {
generic: {
'generic?tab=all': {
thresholds: {
fcp: isPageDev ? 2000 : 200,
lcp: isPageDev ? 2000 : 200,
Expand All @@ -30,7 +30,7 @@ const vitals: Record<(typeof routes)[number], Cypress.ReportWebVitalsConfig> = {
inp: 400,
},
},
react: {
'react?tab=all': {
thresholds: {
fcp: isPageDev ? 2000 : 400,
lcp: isPageDev ? 2000 : 400,
Expand Down

0 comments on commit 2351fc6

Please sign in to comment.