Skip to content

Commit 6f3396d

Browse files
schiller-manueltannerlinsley
authored andcommitted
don't duplicate test fixture in e2e tests
1 parent 8ea87fc commit 6f3396d

File tree

34 files changed

+33
-331
lines changed

34 files changed

+33
-331
lines changed

e2e/e2e-utils/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ export { toRuntimePath } from './to-runtime-path'
44
export { resolveRuntimeSuffix } from './resolve-runtime-suffix'
55
export { e2eStartDummyServer, e2eStopDummyServer } from './e2eSetupTeardown'
66
export type { Post } from './posts'
7+
export { test } from './fixture'

e2e/react-router/sentry-integration/tests/app.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { expect } from '@playwright/test'
2-
3-
import { test } from './fixture'
2+
import { test } from '@tanstack/router-e2e-utils'
43

54
test.beforeEach(async ({ page }) => {
65
await page.goto('/')

e2e/react-start/basic/tests/fixture.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

e2e/react-start/basic/tests/navigation.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { expect, test } from '@playwright/test'
1+
import { expect } from '@playwright/test'
2+
3+
import { test } from '@tanstack/router-e2e-utils'
24

35
test('Navigating to post', async ({ page }) => {
46
await page.goto('/')

e2e/react-start/basic/tests/not-found.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from '@playwright/test'
22
import combinateImport from 'combinate'
3-
import { test } from './fixture'
3+
import { test } from '@tanstack/router-e2e-utils'
44

55
// somehow playwright does not correctly import default exports
66
const combinate = (combinateImport as any).default as typeof combinateImport

e2e/react-start/basic/tests/params.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { expect, test } from '@playwright/test'
1+
import { expect } from '@playwright/test'
2+
3+
import { test } from '@tanstack/router-e2e-utils'
24

35
test.beforeEach(async ({ page }) => {
46
await page.goto('/')

e2e/react-start/basic/tests/redirect.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import combinateImport from 'combinate'
44
import {
55
getDummyServerPort,
66
getTestServerPort,
7+
test,
78
} from '@tanstack/router-e2e-utils'
89
import packageJson from '../package.json' with { type: 'json' }
9-
import { test } from './fixture'
1010

1111
// somehow playwright does not correctly import default exports
1212
const combinate = (combinateImport as any).default as typeof combinateImport

e2e/react-start/basic/tests/search-params.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test'
2-
import { test } from './fixture'
2+
import { test } from '@tanstack/router-e2e-utils'
33
import type { Response } from '@playwright/test'
44

55
function expectRedirect(response: Response | null, endsWith: string) {

e2e/react-start/basic/tests/streaming.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { expect, test } from '@playwright/test'
1+
import { expect } from '@playwright/test'
2+
import { test } from '@tanstack/router-e2e-utils'
23

34
test('Navigating to deferred route', async ({ page }) => {
45
await page.goto('/')

0 commit comments

Comments
 (0)