From b4e8855ecada68d9d3d34f263e6b9fba62a81d39 Mon Sep 17 00:00:00 2001 From: Rain <958414905@qq.com> Date: Sat, 7 Oct 2023 12:53:02 +0800 Subject: [PATCH] chore(e2e): use APP_BASE_URL in codegen --- scripts/codegen.setup.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/codegen.setup.ts b/scripts/codegen.setup.ts index b6405eb93..f0ece84bd 100644 --- a/scripts/codegen.setup.ts +++ b/scripts/codegen.setup.ts @@ -4,13 +4,13 @@ import { commonConfig, runNocoBase } from './utils'; const runCodegenSync = () => { try { execSync( - `npx playwright codegen --load-storage=playwright/.auth/codegen.auth.json http://localhost:${process.env.APP_PORT} --save-storage=playwright/.auth/codegen.auth.json`, + `npx playwright codegen --load-storage=playwright/.auth/codegen.auth.json ${process.env.APP_BASE_URL} --save-storage=playwright/.auth/codegen.auth.json`, commonConfig, ); } catch (err) { if (err.message.includes('auth.json')) { execSync( - `npx playwright codegen http://localhost:${process.env.APP_PORT} --save-storage=playwright/.auth/codegen.auth.json`, + `npx playwright codegen ${process.env.APP_BASE_URL} --save-storage=playwright/.auth/codegen.auth.json`, commonConfig, ); } else {