Skip to content

Commit eacf56b

Browse files
authored
1 parent 70ab8a9 commit eacf56b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ test('Sends parameterized transaction name to Sentry', async ({ page }) => {
1919
});
2020

2121
test('Sends form data with action span to Sentry', async ({ page }) => {
22+
const formdataActionTransaction = waitForTransaction('create-remix-app-express-legacy', transactionEvent => {
23+
return transactionEvent?.spans?.some(span => span.op === 'function.remix.action');
24+
});
25+
2226
await page.goto('/action-formdata');
2327

2428
await page.fill('input[name=text]', 'test');
@@ -30,10 +34,6 @@ test('Sends form data with action span to Sentry', async ({ page }) => {
3034

3135
await page.locator('button[type=submit]').click();
3236

33-
const formdataActionTransaction = waitForTransaction('create-remix-app-express-legacy', transactionEvent => {
34-
return transactionEvent?.spans?.some(span => span.op === 'function.remix.action');
35-
});
36-
3737
const actionSpan = (await formdataActionTransaction).spans.find(span => span.op === 'function.remix.action');
3838

3939
expect(actionSpan).toBeDefined();

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ test('Sends parameterized transaction name to Sentry', async ({ page }) => {
1919
});
2020

2121
test('Sends form data with action span', async ({ page }) => {
22+
const formdataActionTransaction = waitForTransaction('create-remix-app-express', transactionEvent => {
23+
return transactionEvent?.spans?.some(span => span.data && span.data['code.function'] === 'action');
24+
});
25+
2226
await page.goto('/action-formdata');
2327

2428
await page.fill('input[name=text]', 'test');
@@ -30,10 +34,6 @@ test('Sends form data with action span', async ({ page }) => {
3034

3135
await page.locator('button[type=submit]').click();
3236

33-
const formdataActionTransaction = waitForTransaction('create-remix-app-express', transactionEvent => {
34-
return transactionEvent?.spans?.some(span => span.data && span.data['code.function'] === 'action');
35-
});
36-
3737
const actionSpan = (await formdataActionTransaction).spans.find(
3838
span => span.data && span.data['code.function'] === 'action',
3939
);

0 commit comments

Comments
 (0)