Skip to content

Commit

Permalink
test(feedback): Fixes lazy loaded feedback bundles (#14410)
Browse files Browse the repository at this point in the history
Include `handleLazyLoadedFeedback:true` when calling `getLocalTestUrl`
for browser-integration-tests
  • Loading branch information
billyvg authored Nov 21, 2024
1 parent 26f9db8 commit 138417b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sentryTest('should capture feedback with custom button', async ({ getLocalTestUr
}
});

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

await page.goto(url);
await page.locator('#custom-feedback-button').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sentryTest('should capture feedback', async ({ getLocalTestUrl, page }) => {
}
});

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

await page.goto(url);
await page.getByText('Report a Bug').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestUrl
}
});

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

await Promise.all([page.goto(url), page.getByText('Report a Bug').click(), reqPromise0]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sentryTest('should capture feedback', async ({ getLocalTestUrl, page }) => {
}
});

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

await page.goto(url);
await page.getByText('Report a Bug').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sentryTest } from '../../../../utils/fixtures';

sentryTest('it allows to lazy load the feedback integration', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback.min.js`, route => {
return route.fulfill({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ sentryTest(
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

// ensure pageload transaction is finished
await getFirstSentryEnvelopeRequest<Event>(page, url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ sentryTest('user feedback event after pageload has pageload traceId in headers',
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

const pageloadEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);
const pageloadTraceContext = pageloadEvent.contexts?.trace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ sentryTest('user feedback event after pageload has pageload traceId in headers',
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });

const pageloadEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);
const pageloadTraceContext = pageloadEvent.contexts?.trace;
Expand Down

0 comments on commit 138417b

Please sign in to comment.