Simplifies frontend test

This commit is contained in:
Rune Harlyk
2025-07-16 21:58:39 +02:00
parent 7061166fcd
commit d899701195
2 changed files with 8 additions and 21 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
LineBasicMaterial,
Mesh,
MeshBasicMaterial,
Object3D,
type Object3D,
SphereGeometry,
Vector3,
type NormalBufferAttributes,
+7 -20
View File
@@ -1,24 +1,11 @@
import { expect, test } from '@playwright/test';
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/);
});
await page.goto('/')
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();
});
await page.goto('/')
await expect(page.getByRole('heading', { name: 'Spot micro controller' }).first()).toBeVisible()
})