Skip to content

Commit 74b6aee

Browse files
stricter testing
1 parent 24e22d6 commit 74b6aee

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

__checks__/canEditDocs.check.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//canEditDocs.check.ts
2+
import { AlertChannel, AlertEscalationBuilder, BrowserCheck, RetryStrategyBuilder } from 'checkly/constructs'
3+
4+
new BrowserCheck('can-edit-documentation-v3', {
5+
name: 'Can Edit Documentation v3',
6+
code: {
7+
entrypoint: './canEditDocs.spec.ts',
8+
},
9+
activated: true,
10+
muted: false,
11+
shouldFail: false,
12+
locations: [
13+
'us-east-1',
14+
'us-west-1',
15+
],
16+
frequency: 5,
17+
alertEscalationPolicy: AlertEscalationBuilder.runBasedEscalation(1, {
18+
amount: 0,
19+
interval: 5,
20+
}, {
21+
enabled: false,
22+
percentage: 10,
23+
}),
24+
retryStrategy: RetryStrategyBuilder.linearStrategy({
25+
baseBackoffSeconds: 60,
26+
maxRetries: 2,
27+
maxDurationSeconds: 600,
28+
sameRegion: true,
29+
}),
30+
runParallel: true,
31+
})

__checks__/canEditDocs.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//canEditDocs.spec.ts
2+
const { expect, test } = require('@playwright/test')
3+
4+
test('nav to docs, then click edit link in docs', async ({ page }) => {
5+
await page.goto('https://www.checklyhq.com/');
6+
await page.getByRole('button', { name: 'Resources' }).first().click();
7+
await page.getByRole('link', { name: 'Documentation', exact: true }).click();
8+
await expect(page.getByRole('article')).toContainText('this page on Github');
9+
})

0 commit comments

Comments
 (0)