20
__checks__/api.check.ts
Normal file
20
__checks__/api.check.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { ApiCheck, AssertionBuilder } from 'checkly/constructs';
|
||||||
|
|
||||||
|
const homepageApiCheck = new ApiCheck('homepage-api-check-1', {
|
||||||
|
name: 'Fetch Book List',
|
||||||
|
alertChannels: [],
|
||||||
|
degradedResponseTime: 10000,
|
||||||
|
maxResponseTime: 20000,
|
||||||
|
request: {
|
||||||
|
url: 'https://danube-web.shop/api/books',
|
||||||
|
method: 'GET',
|
||||||
|
followRedirects: true,
|
||||||
|
skipSSL: false,
|
||||||
|
assertions: [
|
||||||
|
AssertionBuilder.statusCode().equals(200),
|
||||||
|
AssertionBuilder.jsonBody('$[0].id').isNotNull(),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default homepageApiCheck;
|
||||||
11
__checks__/homepage.spec.ts
Normal file
11
__checks__/homepage.spec.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { test, expect, Page } from '@playwright/test';
|
||||||
|
|
||||||
|
// You can override the default Playwright test timeout of 30s
|
||||||
|
// test.setTimeout(60_000);
|
||||||
|
|
||||||
|
test('Checkly Homepage', async ({ page }: { page: Page }) => {
|
||||||
|
const response = await page.goto('https://danube-web.shop');
|
||||||
|
expect(response?.status()).toBeLessThan(400);
|
||||||
|
await expect(page).toHaveTitle(/Danube WebShop/);
|
||||||
|
await page.screenshot({ path: 'homepage.jpg' });
|
||||||
|
});
|
||||||
44
checkly.config.ts
Normal file
44
checkly.config.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import { defineConfig } from 'checkly'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See https://www.checklyhq.com/docs/cli/project-structure/
|
||||||
|
*/
|
||||||
|
const config = defineConfig({
|
||||||
|
/* A human friendly name for your project */
|
||||||
|
projectName: 'homarr',
|
||||||
|
/** A logical ID that needs to be unique across your Checkly account,
|
||||||
|
* See https://www.checklyhq.com/docs/cli/constructs/ to learn more about logical IDs.
|
||||||
|
*/
|
||||||
|
logicalId: 'homarr',
|
||||||
|
/* An optional URL to your Git repo */
|
||||||
|
repoUrl: 'https://github.com/checkly/checkly-cli',
|
||||||
|
/* Sets default values for Checks */
|
||||||
|
checks: {
|
||||||
|
/* A default for how often your Check should run in minutes */
|
||||||
|
frequency: 10,
|
||||||
|
/* Checkly data centers to run your Checks as monitors */
|
||||||
|
locations: ['us-east-1', 'eu-west-1'],
|
||||||
|
/* An optional array of tags to organize your Checks */
|
||||||
|
tags: ['mac'],
|
||||||
|
/** The Checkly Runtime identifier, determining npm packages and the Node.js version available at runtime.
|
||||||
|
* See https://www.checklyhq.com/docs/cli/npm-packages/
|
||||||
|
*/
|
||||||
|
runtimeId: '2023.02',
|
||||||
|
/* 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',
|
||||||
|
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/
|
||||||
|
* */
|
||||||
|
testMatch: '**/__checks__/**/*.spec.ts',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cli: {
|
||||||
|
/* The default datacenter location to use when running npx checkly test */
|
||||||
|
runLocation: 'eu-west-1',
|
||||||
|
/* An array of default reporters to use when a reporter is not specified with the "--reporter" flag */
|
||||||
|
reporters: ['list'],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export default config
|
||||||
1
next-env.d.ts
vendored
1
next-env.d.ts
vendored
@@ -1,5 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
/// <reference types="next/navigation-types/compat/navigation" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "^13.0.0",
|
"@next/bundle-analyzer": "^13.0.0",
|
||||||
"@next/eslint-plugin-next": "^13.0.0",
|
"@next/eslint-plugin-next": "^13.0.0",
|
||||||
|
"@playwright/test": "^1.33.0",
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"@types/dockerode": "^3.3.9",
|
"@types/dockerode": "^3.3.9",
|
||||||
@@ -89,6 +90,7 @@
|
|||||||
"@typescript-eslint/parser": "^5.30.7",
|
"@typescript-eslint/parser": "^5.30.7",
|
||||||
"@vitest/coverage-c8": "^0.29.3",
|
"@vitest/coverage-c8": "^0.29.3",
|
||||||
"@vitest/ui": "^0.29.3",
|
"@vitest/ui": "^0.29.3",
|
||||||
|
"checkly": "latest",
|
||||||
"eslint": "^8.20.0",
|
"eslint": "^8.20.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||||
@@ -104,8 +106,9 @@
|
|||||||
"node-mocks-http": "^1.12.2",
|
"node-mocks-http": "^1.12.2",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"sass": "^1.56.1",
|
"sass": "^1.56.1",
|
||||||
|
"ts-node": "latest",
|
||||||
"turbo": "latest",
|
"turbo": "latest",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "latest",
|
||||||
"video.js": "^8.0.3",
|
"video.js": "^8.0.3",
|
||||||
"vitest": "^0.29.3",
|
"vitest": "^0.29.3",
|
||||||
"vitest-fetch-mock": "^0.2.2"
|
"vitest-fetch-mock": "^0.2.2"
|
||||||
@@ -121,4 +124,4 @@
|
|||||||
"minimumChangeThreshold": 0,
|
"minimumChangeThreshold": 0,
|
||||||
"showDetails": true
|
"showDetails": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,4 +34,4 @@
|
|||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user