Skip to content

test(feedback): Fixes lazy loaded feedback bundles #14410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading