From 7146506be4a8595899c7566dcae53f79f2da4015 Mon Sep 17 00:00:00 2001 From: wnhlee <2wheeh@gmail.com> Date: Wed, 8 May 2024 18:14:09 +0900 Subject: [PATCH] add test --- .../__tests__/e2e/Hashtags.spec.mjs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs b/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs index 21a492062ca6..36e611f13428 100644 --- a/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs @@ -17,6 +17,7 @@ import { focusEditor, html, initialize, + pasteFromClipboard, pressToggleBold, repeat, test, @@ -440,4 +441,27 @@ test.describe('Hashtags', () => { `, ); }); + + test('Should not break with multiple matches', async ({page}) => { + await focusEditor(page); + + const clipboard = {'text/html': '#hello#world#more#next#matches'}; + await pasteFromClipboard(page, clipboard); + + await waitForSelector(page, '.PlaygroundEditorTheme__hashtag'); + + await assertHTML( + page, + html` +
+ + #hello + + #world#more#next#matches +
+ `, + ); + }); });