👽 Configures frontend tests suit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test('has title', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.route('**/api/features', (route) =>
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
body: JSON.stringify({})
|
||||
})
|
||||
);
|
||||
|
||||
await expect(page).toHaveTitle(/Spot micro controller/);
|
||||
});
|
||||
|
||||
test('index page has expected h1', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.route('**/api/features', (route) =>
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
body: JSON.stringify({})
|
||||
})
|
||||
);
|
||||
await expect(page.getByRole('heading', { name: 'Spot micro controller' }).first()).toBeVisible();
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test('index page has expected h1', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import { throttler } from '../../src/lib/utilities/buffer-utilities';
|
||||
|
||||
describe('throttler', () => {
|
||||
let throttleInstance: throttler;
|
||||
let callback;
|
||||
let callback: Function;
|
||||
|
||||
beforeEach(() => {
|
||||
vitest.useFakeTimers();
|
||||
Reference in New Issue
Block a user