mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 08:03:20 +00:00
test(ai-vault-search): follow the read-only status segment in the e2e spec
The segment no longer opens a popover with controls; it names the resting phase and opens the settings pane. The spec now clicks through to the pane's own Resume button. Also merges a duplicate import that failed the focused code-quality plugins.
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
import { createElement, StrictMode, type ReactNode } from 'react'
|
||||
import { act, cleanup, renderHook } from '@testing-library/react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { createSearchCoverageStore } from './ai-vault-search-coverage-store'
|
||||
import {
|
||||
AI_VAULT_SEARCH_COVERAGE_RETRY_MAX_MS,
|
||||
createSearchCoverageStore
|
||||
} from './ai-vault-search-coverage-store'
|
||||
import type {
|
||||
AiVaultSearchCoverage,
|
||||
AiVaultSearchIndexingProgress
|
||||
} from '../../../../shared/ai-vault-search-types'
|
||||
import { AI_VAULT_SEARCH_COVERAGE_RETRY_MAX_MS } from './ai-vault-search-coverage-store'
|
||||
import {
|
||||
AI_VAULT_SEARCH_COVERAGE_POLL_MS,
|
||||
useAiVaultSearchCoveragePoll
|
||||
|
||||
@@ -62,7 +62,9 @@ test('consent, Unicode search, scope exclusion, and clear stay inside an isolate
|
||||
await expect(indexing.getByText('Up to date', { exact: true })).toBeVisible()
|
||||
await indexing.getByRole('button', { name: 'Pause', exact: true }).click()
|
||||
await expect(indexing.getByText('Indexing paused', { exact: true })).toBeVisible()
|
||||
await expect(orcaPage.getByRole('button', { name: 'Indexing paused', exact: true })).toBeVisible()
|
||||
// The status-bar segment is read-only; it names the resting phase and opens the settings pane.
|
||||
const segment = orcaPage.getByRole('button', { name: /^Indexing paused/ })
|
||||
await expect(segment).toBeVisible()
|
||||
appendFileSync(
|
||||
path.join(transcripts, `${id}.jsonl`),
|
||||
`${JSON.stringify({
|
||||
@@ -80,18 +82,12 @@ test('consent, Unicode search, scope exclusion, and clear stay inside an isolate
|
||||
}))
|
||||
expect(pausedSearch).toEqual({ saved: 1, appended: 0 })
|
||||
await orcaPage.screenshot({ path: testInfo.outputPath('session-search-indexing-paused.png') })
|
||||
await orcaPage.getByRole('button', { name: 'Indexing paused', exact: true }).click()
|
||||
const popover = orcaPage.locator('[data-slot="popover-content"]')
|
||||
await expect(popover.getByText('Indexing paused', { exact: true })).toBeVisible()
|
||||
await orcaPage.screenshot({
|
||||
path: testInfo.outputPath('session-search-indexing-popover.png'),
|
||||
animations: 'disabled'
|
||||
})
|
||||
await popover.getByRole('button', { name: 'Resume', exact: true }).click()
|
||||
await segment.click()
|
||||
await expect(orcaPage.getByPlaceholder('Search settings')).toHaveValue('Agent Session History')
|
||||
await expect(indexing.getByText('Indexing paused', { exact: true })).toBeVisible()
|
||||
await indexing.getByRole('button', { name: 'Resume', exact: true }).click()
|
||||
await expect(indexing.getByText('Up to date', { exact: true })).toBeVisible()
|
||||
await expect(orcaPage.getByRole('button', { name: 'Indexing paused', exact: true })).toHaveCount(
|
||||
0
|
||||
)
|
||||
await expect(orcaPage.getByRole('button', { name: /^Indexing paused/ })).toHaveCount(0)
|
||||
await expect
|
||||
.poll(
|
||||
async () =>
|
||||
|
||||
Reference in New Issue
Block a user