Spaces:
Runtime error
Runtime error
File size: 1,428 Bytes
fbf73ff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
import { test, expect } from './fixtures'
import { HomePage } from './pages/HomePage'
test.describe('Segmentation Flow', () => {
test('complete segmentation workflow', async ({ page }) => {
const homePage = new HomePage(page)
await homePage.goto()
await homePage.waitForCasesToLoad()
// Select a case
await homePage.selectCase('sub-stroke0001')
await expect(homePage.runButton).toBeEnabled()
// Run segmentation
await homePage.runSegmentation()
// Verify processing state
await expect(homePage.processingText).toBeVisible()
// Wait for results
await homePage.waitForResults()
// Verify results displayed
await expect(homePage.diceScore).toBeVisible()
await homePage.expectViewerVisible()
// Placeholder should be gone
await expect(homePage.placeholderText).not.toBeVisible()
})
test('can run multiple segmentations', async ({ page }) => {
const homePage = new HomePage(page)
await homePage.goto()
await homePage.waitForCasesToLoad()
// First run
await homePage.selectCase('sub-stroke0001')
await homePage.runSegmentation()
await homePage.waitForResults()
// Second run with different case
await homePage.selectCase('sub-stroke0002')
await homePage.runSegmentation()
await homePage.waitForResults()
// Results should still be visible
await expect(homePage.metricsPanel).toBeVisible()
})
})
|