Add mentions as links to rte (#10463)

* adds autocomplete behaviour for mentions in rich text editor
* allows adding mentions as links
* adds tests
This commit is contained in:
alunturner 2023-03-31 14:14:55 +01:00 committed by GitHub
parent 212977c4ac
commit 6f791d28c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 585 additions and 23 deletions

View file

@ -93,15 +93,15 @@ describe("SendWysiwygComposer", () => {
customRender(jest.fn(), jest.fn(), false, true);
// Then
await waitFor(() => expect(screen.getByTestId("WysiwygComposer")).toBeTruthy());
expect(await screen.findByTestId("WysiwygComposer")).toBeInTheDocument();
});
it("Should render PlainTextComposer when isRichTextEnabled is at false", () => {
it("Should render PlainTextComposer when isRichTextEnabled is at false", async () => {
// When
customRender(jest.fn(), jest.fn(), false, false);
// Then
expect(screen.getByTestId("PlainTextComposer")).toBeTruthy();
expect(await screen.findByTestId("PlainTextComposer")).toBeInTheDocument();
});
describe.each([{ isRichTextEnabled: true }, { isRichTextEnabled: false }])(