From c78129ba2e918751d731f5c28be702254ac8a88c Mon Sep 17 00:00:00 2001 From: MariadeAnton Date: Wed, 23 Apr 2025 14:16:18 +0200 Subject: [PATCH 1/6] add group usage instructions --- .../docs/playwright-checks/add-to-group.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 site/content/docs/playwright-checks/add-to-group.md diff --git a/site/content/docs/playwright-checks/add-to-group.md b/site/content/docs/playwright-checks/add-to-group.md new file mode 100644 index 000000000..0b40725ca --- /dev/null +++ b/site/content/docs/playwright-checks/add-to-group.md @@ -0,0 +1,78 @@ +--- +title: Adding Playwright Check suites to groups +displayTitle: Adding a Playwright check suite to a group +navTitle: Add to a group +weight: 20 +slug: /groups-usage +menu: + resources: + parent: "Playwright check suites (Alpha)" + weight: 20 + +--- + +{{< markdownpartial "/_shared/playwright-native-alpha.md" >}} + +You can define a new group, or associate a Playwright Check Suite to an existing group. + +## Steps + +### 1. Create a group for your checks + +To define a new group, create a group file, for example `website-group.check.ts`. + +```typescript {title="website-group.check.ts"} + +import { CheckGroup } from 'checkly/constructs' + +export const myGroup = new CheckGroup('production-group', { + name: 'production-group', + activated: true, + muted: false, + locations: ['us-east-1', 'eu-west-1'], + tags: ['mac', 'group'], + environmentVariables: [], + apiCheckDefaults: {}, + concurrency: 100, + runParallel: true, + retryStrategy: RetryStrategyBuilder.linearStrategy({ baseBackoffSeconds: 30, maxRetries: 2, sameRegion: false }), +}) +``` + +## 2. Associate the group to the check + +When specifying your Playwright Check Suite, you can reference the new or existing group, using its name: + + ```typescript {title="checkly.config.ts"} + import { defineConfig } from 'checkly' + + const config = defineConfig({ + logicalId: 'checkly-website', + projectName: 'checkly-website', + checks: { + playwrightConfigPath: './playwright.config.ts', + playwrightChecks: [ + { + name: 'checkly-website', + frequency: 10, + locations: ['us-east-1',], + groupName: 'production-group', // use the name of the group you created + }, + ], + }, + cli: { + runLocation: 'us-east-1', + }, + }) + + export default config + ``` + +## 3. Deploy to apply the changes + +```bash {title="Terminal"} + npx checkly deploy --preview #confirm what will be deployed + npx checkly deploy # deploy +``` + +You can now see your Playwright check suite in your group. From de791b7b11d0d163428c0541c95e2b64e8acf573 Mon Sep 17 00:00:00 2001 From: MariadeAnton Date: Wed, 23 Apr 2025 14:28:33 +0200 Subject: [PATCH 2/6] just regular weight :pray: --- site/content/docs/playwright-checks/add-to-group.md | 1 - 1 file changed, 1 deletion(-) diff --git a/site/content/docs/playwright-checks/add-to-group.md b/site/content/docs/playwright-checks/add-to-group.md index 0b40725ca..1dfb509b2 100644 --- a/site/content/docs/playwright-checks/add-to-group.md +++ b/site/content/docs/playwright-checks/add-to-group.md @@ -7,7 +7,6 @@ slug: /groups-usage menu: resources: parent: "Playwright check suites (Alpha)" - weight: 20 --- From 45b096a50d7c81e49f8dcd1628fc268ed4a13316 Mon Sep 17 00:00:00 2001 From: MariadeAnton Date: Wed, 23 Apr 2025 15:38:32 +0200 Subject: [PATCH 3/6] correct parent, and weight in menu :fingers_crossed: --- site/content/docs/playwright-checks/add-to-group.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/docs/playwright-checks/add-to-group.md b/site/content/docs/playwright-checks/add-to-group.md index 1dfb509b2..757a2f43c 100644 --- a/site/content/docs/playwright-checks/add-to-group.md +++ b/site/content/docs/playwright-checks/add-to-group.md @@ -1,13 +1,13 @@ --- -title: Adding Playwright Check suites to groups -displayTitle: Adding a Playwright check suite to a group +title: Adding Playwright Check Suites to groups +displayTitle: Adding a Playwright check Suite to a group navTitle: Add to a group weight: 20 slug: /groups-usage menu: resources: - parent: "Playwright check suites (Alpha)" - + parent: "Playwright Check Suites (Alpha)" + weight: 20 --- {{< markdownpartial "/_shared/playwright-native-alpha.md" >}} From 4adb8b04e21cbc1df0cd3c5525a2817635ba383e Mon Sep 17 00:00:00 2001 From: MariadeAnton Date: Fri, 25 Apr 2025 12:45:05 +0200 Subject: [PATCH 4/6] make group id and name differentiable update casing in Playwright Check Suites for consistency --- site/content/docs/playwright-checks/add-to-group.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/site/content/docs/playwright-checks/add-to-group.md b/site/content/docs/playwright-checks/add-to-group.md index 757a2f43c..d6f2b88cc 100644 --- a/site/content/docs/playwright-checks/add-to-group.md +++ b/site/content/docs/playwright-checks/add-to-group.md @@ -1,6 +1,6 @@ --- title: Adding Playwright Check Suites to groups -displayTitle: Adding a Playwright check Suite to a group +displayTitle: Adding a Playwright Check Suite to a group navTitle: Add to a group weight: 20 slug: /groups-usage @@ -25,7 +25,7 @@ To define a new group, create a group file, for example `website-group.check.ts` import { CheckGroup } from 'checkly/constructs' export const myGroup = new CheckGroup('production-group', { - name: 'production-group', + name: 'Production group', activated: true, muted: false, locations: ['us-east-1', 'eu-west-1'], @@ -38,6 +38,8 @@ export const myGroup = new CheckGroup('production-group', { }) ``` +Learn more about [using groups](https://www.checklyhq.com/docs/cli/constructs-reference/#checkgroup) to unify checks in Checkly. + ## 2. Associate the group to the check When specifying your Playwright Check Suite, you can reference the new or existing group, using its name: @@ -74,4 +76,4 @@ When specifying your Playwright Check Suite, you can reference the new or existi npx checkly deploy # deploy ``` -You can now see your Playwright check suite in your group. +You can now see your Playwright Check Suite in your group. From c1bde7bd9f7943ae8d7470912b6c2cd6d512bf4f Mon Sep 17 00:00:00 2001 From: MariadeAnton Date: Fri, 25 Apr 2025 15:50:20 +0200 Subject: [PATCH 5/6] update to recommend Jiti with full ESM support and frequent updates --- site/content/docs/playwright-checks/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/playwright-checks/_index.md b/site/content/docs/playwright-checks/_index.md index 4f0eea893..14a465ab2 100644 --- a/site/content/docs/playwright-checks/_index.md +++ b/site/content/docs/playwright-checks/_index.md @@ -61,7 +61,7 @@ The alpha version gets updated daily with new improvements. You can follow updat If you're using TypeScript, install the dev dependencies [`ts-node`](https://www.npmjs.com/package/ts-node) and [`typescript`](https://www.npmjs.com/package/typescript). ```bash {title="Terminal"} - npm i --save-dev ts-node typescript + npm i --save-dev jiti typescript ``` ### 3. Test and create a monitor with all your tests From 2331b46628056e355603e266342002efbbbaecbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20de=20Ant=C3=B3n?= Date: Fri, 25 Apr 2025 16:41:25 +0200 Subject: [PATCH 6/6] names should be the same, of course Co-authored-by: ferrandiaz --- site/content/docs/playwright-checks/add-to-group.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/playwright-checks/add-to-group.md b/site/content/docs/playwright-checks/add-to-group.md index d6f2b88cc..a1611654f 100644 --- a/site/content/docs/playwright-checks/add-to-group.md +++ b/site/content/docs/playwright-checks/add-to-group.md @@ -57,7 +57,7 @@ When specifying your Playwright Check Suite, you can reference the new or existi name: 'checkly-website', frequency: 10, locations: ['us-east-1',], - groupName: 'production-group', // use the name of the group you created + groupName: 'Production group', // use the name of the group you created }, ], },