Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jul 1, 2024
1 parent 857a688 commit bacf357
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { expect } from '@playwright/test';
import { sentryTest } from '../../../../utils/fixtures';
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';

const bundle = process.env.PW_BUNDLE || '';

sentryTest('should capture a replay', async ({ getLocalTestUrl, page }) => {
// When in buffer mode, there will not be a replay by default
if (shouldSkipReplayTest() || process.env.PW_BUNDLE === 'loader_replay_buffer') {
if (shouldSkipReplayTest() || bundle === 'loader_replay_buffer') {
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ sentryTest('should capture a replay & attach an error', async ({ getLocalTestUrl

const errorEventData = envelopeRequestParser(reqError);
expect(errorEventData.exception?.values?.length).toBe(1);
expect(errorEventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');
expect(errorEventData.exception?.values?.[0]?.value).toContain('window.doSomethingWrong is not a function');

const eventData = getReplayEvent(await req);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sentryTest(

const errorEventData = envelopeRequestParser(reqError);
expect(errorEventData.exception?.values?.length).toBe(1);
expect(errorEventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');
expect(errorEventData.exception?.values?.[0]?.value).toContain('window.doSomethingWrong is not a function');

const eventData = getReplayEvent(await req);

Expand Down

0 comments on commit bacf357

Please sign in to comment.