Skip to content

Commit 42caa70

Browse files
committed
integration test
1 parent db68a19 commit 42caa70

File tree

1 file changed

+7
-6
lines changed
  • dev-packages/browser-integration-tests/suites/public-api/startSpan/basic

1 file changed

+7
-6
lines changed

dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/types';
2+
import type { SerializedEvent } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -10,7 +10,7 @@ sentryTest('should send a transaction in an envelope', async ({ getLocalTestPath
1010
}
1111

1212
const url = await getLocalTestPath({ testDir: __dirname });
13-
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
13+
const transaction = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
1414

1515
expect(transaction.transaction).toBe('parent_span');
1616
expect(transaction.spans).toBeDefined();
@@ -22,14 +22,15 @@ sentryTest('should report finished spans as children of the root transaction', a
2222
}
2323

2424
const url = await getLocalTestPath({ testDir: __dirname });
25-
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
25+
const transaction = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
2626

27-
const rootSpanId = transaction?.contexts?.trace?.spanId;
27+
const rootSpanId = transaction?.contexts?.trace?.span_id;
2828

2929
expect(transaction.spans).toHaveLength(1);
3030

3131
const span_1 = transaction.spans?.[0];
32-
// eslint-disable-next-line deprecation/deprecation
3332
expect(span_1?.description).toBe('child_span');
34-
expect(span_1?.parentSpanId).toEqual(rootSpanId);
33+
expect(span_1?.parent_span_id).toEqual(rootSpanId);
34+
expect(span_1?.origin).toEqual('manual');
35+
expect(span_1?.data?.['sentry.origin']).toEqual('manual');
3536
});

0 commit comments

Comments
 (0)