✅ Simplifies frontend test
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
LineBasicMaterial,
|
LineBasicMaterial,
|
||||||
Mesh,
|
Mesh,
|
||||||
MeshBasicMaterial,
|
MeshBasicMaterial,
|
||||||
Object3D,
|
type Object3D,
|
||||||
SphereGeometry,
|
SphereGeometry,
|
||||||
Vector3,
|
Vector3,
|
||||||
type NormalBufferAttributes,
|
type NormalBufferAttributes,
|
||||||
|
|||||||
@@ -1,24 +1,11 @@
|
|||||||
import { expect, test } from '@playwright/test';
|
import { expect, test } from '@playwright/test'
|
||||||
|
|
||||||
test('has title', async ({ page }) => {
|
test('has title', async ({ page }) => {
|
||||||
await page.goto('/');
|
await page.goto('/')
|
||||||
await page.route('**/api/features', (route) =>
|
await expect(page).toHaveTitle(/Spot micro controller/)
|
||||||
route.fulfill({
|
|
||||||
status: 200,
|
|
||||||
body: JSON.stringify({})
|
|
||||||
})
|
})
|
||||||
);
|
|
||||||
|
|
||||||
await expect(page).toHaveTitle(/Spot micro controller/);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('index page has expected h1', async ({ page }) => {
|
test('index page has expected h1', async ({ page }) => {
|
||||||
await page.goto('/');
|
await page.goto('/')
|
||||||
await page.route('**/api/features', (route) =>
|
await expect(page.getByRole('heading', { name: 'Spot micro controller' }).first()).toBeVisible()
|
||||||
route.fulfill({
|
|
||||||
status: 200,
|
|
||||||
body: JSON.stringify({})
|
|
||||||
})
|
})
|
||||||
);
|
|
||||||
await expect(page.getByRole('heading', { name: 'Spot micro controller' }).first()).toBeVisible();
|
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user