Skip to content

Commit

Permalink
tests(treemap): ignore cookie deprecation error
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Aug 2, 2024
1 parent 0b9af6a commit 32ac560
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions treemap/test/treemap-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Lighthouse Treemap', () => {
let browser;
/** @type {import('puppeteer').Page} */
let page;
/** @type {Error[]} */
/** @type {Array<string|Promise<string>>} */
let pageErrors = [];

let server;
Expand Down Expand Up @@ -80,7 +80,13 @@ describe('Lighthouse Treemap', () => {
async function ensureNoErrors() {
await page.bringToFront();
await page.evaluate(() => new Promise(window.requestAnimationFrame));
const errors = await claimErrors();
const errors = (await claimErrors()).filter(error => {
// Filters out a cookie deprecation error that only occurs on ToT
// This error comes from gtag.js
// https://support.google.com/tagmanager/thread/288419928/error-failed-to-execute-getvalue-on-cookiedeprecationlabel?hl=en
return !error.match(
/Failed to execute 'getValue' on 'CookieDeprecationLabel': Illegal invocation/);
});
expect(errors).toHaveLength(0);
}

Expand Down

0 comments on commit 32ac560

Please sign in to comment.