Add Playwright e2e coverage and Node 20 pin
This commit is contained in:
28
frontend/e2e/library.spec.ts
Normal file
28
frontend/e2e/library.spec.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import {
|
||||
createAuthenticatedApiContext,
|
||||
createTroubleshootingTree,
|
||||
disposeApiContext,
|
||||
} from './helpers/api'
|
||||
|
||||
test.describe('flow library smoke tests', () => {
|
||||
test('can search for an API-created troubleshooting flow', async ({ page }) => {
|
||||
const api = await createAuthenticatedApiContext()
|
||||
const tree = await createTroubleshootingTree(api)
|
||||
|
||||
try {
|
||||
await page.goto('/trees')
|
||||
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Flow Library' }),
|
||||
).toBeVisible()
|
||||
|
||||
await page.getByPlaceholder('Search flows...').fill(tree.name)
|
||||
await page.getByRole('button', { name: 'Search', exact: true }).click()
|
||||
|
||||
await expect(page.getByText(tree.name)).toBeVisible()
|
||||
} finally {
|
||||
await disposeApiContext(api)
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user