-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reuse playwright tests for integration tests of React Router and TanStack #426
Merged
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f6403aa
move playwright tests into separate folder
phryneas 7041ced
tag tests, hook script up
phryneas 57ebe0d
fix config for knip
phryneas 0a3c8a8
rename route
phryneas 04540f1
first tests
phryneas 6ac9152
run tanstack tests in CI
phryneas 7fbcdec
QueryRef tests wih `preloadQuery`
phryneas e77dacc
Merge remote-tracking branch 'origin/next' into pr/refactor-tests
phryneas 00c0d70
add `preloadQuery` `useReadQuery` tests
phryneas 34437a7
run integration tests against TanStack deployment on Vercel
phryneas e9b4698
annotate a test
phryneas 10b6ac3
another test
phryneas b92e01d
bump react-router to newest template, add vercel preset
phryneas b0a7933
update config, add log message
phryneas f32716d
apply vercel-specific options
phryneas b26b8ef
first react-router tests
phryneas f1e627c
run tests in CI
phryneas e532b5b
update package json name
phryneas c7cddb1
fix review comment
phryneas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,9 +10,13 @@ jobs: | |||||
run: echo 'Deployment status is ${{ toJSON(github.event.deployment_status) }}' | ||||||
|
||||||
run-next-e2e: | ||||||
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'Preview – apollo__experimental-nextjs-app-support' | ||||||
if: | | ||||||
github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && ( | ||||||
github.event.deployment_status.environment == 'Preview – apollo__experimental-nextjs-app-support' || | ||||||
github.event.deployment_status.environment == 'Preview – apollo__client-integration-tanstack-start' | ||||||
) | ||||||
runs-on: ubuntu-latest | ||||||
name: Run Playwright tests against Vercel deployment | ||||||
name: Run Playwright tests against Vercel deployment ${{ github.event.deployment_status.environment }} | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
- uses: actions/checkout@v4 | ||||||
|
@@ -39,7 +43,20 @@ jobs: | |||||
- run: npx playwright install-deps | ||||||
if: steps.playwright-cache.outputs.cache-hit == 'true' | ||||||
|
||||||
- name: "Run Playwright tests against Vercel deployment" | ||||||
- name: "Run Playwright tests against Vercel deployment - Next.js" | ||||||
if: github.event.deployment_status.environment == 'Preview – apollo__experimental-nextjs-app-support' | ||||||
run: yarn workspace @integration-test/nextjs run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | ||||||
env: | ||||||
BASE_URL: ${{ github.event.deployment_status.environment_url }} | ||||||
|
||||||
- name: "Run Playwright tests against Vercel deployment - TanStack Start" | ||||||
if: github.event.deployment_status.environment == 'Preview – apollo__client-integration-tanstack-start' | ||||||
run: yarn workspace @integration-test/tanstack-start run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | ||||||
env: | ||||||
BASE_URL: ${{ github.event.deployment_status.environment_url }} | ||||||
|
||||||
- name: "Run Playwright tests against Vercel deployment - React Router" | ||||||
if: github.event.deployment_status.environment == 'Preview – apoll__client-integration-react-router' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
run: yarn workspace @integration-test/react-router run test | tee $GITHUB_STEP_SUMMARY; exit ${PIPESTATUS[0]} | ||||||
env: | ||||||
BASE_URL: ${{ github.event.deployment_status.environment_url }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
diff --git a/dist/development/lib/types/route-module.d.mts b/dist/development/lib/types/route-module.d.mts | ||
index 65548f5090c95d9a8a34f916306d3b9d6bff4250..bf88cb4f4f1fa1c9576913efc3c9d230a5315de0 100644 | ||
--- a/dist/development/lib/types/route-module.d.mts | ||
+++ b/dist/development/lib/types/route-module.d.mts | ||
@@ -1,7 +1,9 @@ | ||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.mjs'; | ||
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs'; | ||
import 'react'; | ||
- | ||
+export type SerializesTo<T> = { | ||
+ $__RR_SerializesTo?: [T]; | ||
+}; | ||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true; | ||
type RouteModule = { | ||
meta?: Func; | ||
diff --git a/dist/development/lib/types/route-module.d.ts b/dist/development/lib/types/route-module.d.ts | ||
index a8b932c982cbf7935cdf5402cb844c118a2b9e79..5f9d3fbb1f79c680b3f3ba5f06caee2268ee34fd 100644 | ||
--- a/dist/development/lib/types/route-module.d.ts | ||
+++ b/dist/development/lib/types/route-module.d.ts | ||
@@ -1,7 +1,9 @@ | ||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.js'; | ||
import { A as AppLoadContext } from '../../data-CQbyyGzl.js'; | ||
import 'react'; | ||
- | ||
+export type SerializesTo<T> = { | ||
+ $__RR_SerializesTo?: [T]; | ||
+}; | ||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true; | ||
type RouteModule = { | ||
meta?: Func; | ||
diff --git a/dist/development/route-data-Cq_b5feC.d.mts b/dist/development/route-data-Cq_b5feC.d.mts | ||
index a44077c379d51d720dc5539ef006d105657d673c..e5a646b097b82714a739fec8510d13bf09207699 100644 | ||
--- a/dist/development/route-data-Cq_b5feC.d.mts | ||
+++ b/dist/development/route-data-Cq_b5feC.d.mts | ||
@@ -1564,7 +1564,7 @@ type Pretty<T> = { | ||
[K in keyof T]: T[K]; | ||
} & {}; | ||
|
||
-type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
+type Serialize<T> = T extends import('./lib/types/route-module.mjs').SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
[K in keyof T]: Serialize<T[K]>; | ||
} : undefined; | ||
type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T; | ||
diff --git a/dist/development/route-data-Cq_b5feC.d.ts b/dist/development/route-data-Cq_b5feC.d.ts | ||
index a44077c379d51d720dc5539ef006d105657d673c..ac555685ba76cc74c6052517fa03ca632e03ba75 100644 | ||
--- a/dist/development/route-data-Cq_b5feC.d.ts | ||
+++ b/dist/development/route-data-Cq_b5feC.d.ts | ||
@@ -1564,7 +1564,7 @@ type Pretty<T> = { | ||
[K in keyof T]: T[K]; | ||
} & {}; | ||
|
||
-type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
+type Serialize<T> = T extends import('./lib/types/route-module.js').SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
[K in keyof T]: Serialize<T[K]>; | ||
} : undefined; | ||
type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T; | ||
diff --git a/dist/production/lib/types/route-module.d.mts b/dist/production/lib/types/route-module.d.mts | ||
index 65548f5090c95d9a8a34f916306d3b9d6bff4250..bf88cb4f4f1fa1c9576913efc3c9d230a5315de0 100644 | ||
--- a/dist/production/lib/types/route-module.d.mts | ||
+++ b/dist/production/lib/types/route-module.d.mts | ||
@@ -1,7 +1,9 @@ | ||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.mjs'; | ||
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs'; | ||
import 'react'; | ||
- | ||
+export type SerializesTo<T> = { | ||
+ $__RR_SerializesTo?: [T]; | ||
+}; | ||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true; | ||
type RouteModule = { | ||
meta?: Func; | ||
diff --git a/dist/production/lib/types/route-module.d.ts b/dist/production/lib/types/route-module.d.ts | ||
index a8b932c982cbf7935cdf5402cb844c118a2b9e79..5f9d3fbb1f79c680b3f3ba5f06caee2268ee34fd 100644 | ||
--- a/dist/production/lib/types/route-module.d.ts | ||
+++ b/dist/production/lib/types/route-module.d.ts | ||
@@ -1,7 +1,9 @@ | ||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.js'; | ||
import { A as AppLoadContext } from '../../data-CQbyyGzl.js'; | ||
import 'react'; | ||
- | ||
+export type SerializesTo<T> = { | ||
+ $__RR_SerializesTo?: [T]; | ||
+}; | ||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true; | ||
type RouteModule = { | ||
meta?: Func; | ||
diff --git a/dist/production/route-data-Cq_b5feC.d.mts b/dist/production/route-data-Cq_b5feC.d.mts | ||
index a44077c379d51d720dc5539ef006d105657d673c..e5a646b097b82714a739fec8510d13bf09207699 100644 | ||
--- a/dist/production/route-data-Cq_b5feC.d.mts | ||
+++ b/dist/production/route-data-Cq_b5feC.d.mts | ||
@@ -1564,7 +1564,7 @@ type Pretty<T> = { | ||
[K in keyof T]: T[K]; | ||
} & {}; | ||
|
||
-type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
+type Serialize<T> = T extends import('./lib/types/route-module.mjs').SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
[K in keyof T]: Serialize<T[K]>; | ||
} : undefined; | ||
type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T; | ||
diff --git a/dist/production/route-data-Cq_b5feC.d.ts b/dist/production/route-data-Cq_b5feC.d.ts | ||
index a44077c379d51d720dc5539ef006d105657d673c..ac555685ba76cc74c6052517fa03ca632e03ba75 100644 | ||
--- a/dist/production/route-data-Cq_b5feC.d.ts | ||
+++ b/dist/production/route-data-Cq_b5feC.d.ts | ||
@@ -1564,7 +1564,7 @@ type Pretty<T> = { | ||
[K in keyof T]: T[K]; | ||
} & {}; | ||
|
||
-type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
+type Serialize<T> = T extends import('./lib/types/route-module.js').SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? { | ||
[K in keyof T]: Serialize<T[K]>; | ||
} : undefined; | ||
type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to include react router or is it intentionally omitted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good call! I can't test this until it hits
main
, so this is a bit hazy to test (I'll probably cherry-pick this file over)