quivr/frontend/e2e/tests/chat/utils/testDeleteChats.ts
Mamadou DICKO 77e135fb5b
test: add chat e2e tests (#1344)
- Brain selection
- Chat deletion
- Unplug chat
- Plug chat
2023-10-09 15:23:24 +02:00

12 lines
353 B
TypeScript

import { expect, Page } from "@playwright/test";
export const testDeleteChats = async (page: Page): Promise<void> => {
const deleteChatButtons = await page.getByTestId("delete-chat-button").all();
for (const button of deleteChatButtons) {
await button.click();
}
expect((await page.getByTestId("chats-list-item").all()).length === 0);
};