|
|
@@ -311,7 +311,7 @@ describe('Hero chrome', () => {
|
|
|
it('renders the English preview badge through the hero locale seat', () => {
|
|
|
const renderSlot = vi.fn<HeroShellProps['renderSlot']>(() => null)
|
|
|
const view = render(<HeroShell t={makeTranslate(en, commonEn)} renderSlot={renderSlot} />)
|
|
|
- expect(view.getByText('Into the Unknown')).toBeTruthy()
|
|
|
+ expect(view.getByTestId('hero-headline').textContent).toBe('Into the Unknown')
|
|
|
expect(view.getByText('Preview')).toBeTruthy()
|
|
|
expect(renderSlot).toHaveBeenCalledOnce()
|
|
|
expect(renderSlot.mock.calls[0]?.[0]).toBe('conversation.hero.brand.mark')
|
|
|
@@ -439,7 +439,7 @@ describe('ConversationRoot resident composer', () => {
|
|
|
const header = b.view.container.querySelector('header')
|
|
|
expect(host).not.toBeNull()
|
|
|
expect(header?.getAttribute('aria-hidden')).toBe('true')
|
|
|
- expect(b.view.getByText('探索未至之境')).toBeTruthy()
|
|
|
+ expect(b.view.getByTestId('hero-headline').textContent).toBe('探索未至之境')
|
|
|
expect(b.view.getByText('预览版')).toBeTruthy()
|
|
|
expect(b.view.queryByTestId('view-chat')).toBeNull()
|
|
|
// The same machine-backed textarea is live in the hero, and the
|
|
|
@@ -480,7 +480,7 @@ describe('ConversationRoot resident composer', () => {
|
|
|
const b = mount(sessionSnapshotOf({ blank: true, openState: 'loading' }))
|
|
|
const root = b.view.container.querySelector('[data-phase]')
|
|
|
expect(root?.getAttribute('data-phase')).toBe('settling')
|
|
|
- expect(b.view.queryByText('探索未至之境')).toBeNull()
|
|
|
+ expect(b.view.queryByTestId('hero-headline')).toBeNull()
|
|
|
})
|
|
|
|
|
|
it('settling phase: a session the list has no row for settles conservatively', () => {
|
|
|
@@ -505,7 +505,7 @@ describe('ConversationRoot resident composer', () => {
|
|
|
// blank the column for the history round-trip.
|
|
|
const root = b.view.container.querySelector('[data-phase]')
|
|
|
expect(root?.getAttribute('data-phase')).toBe('hero')
|
|
|
- expect(b.view.getByText('探索未至之境')).toBeTruthy()
|
|
|
+ expect(b.view.getByTestId('hero-headline').textContent).toBe('探索未至之境')
|
|
|
expect(b.view.getByRole('textbox')).toBeTruthy()
|
|
|
})
|
|
|
|
|
|
@@ -523,7 +523,7 @@ describe('ConversationRoot resident composer', () => {
|
|
|
expect(b.wiring.snapshot.draft).toBe('kept across flip')
|
|
|
expect(b.store.store.getSnapshot().draft).toBe('kept across flip')
|
|
|
expect(b.view.container.querySelector('[data-conversation-scroll]')?.contains(after)).toBe(true)
|
|
|
- expect(b.view.queryByText('探索未至之境')).toBeNull()
|
|
|
+ expect(b.view.queryByTestId('hero-headline')).toBeNull()
|
|
|
expect(b.view.getByTestId('view-chat')).toBeTruthy()
|
|
|
})
|
|
|
|