Skip to content

Commit 7b00a3a

Browse files
committed
try fix test
1 parent 6f6cf53 commit 7b00a3a

File tree

2 files changed

+14
-8
lines changed
  • dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions

2 files changed

+14
-8
lines changed

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = [
1212
path: 'packages/browser/build/npm/esm/index.js',
1313
import: createImport('init', 'browserTracingIntegration'),
1414
gzip: true,
15-
limit: '34 KB',
15+
limit: '36 KB',
1616
},
1717
{
1818
name: '@sentry/browser (incl. Tracing, Replay)',

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Route } from '@playwright/test';
22
import { expect } from '@playwright/test';
3-
import type { Contexts, Event as SentryEvent, Measurements, SpanJSON } from '@sentry/types';
3+
import type { Contexts, Event as SentryEvent, SpanJSON } from '@sentry/types';
44

55
import { sentryTest } from '../../../../utils/fixtures';
66
import {
@@ -132,17 +132,21 @@ sentryTest('should capture an INP click event span. @firefox', async ({ browserN
132132
const url = await getLocalTestPath({ testDir: __dirname });
133133

134134
await page.goto(url);
135-
await getFirstSentryEnvelopeRequest<SentryEvent>(page);
135+
await getFirstSentryEnvelopeRequest<SentryEvent>(page); // waiting for page load
136+
137+
const spanEnvelopesPromise = getMultipleSentryEnvelopeRequests<SpanJSON>(page, 1, {
138+
envelopeType: 'span',
139+
});
136140

137141
await page.locator('[data-test-id=interaction-button]').click();
138142
await page.locator('.clicked[data-test-id=interaction-button]').isVisible();
139143

140-
// Wait for the interaction transaction from the enableInteractions experiment
144+
// eslint-disable-next-line no-console
145+
console.log('buttons clicked');
146+
147+
// Wait for the interaction transaction from the experimental enableInteractions (in init.js)
141148
await getMultipleSentryEnvelopeRequests<TransactionJSON>(page, 1);
142149

143-
const spanEnvelopesPromise = getMultipleSentryEnvelopeRequests<SpanJSON>(page, 1, {
144-
envelopeType: 'span',
145-
});
146150
// Page hide to trigger INP
147151
await page.evaluate(() => {
148152
window.dispatchEvent(new Event('pagehide'));
@@ -151,7 +155,9 @@ sentryTest('should capture an INP click event span. @firefox', async ({ browserN
151155
// Get the INP span envelope
152156
const spanEnvelopes = await spanEnvelopesPromise;
153157

154-
expect(spanEnvelopes).toHaveLength(1);
158+
// eslint-disable-next-line no-console
159+
console.log('spanevents', spanEnvelopes);
160+
155161
expect(spanEnvelopes[0].op).toBe('ui.interaction.click');
156162
expect(spanEnvelopes[0].description).toBe('body > button.clicked');
157163
expect(spanEnvelopes[0].exclusive_time).toBeGreaterThan(0);

0 commit comments

Comments
 (0)