work on e2e testability of things

This commit is contained in:
Joel Wetzell
2026-05-18 18:24:16 -05:00
parent 26631d3bc2
commit 5e22cbfbdd
8 changed files with 48 additions and 3 deletions
+15 -3
View File
@@ -1,8 +1,20 @@
import { test } from '@playwright/test';
import { expect, test } from '@playwright/test';
test('add module', async ({ page }) => {
await page.goto('/');
await page.locator('app-module-list').getByText('add').click();
await page.getByRole('button', { name: 'Add Module' }).click();
await page.getByRole('menuitem', { name: 'HTTP Server' }).click();
// TODO(jwetzell): test that the module gets added
const module = page.locator('#modules\\.0');
await expect(module).toBeVisible();
await expect(module).toContainText('HTTP Server');
});
test('remove module', async ({ page }) => {
await page.goto('/');
await page.getByRole('button', { name: 'Add Module' }).click();
await page.getByRole('menuitem', { name: 'HTTP Server' }).click();
const module = page.locator('#modules\\.0');
await expect(module).toBeVisible();
await module.getByRole('button', { name: 'Delete Module' }).click();
await expect(module).not.toBeVisible();
});