mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 17:43:03 +03:00
b5e2d5ad9c
# Description - Implement Icon Component - Implement TextButton Component - Change Add Brain Button And Set it in the Search Page - Fix Errors When sending empty message - Change EsLint rules ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
25 lines
610 B
TypeScript
25 lines
610 B
TypeScript
import { Page } from "@playwright/test";
|
|
|
|
import { getEditor } from "./getEditor";
|
|
|
|
export const testSelectBrain = async (page: Page): Promise<void> => {
|
|
const randomMessage = Math.random().toString(36).substring(7);
|
|
|
|
const editor = getEditor(page);
|
|
|
|
await editor.fill("@");
|
|
|
|
await page.getByText("Test brain").first().click();
|
|
|
|
await editor.fill(randomMessage);
|
|
|
|
await page.getByTestId("submit-button").click();
|
|
|
|
await page
|
|
.getByTestId("chat-message-text")
|
|
.getByText(`${randomMessage}`)
|
|
.isVisible();
|
|
|
|
await page.getByTestId("brain-tags").getByText("Test brain").isVisible();
|
|
};
|