Skip to content

Commit a3ae2c4

Browse files
committed
Add E2E tests
1 parent 81f9ee5 commit a3ae2c4

File tree

7 files changed

+105
-0
lines changed

7 files changed

+105
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import { uuid4 } from '@sentry/utils';
33

44
import { waitForTransaction } from '@sentry-internal/test-utils';
55

6+
test.describe.configure({ mode: 'serial' });
7+
8+
test('Sends parameterized transaction name to Sentry', async ({ page }) => {
9+
const transactionPromise = waitForTransaction('create-remix-app-express-legacy', transactionEvent => {
10+
return transactionEvent.contexts?.trace?.op === 'http.server';
11+
});
12+
13+
await page.goto('/user/123');
14+
15+
const transaction = await transactionPromise;
16+
17+
expect(transaction).toBeDefined();
18+
expect(transaction.transaction).toBe('routes/user.$id');
19+
});
20+
621
test('Sends form data with action span to Sentry', async ({ page }) => {
722
await page.goto('/action-formdata');
823

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import { uuid4 } from '@sentry/utils';
33

44
import { waitForTransaction } from '@sentry-internal/test-utils';
55

6+
test.describe.configure({ mode: 'serial' });
7+
8+
test('Sends parameterized transaction name to Sentry', async ({ page }) => {
9+
const transactionPromise = waitForTransaction('create-remix-app-express-vite-dev', transactionEvent => {
10+
return transactionEvent.contexts?.trace?.op === 'http.server';
11+
});
12+
13+
await page.goto('/user/123');
14+
15+
const transaction = await transactionPromise;
16+
17+
expect(transaction).toBeDefined();
18+
expect(transaction.transaction).toBe('GET user/:id');
19+
});
20+
621
test('Sends two linked transactions (server & client) to Sentry', async ({ page }) => {
722
// We use this to identify the transactions
823
const testTag = uuid4();

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import { uuid4 } from '@sentry/utils';
33

44
import { waitForTransaction } from '@sentry-internal/test-utils';
55

6+
test.describe.configure({ mode: 'serial' });
7+
8+
test('Sends parameterized transaction name to Sentry', async ({ page }) => {
9+
const transactionPromise = waitForTransaction('create-remix-app-express', transactionEvent => {
10+
return transactionEvent.contexts?.trace?.op === 'http.server';
11+
});
12+
13+
await page.goto('/user/123');
14+
15+
const transaction = await transactionPromise;
16+
17+
expect(transaction).toBeDefined();
18+
expect(transaction.transaction).toBe('GET user/:id');
19+
});
20+
621
test('Sends form data with action span', async ({ page }) => {
722
await page.goto('/action-formdata');
823

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import { uuid4 } from '@sentry/utils';
33

44
import { waitForTransaction } from '@sentry-internal/test-utils';
55

6+
test.describe.configure({ mode: 'serial' });
7+
8+
test('Sends parameterized transaction name to Sentry', async ({ page }) => {
9+
const transactionPromise = waitForTransaction('create-remix-app-legacy', transactionEvent => {
10+
return transactionEvent.contexts?.trace?.op === 'http.server';
11+
});
12+
13+
await page.goto('/user/123');
14+
15+
const transaction = await transactionPromise;
16+
17+
expect(transaction).toBeDefined();
18+
expect(transaction.transaction).toBe('routes/user.$id');
19+
});
20+
621
test('Sends two linked transactions (server & client) to Sentry', async ({ page }) => {
722
// We use this to identify the transactions
823
const testTag = uuid4();

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import { uuid4 } from '@sentry/utils';
33

44
import { waitForTransaction } from '@sentry-internal/test-utils';
55

6+
test.describe.configure({ mode: 'serial' });
7+
8+
test('Sends parameterized transaction name to Sentry', async ({ page }) => {
9+
const transactionPromise = waitForTransaction('create-remix-app-v2-legacy', transactionEvent => {
10+
return transactionEvent.contexts?.trace?.op === 'http.server';
11+
});
12+
13+
await page.goto('/user/123');
14+
15+
const transaction = await transactionPromise;
16+
17+
expect(transaction).toBeDefined();
18+
expect(transaction.transaction).toBe('routes/user.$id');
19+
});
20+
621
test('Sends two linked transactions (server & client) to Sentry', async ({ page }) => {
722
// We use this to identify the transactions
823
const testTag = uuid4();

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import { uuid4 } from '@sentry/utils';
33

44
import { waitForTransaction } from '@sentry-internal/test-utils';
55

6+
test.describe.configure({ mode: 'serial' });
7+
8+
test('Sends parameterized transaction name to Sentry', async ({ page }) => {
9+
const transactionPromise = waitForTransaction('create-remix-app-v2', transactionEvent => {
10+
return transactionEvent.contexts?.trace?.op === 'http.server';
11+
});
12+
13+
await page.goto('/user/123');
14+
15+
const transaction = await transactionPromise;
16+
17+
expect(transaction).toBeDefined();
18+
expect(transaction.transaction).toBe('GET user/:id');
19+
});
20+
621
test('Sends two linked transactions (server & client) to Sentry', async ({ page }) => {
722
// We use this to identify the transactions
823
const testTag = uuid4();

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import { uuid4 } from '@sentry/utils';
33

44
import { waitForTransaction } from '@sentry-internal/test-utils';
55

6+
test.describe.configure({ mode: 'serial' });
7+
8+
test('Sends parameterized transaction name to Sentry', async ({ page }) => {
9+
const transactionPromise = waitForTransaction('create-remix-app', transactionEvent => {
10+
return transactionEvent.contexts?.trace?.op === 'http.server';
11+
});
12+
13+
await page.goto('/user/123');
14+
15+
const transaction = await transactionPromise;
16+
17+
expect(transaction).toBeDefined();
18+
expect(transaction.transaction).toBe('GET user/:id');
19+
});
20+
621
test('Sends two linked transactions (server & client) to Sentry', async ({ page }) => {
722
// We use this to identify the transactions
823
const testTag = uuid4();

0 commit comments

Comments
 (0)