From 10fa2a4bc4e4988df72ebc4d54078900eb44025f Mon Sep 17 00:00:00 2001 From: Max Shen Date: Mon, 1 Apr 2024 16:03:10 +0800 Subject: [PATCH] test: set base url based on node env --- playwright.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index b9f98a3..e8ea819 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -24,7 +24,10 @@ export default defineConfig({ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://127.0.0.1:3000', + baseURL: + process.env.NODE_ENV === 'development' + ? 'http://127.0.0.1:3000' + : 'https://github-issue-blog.vercel.app/', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry',