Skip to content

Commit 3a70049

Browse files
committed
chore(e2e-tests): add chromium dns probe ip to network traffic test
1 parent fed93dc commit 3a70049

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/compass-e2e-tests/tests/no-network-traffic.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ describe('networkTraffic: false / Isolated Edition', function () {
6565
const compass = await init(this.test?.fullTitle(), {
6666
extraSpawnArgs: ['--no-network-traffic'],
6767
wrapBinary,
68-
// TODO(COMPASS-8166): firstRun: true seems to result in network traffic.
69-
// Probably the welcome modal.
70-
firstRun: false,
68+
firstRun: true,
7169
});
7270
const browser = compass.browser;
7371

@@ -117,7 +115,11 @@ describe('networkTraffic: false / Isolated Edition', function () {
117115

118116
if (
119117
[...connectTargets].some(
120-
(target) => !/^127.0.0.1:|^\[::1\]:/.test(target)
118+
// Chromium heuristically detects IPv4-only networks by attempting a UDP connection
119+
// to 2001:4860:4860::8888 (the IPv6 address for Google Public DNS).
120+
(target) =>
121+
!/^127.0.0.1:|^\[::1\]:/.test(target) &&
122+
!/^\[2001:4860:4860::8888\]:443$/.test(target)
121123
)
122124
) {
123125
throw new Error(`Connected to unexpected host! ${[...connectTargets]}`);

0 commit comments

Comments
 (0)