Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

670 B
Raw Blame
import { render, screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';

import { MessageCancelledBanner } from '@/atoms/MessageCancelledBanner.js';

describe('MessageCancelledBanner', () => {
  it('announces the cancelled message with warning styling', () => {
    render(<MessageCancelledBanner message="client-cancelled" className="host-cancelled" />);

    const banner = screen.getByRole('status');
    expect(banner).toHaveTextContent('client-cancelled');
    expect(banner).toHaveClass(
      'aui-message-cancelled-root',
      'host-cancelled',
      'border-warning-bg',
      'text-warning-bg',
      'w-fit',
    );
  });
});