Files
resolutionflow/frontend/e2e/library.spec.ts
2026-03-16 02:29:22 -04:00

29 lines
826 B
TypeScript

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)
}
})
})