feat(email): expose provider-neutral reads
This commit is contained in:
@@ -36,6 +36,10 @@ function renderPage() {
|
||||
describe('CorrespondenceInboxPage', () => {
|
||||
beforeEach(() => {
|
||||
mockedApi.get.mockImplementation((url: string) => {
|
||||
if (url === '/email/providers') return Promise.resolve({ data: [
|
||||
{ provider: 'gmail', displayName: 'Gmail', connected: true, address: 'owner@gmail.test', canRead: true, canSend: false },
|
||||
{ provider: 'microsoft', displayName: 'Outlook', connected: false, address: null, canRead: false, canSend: false },
|
||||
] } as any);
|
||||
if (url === '/correspondence') return Promise.resolve({ data: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -76,6 +80,8 @@ describe('CorrespondenceInboxPage', () => {
|
||||
expect(await screen.findByText(/backend engineer/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/2 labels/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/1 attachments/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/Gmail: owner@gmail\.test · Read only/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/Outlook: Not connected · Read only/i)).toBeInTheDocument();
|
||||
|
||||
fireEvent.change(screen.getByLabelText(/search/i), { target: { value: 'Maria' } });
|
||||
fireEvent.mouseDown(screen.getAllByRole('combobox')[0]);
|
||||
|
||||
Reference in New Issue
Block a user