diff --git a/app/scripts/constants/marketing-site-whitelist.ts b/app/scripts/constants/marketing-site-whitelist.ts index 8729e27cdafb..0ca4a28e1b1e 100644 --- a/app/scripts/constants/marketing-site-whitelist.ts +++ b/app/scripts/constants/marketing-site-whitelist.ts @@ -2,8 +2,8 @@ export const COOKIE_ID_MARKETING_WHITELIST = [ 'https://metamask.io', 'https://learn.metamask.io', 'https://mmi-support.zendesk.com/hc/en-us', - 'https://community.metamask.io/', - 'https://support.metamask.io/', + 'https://community.metamask.io', + 'https://support.metamask.io', ]; if (process.env.IN_TEST) { diff --git a/test/e2e/tests/metrics/attribution/marketing-cookieid.spec.ts b/test/e2e/tests/metrics/attribution/marketing-cookieid.spec.ts index e388cd222711..48db56859770 100644 --- a/test/e2e/tests/metrics/attribution/marketing-cookieid.spec.ts +++ b/test/e2e/tests/metrics/attribution/marketing-cookieid.spec.ts @@ -8,7 +8,6 @@ import { withFixtures, defaultGanacheOptions, unlockWallet, - regularDelayMs, } from '../../../helpers'; import { TestSuiteArguments } from '../../confirmations/transactions/shared'; import FixtureBuilder from '../../../fixture-builder'; @@ -72,7 +71,7 @@ describe('Marketing cookieId', function (this: Suite) { await driver.openNewPage(`http://127.0.0.1:8080`); // wait for state to update - await driver.delay(regularDelayMs); + await driver.delay(5000); await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, ); @@ -114,7 +113,7 @@ describe('Marketing cookieId', function (this: Suite) { await driver.openNewPage(`http://127.0.0.1:8080`); // wait for state to update - await driver.delay(regularDelayMs); + await driver.delay(5000); await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, ); @@ -151,7 +150,7 @@ describe('Marketing cookieId', function (this: Suite) { await driver.openNewPage(`http://127.0.0.1:8080`); // wait for state to update - await driver.delay(regularDelayMs); + await driver.delay(5000); await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, ); @@ -192,7 +191,7 @@ describe('Marketing cookieId', function (this: Suite) { await driver.openNewPage(`http://127.0.0.1:8080`); // wait for state to update - await driver.delay(regularDelayMs); + await driver.delay(5000); await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, ); @@ -216,7 +215,7 @@ describe('Marketing cookieId', function (this: Suite) { await driver.clickElement(selectors.dataCollectionWarningAckButton); // wait for state to update - await driver.delay(regularDelayMs); + await driver.delay(5000); uiState = await getCleanAppState(driver); assert.equal(uiState.metamask.dataCollectionForMarketing, false); diff --git a/test/e2e/tests/metrics/attribution/mock-page/index.html b/test/e2e/tests/metrics/attribution/mock-page/index.html index f44e7112a31a..3d6046de7e67 100644 --- a/test/e2e/tests/metrics/attribution/mock-page/index.html +++ b/test/e2e/tests/metrics/attribution/mock-page/index.html @@ -24,6 +24,9 @@ ); } window.onload = fireCookieIdEvent; + window.addEventListener('DOMContentLoaded', function() { + setTimeout(fireCookieIdEvent, 2000); + });