Skip to content

Commit 6ba3dc0

Browse files
committed
Use workerInfo for testDir.
1 parent 694efc9 commit 6ba3dc0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dev-packages/e2e-tests/test-applications/create-remix-app-express/app/entry.client.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ Sentry.init({
1818
useLocation,
1919
useMatches,
2020
}),
21+
Sentry.replayIntegration(),
2122
],
2223
// Performance Monitoring
2324
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!
25+
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
26+
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
2427
});
2528

2629
Sentry.addEventProcessor(event => {

dev-packages/e2e-tests/test-applications/create-remix-app-express/tests/behaviour-server.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ test('Sends a loader error to Sentry', async ({ page }) => {
1414
expect(loaderError.contexts.trace.op).toBe('http.server');
1515
});
1616

17-
test('Sends formdata with action error to Sentry', async ({ page }) => {
17+
test('Sends formdata with action error to Sentry', async ({ page }, workerInfo) => {
1818
await page.goto('/action-formdata');
1919

2020
await page.fill('input[name=test]', 'test');
21-
await page.setInputFiles('input[type=file]', `${__dirname}/static/test.txt`);
21+
await page.setInputFiles('input[type=file]', `${workerInfo.project.testDir}/static/test.txt`);
2222

2323
const formdataActionTransaction = waitForTransaction('create-remix-app-express', transactionEvent => {
2424
return transactionEvent?.spans?.some(span => span.op === 'function.remix.action');

0 commit comments

Comments
 (0)