Polish web chat presentation
This commit is contained in:
@@ -14,8 +14,8 @@ const icons = Object.fromEntries(
|
||||
const iconNames = Object.keys(icons)
|
||||
|
||||
describe('ic_ds_ icon set', () => {
|
||||
it('exports the full P-I set (45 deepsuite + 14 figma extracts + the hand-authored sparkle)', () => {
|
||||
expect(iconNames.length).toBe(60)
|
||||
it('exports the full P-I set (45 deepsuite + 14 figma extracts + 2 hand-authored glyphs)', () => {
|
||||
expect(iconNames.length).toBe(61)
|
||||
})
|
||||
|
||||
it.each(iconNames)('%s renders an svg with currentColor fills and no hardcoded palette', (name) => {
|
||||
|
||||
@@ -124,12 +124,17 @@ describe('MarkdownText', () => {
|
||||
})
|
||||
|
||||
describe('JsonBlock', () => {
|
||||
it('collapsed by default; toggle reveals pretty-printed payload', () => {
|
||||
render(<JsonBlock label="args" payload={{ a: 1 }} />)
|
||||
it('collapsed by default; accessible toggle reveals pretty-printed payload', () => {
|
||||
render(<JsonBlock label="args" payload={{ a: 1 }} collapsedIcon={<span data-testid="json-icon">T</span>} />)
|
||||
const toggle = screen.getByRole('button', { name: 'args' })
|
||||
expect(toggle.getAttribute('aria-expanded')).toBe('false')
|
||||
expect(screen.getByTestId('json-icon')).toBeDefined()
|
||||
expect(screen.queryByText(/"a": 1/)).toBeNull()
|
||||
fireEvent.click(screen.getByRole('button', { name: /args/ }))
|
||||
fireEvent.click(toggle)
|
||||
expect(toggle.getAttribute('aria-expanded')).toBe('true')
|
||||
expect(screen.getByText(/"a": 1/)).toBeDefined()
|
||||
fireEvent.click(screen.getByRole('button', { name: /args/ }))
|
||||
fireEvent.click(toggle)
|
||||
expect(toggle.getAttribute('aria-expanded')).toBe('false')
|
||||
expect(screen.queryByText(/"a": 1/)).toBeNull()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user