Harden AI handoff smoke selectors
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-06-24 21:46:03 +02:00
parent aab51edee4
commit d67b85e4b5
2 changed files with 24 additions and 5 deletions
+6 -4
View File
@@ -88,6 +88,7 @@ async function selectDataset(page, datasetId) {
const datasetButton = page.locator(`[data-testid="dataset-select-${datasetId}"]`)
await datasetButton.waitFor({ state: 'visible', timeout: 15000 })
await datasetButton.click()
await page.locator('[data-testid="workbench-inspector-panel"]').getByText('Dataset', { exact: true }).click()
}
async function assertNoRuntimeErrors(page, consoleErrors) {
@@ -112,9 +113,10 @@ page.on('pageerror', (error) => {
try {
await page.goto(baseUrl, { waitUntil: 'networkidle' })
await page.getByRole('button', { name: /Load demo workflow/i }).waitFor({ state: 'visible', timeout: 20000 })
await page.getByRole('button', { name: /Load demo workflow/i }).click()
await page.locator(`[data-testid="dataset-select-${rasterDatasetId}"]`).waitFor({ state: 'visible', timeout: 30000 })
const demoLoadButton = page.getByRole('button', { name: /Load demo workflow/i })
if (await demoLoadButton.isVisible({ timeout: 5000 }).catch(() => false)) {
await demoLoadButton.click()
}
await selectDataset(page, rasterDatasetId)
const detectionHandoff = page.getByRole('button', { name: 'Use in Detection Lab' })
@@ -124,7 +126,7 @@ try {
await page.locator('[data-testid="workspace-nav-ai"]').waitFor({ state: 'visible', timeout: 10000 })
const detectionPanel = page.locator('.detection-lab-shell')
await detectionPanel.waitFor({ state: 'visible', timeout: 10000 })
await detectionPanel.getByLabel('Model').selectOption('yolo-configured')
await detectionPanel.locator('select').nth(1).selectOption('yolo-configured')
const detectionDatasetValue = await detectionPanel.getByLabel('Raster dataset').inputValue()
assert(detectionDatasetValue === rasterDatasetId, `detection dataset handoff mismatch: ${detectionDatasetValue}`)
const detectionManifestValue = await detectionPanel.getByPlaceholder('Raster tile manifest path').inputValue()