Skip to content

Commit 24cbc4c

Browse files
authored
test: Adjust long task integration test ui span check (#6754)
Make the check in `should capture long task` integration test check for any number of ui spans instead of just one. In some situations in CI, there can be multiple long tasks instead of one (due to environmental conditions), so assert just to make sure they exist (and they are being recorded).
1 parent 2e281ad commit 24cbc4c

File tree

1 file changed

+1
-1
lines changed
  • packages/integration-tests/suites/tracing/browsertracing/long-tasks-enabled

1 file changed

+1
-1
lines changed

packages/integration-tests/suites/tracing/browsertracing/long-tasks-enabled/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sentryTest('should capture long task.', async ({ browserName, getLocalTestPath,
1818
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
1919
const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));
2020

21-
expect(uiSpans?.length).toBe(1);
21+
expect(uiSpans?.length).toBeGreaterThan(0);
2222

2323
const [firstUISpan] = uiSpans || [];
2424
expect(firstUISpan).toEqual(

0 commit comments

Comments
 (0)