mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
test(e2e): two chat specs follow the pan-and-zoom preview and the renamed New tab chat row (#30755)
Co-authored-by: E2E Test <e2e@test.local>
This commit is contained in:
@@ -97,8 +97,10 @@ test('Copy image puts the full-size image on the clipboard and keeps the preview
|
||||
|
||||
await thumbnail.click()
|
||||
const preview = orcaPage.getByRole('dialog')
|
||||
const fullSize = preview.getByRole('img', { name: imageName })
|
||||
await fullSize.click({ button: 'right' })
|
||||
await expect(preview.getByRole('img', { name: imageName })).toBeVisible()
|
||||
// Why: the image ignores the pointer so the pan-and-zoom canvas under it takes the click.
|
||||
const previewCanvas = preview.getByTestId('pan-zoom-image-canvas')
|
||||
await previewCanvas.click({ button: 'right' })
|
||||
await copyImage.click()
|
||||
await expect.poll(takeCopiedImageSize).toBe('800x600')
|
||||
// Why: the preview's dismissal fires on that click, so once the menu has fully left the page
|
||||
@@ -106,7 +108,7 @@ test('Copy image puts the full-size image on the clipboard and keeps the preview
|
||||
await expect(orcaPage.getByRole('menu')).toHaveCount(0)
|
||||
await expect(preview).toHaveAttribute('data-state', 'open')
|
||||
|
||||
await fullSize.click({ button: 'right' })
|
||||
await previewCanvas.click({ button: 'right' })
|
||||
await expect(copyImage).toBeVisible()
|
||||
await preview.getByRole('button', { name: 'Close' }).click()
|
||||
await expect(preview).toHaveCount(0)
|
||||
|
||||
@@ -99,7 +99,10 @@ test.describe('structured chat tabs', () => {
|
||||
|
||||
// A chat the window opens from the New tab menu.
|
||||
await page.getByRole('button', { name: 'New tab' }).click({ force: true })
|
||||
const claudeOption = page.getByRole('menuitem', { name: /^Claude(?:\s|$)/i }).first()
|
||||
const claudeOption = page.getByRole('menuitem', {
|
||||
name: 'Start a chat with Claude',
|
||||
exact: true
|
||||
})
|
||||
await expect(claudeOption).toBeVisible({ timeout: 15_000 })
|
||||
await claudeOption.click({ force: true })
|
||||
let opened: ChatTab | undefined
|
||||
|
||||
Reference in New Issue
Block a user