|
|
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() |
|
|
|
|
|
|
|
|
await homePage.selectCase('sub-stroke0001') |
|
|
await expect(homePage.runButton).toBeEnabled() |
|
|
|
|
|
|
|
|
await homePage.runSegmentation() |
|
|
|
|
|
|
|
|
await expect(homePage.processingText).toBeVisible() |
|
|
|
|
|
|
|
|
await homePage.waitForResults() |
|
|
|
|
|
|
|
|
await expect(homePage.diceScore).toBeVisible() |
|
|
await homePage.expectViewerVisible() |
|
|
|
|
|
|
|
|
await expect(homePage.placeholderText).not.toBeVisible() |
|
|
}) |
|
|
|
|
|
test('can run multiple segmentations', async ({ page }) => { |
|
|
const homePage = new HomePage(page) |
|
|
await homePage.goto() |
|
|
await homePage.waitForCasesToLoad() |
|
|
|
|
|
|
|
|
await homePage.selectCase('sub-stroke0001') |
|
|
await homePage.runSegmentation() |
|
|
await homePage.waitForResults() |
|
|
|
|
|
|
|
|
await homePage.selectCase('sub-stroke0002') |
|
|
await homePage.runSegmentation() |
|
|
await homePage.waitForResults() |
|
|
|
|
|
|
|
|
await expect(homePage.metricsPanel).toBeVisible() |
|
|
}) |
|
|
}) |
|
|
|