Skip to content

Commit 239eb3b

Browse files
CopilotLms24
andauthored
fix(e2e-tests): Remove flaky navigation breadcrumb assertions from parameterized-routes tests (#20202)
Navigation breadcrumb assertion in nextjs-16 parameterized-routes test is flaky — the breadcrumb isn't reliably present due to timing. These tests validate route parameterization, not breadcrumb recording, so the assertion is unnecessary. - Removed `breadcrumbs: expect.arrayContaining([...])` from all parameterized-routes tests across all Next.js versions (13, 14, 15, 16, 16-bun, 16-cf-workers) - Core assertions retained: transaction name, source, trace context, request URL, environment --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
1 parent f6fc6a2 commit 239eb3b

File tree

6 files changed

+0
-168
lines changed

6 files changed

+0
-168
lines changed

dev-packages/e2e-tests/test-applications/nextjs-13/tests/client/parameterized-routes.test.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ test('should create a parameterized transaction when the `app` directory is used
1313
const transaction = await transactionPromise;
1414

1515
expect(transaction).toMatchObject({
16-
breadcrumbs: expect.arrayContaining([
17-
{
18-
category: 'navigation',
19-
data: { from: '/parameterized/cappuccino', to: '/parameterized/cappuccino' },
20-
timestamp: expect.any(Number),
21-
},
22-
]),
2316
contexts: {
2417
react: { version: expect.any(String) },
2518
trace: {
@@ -61,13 +54,6 @@ test('should create a static transaction when the `app` directory is used and th
6154
const transaction = await transactionPromise;
6255

6356
expect(transaction).toMatchObject({
64-
breadcrumbs: expect.arrayContaining([
65-
{
66-
category: 'navigation',
67-
data: { from: '/parameterized/static', to: '/parameterized/static' },
68-
timestamp: expect.any(Number),
69-
},
70-
]),
7157
contexts: {
7258
react: { version: expect.any(String) },
7359
trace: {
@@ -107,13 +93,6 @@ test('should create a partially parameterized transaction when the `app` directo
10793
const transaction = await transactionPromise;
10894

10995
expect(transaction).toMatchObject({
110-
breadcrumbs: expect.arrayContaining([
111-
{
112-
category: 'navigation',
113-
data: { from: '/parameterized/cappuccino/beep', to: '/parameterized/cappuccino/beep' },
114-
timestamp: expect.any(Number),
115-
},
116-
]),
11796
contexts: {
11897
react: { version: expect.any(String) },
11998
trace: {
@@ -154,13 +133,6 @@ test('should create a nested parameterized transaction when the `app` directory
154133
const transaction = await transactionPromise;
155134

156135
expect(transaction).toMatchObject({
157-
breadcrumbs: expect.arrayContaining([
158-
{
159-
category: 'navigation',
160-
data: { from: '/parameterized/cappuccino/beep/espresso', to: '/parameterized/cappuccino/beep/espresso' },
161-
timestamp: expect.any(Number),
162-
},
163-
]),
164136
contexts: {
165137
react: { version: expect.any(String) },
166138
trace: {

dev-packages/e2e-tests/test-applications/nextjs-14/tests/parameterized-routes.test.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ test('should create a parameterized transaction when the `app` directory is used
1313
const transaction = await transactionPromise;
1414

1515
expect(transaction).toMatchObject({
16-
breadcrumbs: expect.arrayContaining([
17-
{
18-
category: 'navigation',
19-
data: { from: '/parameterized/cappuccino', to: '/parameterized/cappuccino' },
20-
timestamp: expect.any(Number),
21-
},
22-
]),
2316
contexts: {
2417
react: { version: expect.any(String) },
2518
trace: {
@@ -61,13 +54,6 @@ test('should create a static transaction when the `app` directory is used and th
6154
const transaction = await transactionPromise;
6255

6356
expect(transaction).toMatchObject({
64-
breadcrumbs: expect.arrayContaining([
65-
{
66-
category: 'navigation',
67-
data: { from: '/parameterized/static', to: '/parameterized/static' },
68-
timestamp: expect.any(Number),
69-
},
70-
]),
7157
contexts: {
7258
react: { version: expect.any(String) },
7359
trace: {
@@ -107,13 +93,6 @@ test('should create a partially parameterized transaction when the `app` directo
10793
const transaction = await transactionPromise;
10894

10995
expect(transaction).toMatchObject({
110-
breadcrumbs: expect.arrayContaining([
111-
{
112-
category: 'navigation',
113-
data: { from: '/parameterized/cappuccino/beep', to: '/parameterized/cappuccino/beep' },
114-
timestamp: expect.any(Number),
115-
},
116-
]),
11796
contexts: {
11897
react: { version: expect.any(String) },
11998
trace: {
@@ -154,13 +133,6 @@ test('should create a nested parameterized transaction when the `app` directory
154133
const transaction = await transactionPromise;
155134

156135
expect(transaction).toMatchObject({
157-
breadcrumbs: expect.arrayContaining([
158-
{
159-
category: 'navigation',
160-
data: { from: '/parameterized/cappuccino/beep/espresso', to: '/parameterized/cappuccino/beep/espresso' },
161-
timestamp: expect.any(Number),
162-
},
163-
]),
164136
contexts: {
165137
react: { version: expect.any(String) },
166138
trace: {

dev-packages/e2e-tests/test-applications/nextjs-15/tests/parameterized-routes.test.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ test('should create a parameterized transaction when the `app` directory is used
1313
const transaction = await transactionPromise;
1414

1515
expect(transaction).toMatchObject({
16-
breadcrumbs: expect.arrayContaining([
17-
{
18-
category: 'navigation',
19-
data: { from: '/parameterized/cappuccino', to: '/parameterized/cappuccino' },
20-
timestamp: expect.any(Number),
21-
},
22-
]),
2316
contexts: {
2417
react: { version: expect.any(String) },
2518
trace: {
@@ -61,13 +54,6 @@ test('should create a static transaction when the `app` directory is used and th
6154
const transaction = await transactionPromise;
6255

6356
expect(transaction).toMatchObject({
64-
breadcrumbs: expect.arrayContaining([
65-
{
66-
category: 'navigation',
67-
data: { from: '/parameterized/static', to: '/parameterized/static' },
68-
timestamp: expect.any(Number),
69-
},
70-
]),
7157
contexts: {
7258
react: { version: expect.any(String) },
7359
trace: {
@@ -107,13 +93,6 @@ test('should create a partially parameterized transaction when the `app` directo
10793
const transaction = await transactionPromise;
10894

10995
expect(transaction).toMatchObject({
110-
breadcrumbs: expect.arrayContaining([
111-
{
112-
category: 'navigation',
113-
data: { from: '/parameterized/cappuccino/beep', to: '/parameterized/cappuccino/beep' },
114-
timestamp: expect.any(Number),
115-
},
116-
]),
11796
contexts: {
11897
react: { version: expect.any(String) },
11998
trace: {
@@ -154,13 +133,6 @@ test('should create a nested parameterized transaction when the `app` directory
154133
const transaction = await transactionPromise;
155134

156135
expect(transaction).toMatchObject({
157-
breadcrumbs: expect.arrayContaining([
158-
{
159-
category: 'navigation',
160-
data: { from: '/parameterized/cappuccino/beep/espresso', to: '/parameterized/cappuccino/beep/espresso' },
161-
timestamp: expect.any(Number),
162-
},
163-
]),
164136
contexts: {
165137
react: { version: expect.any(String) },
166138
trace: {

dev-packages/e2e-tests/test-applications/nextjs-16-bun/tests/parameterized-routes.test.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ test('should create a parameterized transaction when the `app` directory is used
1313
const transaction = await transactionPromise;
1414

1515
expect(transaction).toMatchObject({
16-
breadcrumbs: expect.arrayContaining([
17-
{
18-
category: 'navigation',
19-
data: { from: '/parameterized/cappuccino', to: '/parameterized/cappuccino' },
20-
timestamp: expect.any(Number),
21-
},
22-
]),
2316
contexts: {
2417
react: { version: expect.any(String) },
2518
trace: {
@@ -61,13 +54,6 @@ test('should create a static transaction when the `app` directory is used and th
6154
const transaction = await transactionPromise;
6255

6356
expect(transaction).toMatchObject({
64-
breadcrumbs: expect.arrayContaining([
65-
{
66-
category: 'navigation',
67-
data: { from: '/parameterized/static', to: '/parameterized/static' },
68-
timestamp: expect.any(Number),
69-
},
70-
]),
7157
contexts: {
7258
react: { version: expect.any(String) },
7359
trace: {
@@ -107,13 +93,6 @@ test('should create a partially parameterized transaction when the `app` directo
10793
const transaction = await transactionPromise;
10894

10995
expect(transaction).toMatchObject({
110-
breadcrumbs: expect.arrayContaining([
111-
{
112-
category: 'navigation',
113-
data: { from: '/parameterized/cappuccino/beep', to: '/parameterized/cappuccino/beep' },
114-
timestamp: expect.any(Number),
115-
},
116-
]),
11796
contexts: {
11897
react: { version: expect.any(String) },
11998
trace: {
@@ -154,13 +133,6 @@ test('should create a nested parameterized transaction when the `app` directory
154133
const transaction = await transactionPromise;
155134

156135
expect(transaction).toMatchObject({
157-
breadcrumbs: expect.arrayContaining([
158-
{
159-
category: 'navigation',
160-
data: { from: '/parameterized/cappuccino/beep/espresso', to: '/parameterized/cappuccino/beep/espresso' },
161-
timestamp: expect.any(Number),
162-
},
163-
]),
164136
contexts: {
165137
react: { version: expect.any(String) },
166138
trace: {

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/parameterized-routes.test.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ test.skip('should create a parameterized transaction when the `app` directory is
1414
const transaction = await transactionPromise;
1515

1616
expect(transaction).toMatchObject({
17-
breadcrumbs: expect.arrayContaining([
18-
{
19-
category: 'navigation',
20-
data: { from: '/parameterized/cappuccino', to: '/parameterized/cappuccino' },
21-
timestamp: expect.any(Number),
22-
},
23-
]),
2417
contexts: {
2518
react: { version: expect.any(String) },
2619
trace: {
@@ -63,13 +56,6 @@ test.skip('should create a static transaction when the `app` directory is used a
6356
const transaction = await transactionPromise;
6457

6558
expect(transaction).toMatchObject({
66-
breadcrumbs: expect.arrayContaining([
67-
{
68-
category: 'navigation',
69-
data: { from: '/parameterized/static', to: '/parameterized/static' },
70-
timestamp: expect.any(Number),
71-
},
72-
]),
7359
contexts: {
7460
react: { version: expect.any(String) },
7561
trace: {
@@ -110,13 +96,6 @@ test.skip('should create a partially parameterized transaction when the `app` di
11096
const transaction = await transactionPromise;
11197

11298
expect(transaction).toMatchObject({
113-
breadcrumbs: expect.arrayContaining([
114-
{
115-
category: 'navigation',
116-
data: { from: '/parameterized/cappuccino/beep', to: '/parameterized/cappuccino/beep' },
117-
timestamp: expect.any(Number),
118-
},
119-
]),
12099
contexts: {
121100
react: { version: expect.any(String) },
122101
trace: {
@@ -158,13 +137,6 @@ test.skip('should create a nested parameterized transaction when the `app` direc
158137
const transaction = await transactionPromise;
159138

160139
expect(transaction).toMatchObject({
161-
breadcrumbs: expect.arrayContaining([
162-
{
163-
category: 'navigation',
164-
data: { from: '/parameterized/cappuccino/beep/espresso', to: '/parameterized/cappuccino/beep/espresso' },
165-
timestamp: expect.any(Number),
166-
},
167-
]),
168140
contexts: {
169141
react: { version: expect.any(String) },
170142
trace: {

dev-packages/e2e-tests/test-applications/nextjs-16/tests/parameterized-routes.test.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ test('should create a parameterized transaction when the `app` directory is used
1313
const transaction = await transactionPromise;
1414

1515
expect(transaction).toMatchObject({
16-
breadcrumbs: expect.arrayContaining([
17-
{
18-
category: 'navigation',
19-
data: { from: '/parameterized/cappuccino', to: '/parameterized/cappuccino' },
20-
timestamp: expect.any(Number),
21-
},
22-
]),
2316
contexts: {
2417
react: { version: expect.any(String) },
2518
trace: {
@@ -61,13 +54,6 @@ test('should create a static transaction when the `app` directory is used and th
6154
const transaction = await transactionPromise;
6255

6356
expect(transaction).toMatchObject({
64-
breadcrumbs: expect.arrayContaining([
65-
{
66-
category: 'navigation',
67-
data: { from: '/parameterized/static', to: '/parameterized/static' },
68-
timestamp: expect.any(Number),
69-
},
70-
]),
7157
contexts: {
7258
react: { version: expect.any(String) },
7359
trace: {
@@ -107,13 +93,6 @@ test('should create a partially parameterized transaction when the `app` directo
10793
const transaction = await transactionPromise;
10894

10995
expect(transaction).toMatchObject({
110-
breadcrumbs: expect.arrayContaining([
111-
{
112-
category: 'navigation',
113-
data: { from: '/parameterized/cappuccino/beep', to: '/parameterized/cappuccino/beep' },
114-
timestamp: expect.any(Number),
115-
},
116-
]),
11796
contexts: {
11897
react: { version: expect.any(String) },
11998
trace: {
@@ -154,13 +133,6 @@ test('should create a nested parameterized transaction when the `app` directory
154133
const transaction = await transactionPromise;
155134

156135
expect(transaction).toMatchObject({
157-
breadcrumbs: expect.arrayContaining([
158-
{
159-
category: 'navigation',
160-
data: { from: '/parameterized/cappuccino/beep/espresso', to: '/parameterized/cappuccino/beep/espresso' },
161-
timestamp: expect.any(Number),
162-
},
163-
]),
164136
contexts: {
165137
react: { version: expect.any(String) },
166138
trace: {

0 commit comments

Comments
 (0)