From 641e5d421dbdd20ca0bba2d1f25c6ca74fbda5f9 Mon Sep 17 00:00:00 2001 From: Sam Macbeth Date: Tue, 31 Oct 2023 10:43:27 +0100 Subject: [PATCH] Revert "Disable local proxying for adclick attribution tests (#2285)" This reverts commit 09b27eb9da60bbe4a527221dbb64fa52c665ffee. --- integration-test/click-attribution.spec.js | 3 +++ integration-test/helpers/testPages.js | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/integration-test/click-attribution.spec.js b/integration-test/click-attribution.spec.js index 33c4d24973..a40672f15b 100644 --- a/integration-test/click-attribution.spec.js +++ b/integration-test/click-attribution.spec.js @@ -1,6 +1,7 @@ import { test, expect } from './helpers/playwrightHarness' import backgroundWait from './helpers/backgroundWait' import testCases from 'privacy-test-pages/adClickFlow/shared/testCases.json' +import { routeFromLocalhost } from './helpers/testPages' if (testCases.length === 0) { throw new Error('No test cases found') @@ -50,6 +51,8 @@ test.describe('Ad click blocking', () => { // Allow to filter to one test case const itMethod = testCase.only ? test.only : test itMethod(testCase.name, async ({ context }) => { + // route requests from all pages in this test to our local test server + await routeFromLocalhost(context) let page = await context.newPage() for (const step of testCase.steps) { if (step.action.type === 'navigate') { diff --git a/integration-test/helpers/testPages.js b/integration-test/helpers/testPages.js index 63ebb7d2c5..66711f55ff 100644 --- a/integration-test/helpers/testPages.js +++ b/integration-test/helpers/testPages.js @@ -2,7 +2,12 @@ const testPageHosts = new Set([ 'privacy-test-pages.site', 'broken.third-party.site', 'good.third-party.site', - 'bad.third-party.site' + 'bad.third-party.site', + 'convert.ad-company.site', + // 'www.search-company.site', + // 'www.ad-company.site', - redirects to these domains via route overriding seem to hang, so this one has to hit the real server + 'www.publisher-company.site', + 'www.payment-company.site' ]) export const TEST_SERVER_ORIGIN = 'http://127.0.0.1:3000'