Add testing frameworks

This commit is contained in:
Djuri 2023-11-23 02:04:20 +01:00
parent fd492c416c
commit a9c12c2e9f
11 changed files with 1315 additions and 189 deletions

21
tests/test.ts Normal file
View file

@ -0,0 +1,21 @@
import { expect, test } from '@playwright/test';
test('index page has expected status', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Status' })).toBeVisible();
});
test('index page has expected settings', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Settings' })).toBeVisible();
});
test('index page has expected control', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Control' })).toBeVisible();
});
test('api page has expected load button', async ({ page }) => {
await page.goto('/api');
await expect(page.getByRole('button', { name: 'Load' })).toBeVisible();
});