From ca8b112055c8b99ce1f1f3341da7fe64ee4ee287 Mon Sep 17 00:00:00 2001 From: Adam Raine <6752989+adamraine@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:44:52 -0700 Subject: [PATCH] tests(devtools): sync e2e (#16160) --- cli/test/smokehouse/test-definitions/dobetterweb.js | 2 +- .../e2e/lighthouse/devtools-settings_test.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cli/test/smokehouse/test-definitions/dobetterweb.js b/cli/test/smokehouse/test-definitions/dobetterweb.js index f5a00768c269..cba659d2e662 100644 --- a/cli/test/smokehouse/test-definitions/dobetterweb.js +++ b/cli/test/smokehouse/test-definitions/dobetterweb.js @@ -268,7 +268,7 @@ const expectations = { }, 'render-blocking-resources': { score: '<1', - numericValue: '>=85', + numericValue: '>=50', details: { items: [ { diff --git a/third-party/devtools-tests/e2e/lighthouse/devtools-settings_test.ts b/third-party/devtools-tests/e2e/lighthouse/devtools-settings_test.ts index 1a7afd2e7ac0..e57a3e873741 100644 --- a/third-party/devtools-tests/e2e/lighthouse/devtools-settings_test.ts +++ b/third-party/devtools-tests/e2e/lighthouse/devtools-settings_test.ts @@ -93,10 +93,12 @@ describe('DevTools', function() { statusCode: item.statusCode, }; }); - assert.deepEqual(trimmedRequests, [ - {url: 'hello.html', statusCode: 200}, - {url: 'basic.css', statusCode: -1}, // statuCode === -1 means the request failed - ]); + + // An extra basic.css request with status code -1 appears, but only in e2e tests + // This test is made more lenient since this only happens in the e2e environment + // b/359984292 + assert.deepStrictEqual(trimmedRequests[0], {url: 'hello.html', statusCode: 200}); + assert.deepStrictEqual(trimmedRequests[1], {url: 'basic.css', statusCode: -1}); }); });