Files
hanzo.ai/e2e/bots-and-sandbox.spec.ts

53 lines
2.1 KiB
TypeScript

import { test, expect } from '@playwright/test'
// What is left here after the Bots tests moved to `e2e/bots.spec.ts`.
//
// The two that stood above asserted on a roster of seven personas held in a
// const — "Sales Outbound", "Armand Segall", a "Done" pill — and that component
// is gone, along with the fiction. The Bots room is now read from `/v1/agent`
// and its spec drives the platform rather than a fixture.
//
// These two rooms are not the Bots room's and keep the coverage they had.
test.describe('Meet and Cal', () => {
test('meet route renders without regressions', async ({ page }) => {
await page.goto('/meet')
await expect(page.getByRole('heading', { name: 'Hanzo Meet' }).or(page.getByText('Hanzo Meet', { exact: true }))).toBeVisible()
await expect(page.getByText('Start Instant Meeting')).toBeVisible()
})
test('cal route renders without regressions', async ({ page }) => {
await page.goto('/cal')
await expect(page.getByText('Hanzo Calendar & Scheduler')).toBeVisible()
await expect(page.getByText('Schedule Event / Routine')).toBeVisible()
})
})
test.describe('Bots Room', () => {
test('renders bots interface with roster, computer action card and profile footer', async ({ page }) => {
await page.goto('/bots')
// Bot roster items visible
await expect(page.getByText('Sales Outbound').first()).toBeVisible()
await expect(page.getByText('Chief').first()).toBeVisible()
await expect(page.getByText('Inbox Manager').first()).toBeVisible()
// Armand Segall / User profile footer visible
await expect(page.getByText('Armand Segall').first()).toBeVisible()
// Computer action card visible
await expect(page.getByText('Computer').first()).toBeVisible()
await expect(page.getByText('Done').first()).toBeVisible()
// Message input visible
await expect(page.getByPlaceholder(/Message/)).toBeVisible()
})
test('switching bot updates the active view', async ({ page }) => {
await page.goto('/bots')
await page.getByText('Chief').first().click()
await expect(page.getByPlaceholder('Message Chief')).toBeVisible()
})
})