diff --git a/test/e2e/onFCP-test.js b/test/e2e/onFCP-test.js index ce0de79c..d7748136 100644 --- a/test/e2e/onFCP-test.js +++ b/test/e2e/onFCP-test.js @@ -21,24 +21,6 @@ import {navigateTo} from '../utils/navigateTo.js'; import {stubForwardBack} from '../utils/stubForwardBack.js'; import {stubVisibilityChange} from '../utils/stubVisibilityChange.js'; -// Temp fix to address Firefox flakiness. -// See https://github.com/GoogleChrome/web-vitals/issues/472 -const originalStrictEqual = assert.strictEqual; -assert.strictEqual = function (actual, expected, message) { - if ( - process.env.GITHUB_ACTIONS && - browser.capabilities.browserName === 'firefox' && - (expected === 'good' || expected === 'needs-improvement') && - actual !== expected - ) { - console.error( - `Override assert for Firefox (actual: ${actual}, expected: ${expected})`, - ); - return true; - } - return originalStrictEqual(actual, expected, message); -}; - describe('onFCP()', async function () { // Retry all tests in this suite up to 2 times. this.retries(2); @@ -134,7 +116,7 @@ describe('onFCP()', async function () { it('does not report if the document was hidden at page load time', async function () { if (!browserSupportsFCP) this.skip(); - await navigateTo('/test/fcp?hidden=1', {readyState: 'interactive'}); + await navigateTo('/test/fcp?hidden=1', {readyState: 'complete'}); await stubVisibilityChange('visible'); diff --git a/test/e2e/onINP-test.js b/test/e2e/onINP-test.js index 3bdc691b..4db92e47 100644 --- a/test/e2e/onINP-test.js +++ b/test/e2e/onINP-test.js @@ -699,12 +699,16 @@ describe('onINP()', async function () { it('includes LoAF entries if the browser supports it', async function () { if (!browserSupportsLoAF) this.skip(); - await navigateTo('/test/inp?attribution=1&pointerdown=100'); + await navigateTo('/test/inp?attribution=1&pointerdown=100', { + readyState: 'interactive', + }); // Click on the