Skip to content

Commit 1e565d7

Browse files
committed
f
1 parent a0fbf27 commit 1e565d7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/playwright.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
run: pnpm e2e
4242
env:
4343
VITE_CONVEX_URL: ${{ steps.preview.outputs.PREVIEW_URL }}
44+
CONVEX_PREVIEW_NAME: pr-${{ github.event.pull_request.number }}
4445
E2E_CLERK_USER: ${{ vars.E2E_CLERK_USER }}
4546
E2E_CLERK_PASSWORD: ${{ vars.E2E_CLERK_PASSWORD }}
4647
E2E_CLERK_USER_B: ${{ vars.E2E_CLERK_USER_B }}

e2e/scenarios/first-shift-delivery.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ test.describe("田中さんの初めてのシフト確定", () => {
3434
});
3535

3636
test("初回セットアップからシフト確定まで", async ({ page }) => {
37-
execSync("npx convex run --no-push testing:clearAllTables", { encoding: "utf-8", cwd: process.cwd() });
37+
const previewFlag = process.env.CONVEX_PREVIEW_NAME ? `--preview-name ${process.env.CONVEX_PREVIEW_NAME}` : "";
38+
execSync(`npx convex run --no-push testing:clearAllTables ${previewFlag}`, {
39+
encoding: "utf-8",
40+
cwd: process.cwd(),
41+
});
3842

3943
await test.step("Step 1: 初回セットアップを完了する", async () => {
4044
await dashboard.goto();
@@ -69,7 +73,7 @@ test.describe("田中さんの初めてのシフト確定", () => {
6973
});
7074

7175
const seedArgs = JSON.stringify({ staffAssignments: STAFF_ASSIGNMENTS, dates: dates.dates });
72-
execSync(`npx convex run --no-push testing:seedShiftData '${seedArgs}'`, {
76+
execSync(`npx convex run --no-push testing:seedShiftData '${seedArgs}' ${previewFlag}`, {
7377
encoding: "utf-8",
7478
cwd: process.cwd(),
7579
});

0 commit comments

Comments
 (0)