Skip to content

Commit

Permalink
test: Unflake remix E2E test (#13534)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea authored Aug 30, 2024
1 parent 70ab8a9 commit eacf56b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ test('Sends parameterized transaction name to Sentry', async ({ page }) => {
});

test('Sends form data with action span to Sentry', async ({ page }) => {
const formdataActionTransaction = waitForTransaction('create-remix-app-express-legacy', transactionEvent => {
return transactionEvent?.spans?.some(span => span.op === 'function.remix.action');
});

await page.goto('/action-formdata');

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

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

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

const actionSpan = (await formdataActionTransaction).spans.find(span => span.op === 'function.remix.action');

expect(actionSpan).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ test('Sends parameterized transaction name to Sentry', async ({ page }) => {
});

test('Sends form data with action span', async ({ page }) => {
const formdataActionTransaction = waitForTransaction('create-remix-app-express', transactionEvent => {
return transactionEvent?.spans?.some(span => span.data && span.data['code.function'] === 'action');
});

await page.goto('/action-formdata');

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

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

const formdataActionTransaction = waitForTransaction('create-remix-app-express', transactionEvent => {
return transactionEvent?.spans?.some(span => span.data && span.data['code.function'] === 'action');
});

const actionSpan = (await formdataActionTransaction).spans.find(
span => span.data && span.data['code.function'] === 'action',
);
Expand Down

0 comments on commit eacf56b

Please sign in to comment.