Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Apr 19, 2024
1 parent 90831a2 commit c16b325
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,12 @@ sentryTest(
await page.locator('[data-sentry-feedback] .btn--primary').click();

const feedbackEvent = await feedbackEventPromise;

expect(feedbackEvent.type).toEqual('feedback');

const feedbackTraceContext = feedbackEvent.contexts?.trace;

expect(feedbackTraceContext).toMatchObject({
op: 'navigation',
trace_id: navigationTraceContext?.trace_id,
span_id: expect.stringMatching(/^[0-9a-f]{16}$/),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,9 @@ sentryTest('user feedback event after pageload has pageload traceId in headers',
const feedbackEvent = await feedbackEventPromise;
const feedbackTraceContext = feedbackEvent.contexts?.trace;

expect(feedbackEvent.type).toEqual('feedback');

expect(feedbackTraceContext).toMatchObject({
op: 'pageload',
trace_id: META_TAG_TRACE_ID,
parent_span_id: META_TAG_PARENT_SPAN_ID,
span_id: expect.stringMatching(/^[0-9a-f]{16}$/),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,12 @@ sentryTest('user feedback event after pageload has pageload traceId in headers',
await page.locator('[data-sentry-feedback] .btn--primary').click();

const feedbackEvent = await feedbackEventPromise;

expect(feedbackEvent.type).toEqual('feedback');

const feedbackTraceContext = feedbackEvent.contexts?.trace;

expect(feedbackTraceContext).toMatchObject({
op: 'pageload',
trace_id: pageloadTraceContext?.trace_id,
span_id: expect.stringMatching(/^[0-9a-f]{16}$/),
});
Expand Down

0 comments on commit c16b325

Please sign in to comment.