From cb3e14a26547cb8300b0fd3197577d07eefe649e Mon Sep 17 00:00:00 2001 From: giancarlo Date: Sat, 13 Apr 2024 20:50:08 +0800 Subject: [PATCH] Update workflow and suppress dev server in e2e tests The playwright.config.ts file has been updated to comment out the part that runs the local dev server during end-to-end tests. Additionally, an action has been added in the GitHub workflow to specifically run the app. Also, a trivial modification to the 'startTransition' function in the 'invite-members-dialog-container.tsx' file has been made. --- .github/workflows/workflow.yml | 4 ++++ apps/e2e/playwright.config.ts | 18 ++++++++++-------- .../invite-members-dialog-container.tsx | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index acd0006eb..ed7bf1934 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -86,6 +86,10 @@ jobs: - name: Supabase Server run: pnpm run supabase:web:start -- -x studio,migra,deno-relay,pgadmin-schema-diff,imgproxy,logflare + - name: Run App + run: | + pnpm run dev & + - name: Run Playwright tests run: pnpm run test - uses: actions/upload-artifact@v4 diff --git a/apps/e2e/playwright.config.ts b/apps/e2e/playwright.config.ts index f8875d4a3..f28b9a322 100644 --- a/apps/e2e/playwright.config.ts +++ b/apps/e2e/playwright.config.ts @@ -67,12 +67,14 @@ export default defineConfig({ ], /* Run your local dev server before starting the tests */ - webServer: { - cwd: '../../', - command: 'pnpm run dev', - url: 'http://localhost:3000', - reuseExistingServer: !process.env.CI, - stdout: 'pipe', - stderr: 'pipe', - } + /* + webServer: { + cwd: '../../', + command: 'pnpm run dev', + url: 'http://localhost:3000', + reuseExistingServer: !process.env.CI, + stdout: 'pipe', + stderr: 'pipe', + } + */ }); diff --git a/packages/features/team-accounts/src/components/members/invite-members-dialog-container.tsx b/packages/features/team-accounts/src/components/members/invite-members-dialog-container.tsx index 7cceab52f..a57b9ed61 100644 --- a/packages/features/team-accounts/src/components/members/invite-members-dialog-container.tsx +++ b/packages/features/team-accounts/src/components/members/invite-members-dialog-container.tsx @@ -88,7 +88,7 @@ export function InviteMembersDialogContainer({ pending={pending} roles={roles} onSubmit={(data) => { - startTransition(async () => { + startTransition(() => { const promise = createInvitationsAction({ accountSlug, invitations: data.invitations,