diff --git a/examples/advanced-project-js/checkly.config.js b/examples/advanced-project-js/checkly.config.js index 27d21fcc6..1a428c806 100644 --- a/examples/advanced-project-js/checkly.config.js +++ b/examples/advanced-project-js/checkly.config.js @@ -51,7 +51,6 @@ const config = defineConfig({ //Use `testCommand: npx playwright test` to filter the tests you want to run } ], - ], }, cli: { /* The default datacenter location to use when running npx checkly test */ diff --git a/examples/advanced-project-js/src/playwright/homepage.spec.js b/examples/advanced-project-js/src/tests/homepage.spec.js similarity index 100% rename from examples/advanced-project-js/src/playwright/homepage.spec.js rename to examples/advanced-project-js/src/tests/homepage.spec.js diff --git a/examples/advanced-project-js/src/playwright/login.spec.js b/examples/advanced-project-js/src/tests/login.spec.js similarity index 100% rename from examples/advanced-project-js/src/playwright/login.spec.js rename to examples/advanced-project-js/src/tests/login.spec.js diff --git a/examples/advanced-project/checkly.config.ts b/examples/advanced-project/checkly.config.ts index ee1852001..2d37f729a 100644 --- a/examples/advanced-project/checkly.config.ts +++ b/examples/advanced-project/checkly.config.ts @@ -35,9 +35,9 @@ const config = defineConfig({ playwrightConfig: { timeout: 30000, use: { - baseURL: 'https://www.danube-web.shop', + baseURL: "https://www.checklyhq.com", viewport: { width: 1280, height: 720 }, - } + }, }, browserChecks: { /* A glob pattern matches any Playwright .spec.ts files and automagically creates a Browser Check. This way, you diff --git a/examples/advanced-project/playwright.config.ts b/examples/advanced-project/playwright.config.ts index 4d9f162d0..b4f1804a8 100644 --- a/examples/advanced-project/playwright.config.ts +++ b/examples/advanced-project/playwright.config.ts @@ -20,7 +20,6 @@ export default defineConfig({ baseURL: "https://www.checklyhq.com", viewport: { width: 1280, height: 720 }, trace: "on", - }, projects: [ { diff --git a/examples/boilerplate-project-js/checkly.config.js b/examples/boilerplate-project-js/checkly.config.js index 33e47506a..000558d61 100644 --- a/examples/boilerplate-project-js/checkly.config.js +++ b/examples/boilerplate-project-js/checkly.config.js @@ -27,7 +27,12 @@ const config = defineConfig({ /* A glob pattern that matches the Checks inside your repo, see https://www.checklyhq.com/docs/cli/using-check-test-match/ */ checkMatch: '**/__checks__/**/*.check.js', /* Global configuration option for Playwright-powered checks. See https://www.checklyhq.com/docs/browser-checks/playwright-test/#global-configuration */ - playwrightConfig: {}, + playwrightConfig: { + use: { + baseURL: "https://www.checklyhq.com", + viewport: { width: 1280, height: 720 }, + }, + }, browserChecks: { /* A glob pattern matches any Playwright .spec.js files and automagically creates a Browser Check. This way, you * can just write native Playwright code. See https://www.checklyhq.com/docs/cli/using-check-test-match/ diff --git a/examples/boilerplate-project/checkly.config.ts b/examples/boilerplate-project/checkly.config.ts index 1f23cde55..d6d1687ed 100644 --- a/examples/boilerplate-project/checkly.config.ts +++ b/examples/boilerplate-project/checkly.config.ts @@ -27,7 +27,12 @@ const config = defineConfig({ /* A glob pattern that matches the Checks inside your repo, see https://www.checklyhq.com/docs/cli/using-check-test-match/ */ checkMatch: '**/__checks__/**/*.check.ts', /* Global configuration option for Playwright-powered checks. See https://www.checklyhq.com/docs/browser-checks/playwright-test/#global-configuration */ - playwrightConfig: {}, + playwrightConfig: { + use: { + baseURL: "https://www.checklyhq.com", + viewport: { width: 1280, height: 720 }, + }, + }, browserChecks: { /* A glob pattern matches any Playwright .spec.ts files and automagically creates a Browser Check. This way, you * can just write native Playwright code. See https://www.checklyhq.com/docs/cli/using-check-test-match/ diff --git a/packages/create-cli/src/commands/bootstrap.ts b/packages/create-cli/src/commands/bootstrap.ts index ca0bb0576..be09cfca4 100644 --- a/packages/create-cli/src/commands/bootstrap.ts +++ b/packages/create-cli/src/commands/bootstrap.ts @@ -103,8 +103,9 @@ export default class Bootstrap extends Command { } const projectDirectory = await getProjectDirectory({ onCancel }) + const existingProject = hasPackageJsonFile(projectDirectory) - if (hasPackageJsonFile(projectDirectory)) { + if (existingProject) { // Init Checkly CLI for an existing project await installWithinProject({ projectDirectory, version, onCancel }) } else { @@ -115,7 +116,8 @@ export default class Bootstrap extends Command { await installDependenciesAndInitGit({ projectDirectory }) const playwrightConfig = getPlaywrightConfig(projectDirectory) - if (playwrightConfig) { + // Only prompt playwright copy when not using exampels + if (playwrightConfig && existingProject) { await copyPlaywrightConfig({ projectDirectory, playwrightConfig }) }