From 4b3d75c5f5dd20d90a70bc2dfd78d0965a26a207 Mon Sep 17 00:00:00 2001 From: Niek van Staveren Date: Thu, 1 Jun 2023 11:45:13 +0200 Subject: [PATCH] test: do not open browser in integrationt tests (#1276) * test: do not open browser in integrationt tests * docs: add in serve documentation --- commands/create/templates/sn/common/playwright.config.js | 2 +- commands/serve/README.md | 1 + commands/serve/lib/init-config.js | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/create/templates/sn/common/playwright.config.js b/commands/create/templates/sn/common/playwright.config.js index c19101ee3..b8133dbce 100644 --- a/commands/create/templates/sn/common/playwright.config.js +++ b/commands/create/templates/sn/common/playwright.config.js @@ -17,7 +17,7 @@ export default { ], webServer: { - command: 'yarn start --port 8077', + command: 'yarn start --port 8077 --open false', reuseExistingServer: !process.env.CI, port: '8077', }, diff --git a/commands/serve/README.md b/commands/serve/README.md index a8cb2a43f..460e82bf3 100644 --- a/commands/serve/README.md +++ b/commands/serve/README.md @@ -47,6 +47,7 @@ Options: --mfe Serves bundle to use in micro frontend [boolean] [default: false] -h, --help Show help [boolean] + --open Open up in browser [boolean] [default: true] ``` #### Example diff --git a/commands/serve/lib/init-config.js b/commands/serve/lib/init-config.js index 3831fa5cb..945fdf0cd 100644 --- a/commands/serve/lib/init-config.js +++ b/commands/serve/lib/init-config.js @@ -84,6 +84,11 @@ const options = { description: 'Serves bundle to use in micro frontend', default: false, }, + open: { + type: 'boolean', + description: 'Opens browser on serving nebula', + default: true, + }, }; module.exports = (yargs) =>