Skip to content

Commit eff4f1d

Browse files
committed
add config
1 parent 4336501 commit eff4f1d

File tree

7 files changed

+10570
-4458
lines changed

7 files changed

+10570
-4458
lines changed

__checks__/api.check.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { ApiCheck, AssertionBuilder } from 'checkly/constructs'
22

3+
34
new ApiCheck('get-books-api-check', {
45
name: 'GET /books',
5-
alertChannels: [],
66
degradedResponseTime: 10000,
77
maxResponseTime: 20000,
88
request: {
9-
url: 'https://danube-web.shop/api/books',
9+
url: 'https://danube-store-srebot-test-3a4a0227b89f.herokuapp.com/api/books',
1010
method: 'GET',
1111
headers: [
1212
{
@@ -21,3 +21,4 @@ new ApiCheck('get-books-api-check', {
2121
],
2222
}
2323
})
24+

__checks__/key-user-flows/checkout.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { registeredUser } from './data/users';
77

88
test('checkout', async ({ page }) => {
99

10-
await page.goto('https://danube-web.shop');
10+
await page.goto('https://danube-store-srebot-test-3a4a0227b89f.herokuapp.com');
1111

1212
const shopPage = new DanubeShopPage(page);
1313
const itemDetailsPage = new DanubeItemDetailsPage(page);

__checks__/key-user-flows/login.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DanubeItemDetailsPage } from './pages/itemDetails';
44
import { registeredUser } from './data/users';
55

66
test('login', async ({ page }) => {
7-
await page.goto('https://danube-web.shop');
7+
await page.goto('https://danube-store-srebot-test-3a4a0227b89f.herokuapp.com');
88

99
const shopPage = new DanubeShopPage(page);
1010

__checks__/key-user-flows/search.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DanubeItemDetailsPage } from './pages/itemDetails';
44

55
test('search', async ({page}) => {
66

7-
await page.goto('https://danube-web.shop');
7+
await page.goto('https://danube-store-srebot-test-3a4a0227b89f.herokuapp.com');
88

99
const shopPage = new DanubeShopPage(page);
1010
const itemDetailsPage = new DanubeItemDetailsPage(page);

checkly.config.ts

+34-1
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,50 @@
11
import { defineConfig } from 'checkly'
22
import { Frequency } from 'checkly/constructs'
3+
import { WebhookAlertChannel } from 'checkly/constructs'
4+
5+
export const webhookChannel = new WebhookAlertChannel('webhook-239286', {
6+
name: 'srebot-prod-webhook',
7+
method: 'POST',
8+
url: new URL('https://srebot-zys7.onrender.com/checkly-webhook'),
9+
sendRecovery: false,
10+
sendFailure: false,
11+
sendDegraded: false,
12+
sslExpiry: false,
13+
template: `{
14+
"CHECK_NAME": "{{ CHECK_NAME }}",
15+
"CHECK_ID": "{{ CHECK_ID }}",
16+
"CHECK_TYPE": "{{ CHECK_TYPE }}",
17+
"GROUP_NAME": "{{ GROUP_NAME }}",
18+
"ALERT_TITLE": "{{ ALERT_TITLE }}",
19+
"ALERT_TYPE": "{{ ALERT_TYPE }}",
20+
"CHECK_RESULT_ID": "{{ CHECK_RESULT_ID }}",
21+
"RESPONSE_TIME": "{{ RESPONSE_TIME }}",
22+
"API_CHECK_RESPONSE_STATUS_CODE": "{{ API_CHECK_RESPONSE_STATUS_CODE }}",
23+
"API_CHECK_RESPONSE_STATUS_TEXT": "{{ API_CHECK_RESPONSE_STATUS_TEXT }}",
24+
"RUN_LOCATION": "{{ RUN_LOCATION }}",
25+
"RESULT_LINK": "{{ RESULT_LINK }}",
26+
"SSL_DAYS_REMAINING": "{{ SSL_DAYS_REMAINING }}",
27+
"SSL_CHECK_DOMAIN": "{{ SSL_CHECK_DOMAIN }}",
28+
"STARTED_AT": "{{ STARTED_AT }}",
29+
"TAGS": "{{ TAGS }}",
30+
"$RANDOM_NUMBER": "{{ $RANDOM_NUMBER }}",
31+
"$UUID": "{{ $UUID }}",
32+
"moment": "{{ moment }}"
33+
}`,
34+
})
335

436
export default defineConfig({
537
projectName: 'Website Monitoring',
638
logicalId: 'website-monitoring-1',
739
repoUrl: 'https://github.com/acme/website',
840
checks: {
41+
alertChannels: [webhookChannel],
942
activated: true,
1043
muted: false,
1144
runtimeId: '2022.10',
1245
frequency: Frequency.EVERY_5M,
1346
locations: ['us-east-1', 'eu-west-1'],
14-
tags: ['website', 'api'],
47+
tags: ['website', 'api', 'srebot'],
1548
checkMatch: '**/__checks__/**/*.check.ts',
1649
ignoreDirectoriesMatch: [],
1750
browserChecks: {

0 commit comments

Comments
 (0)