Skip to content

Commit

Permalink
test: hashtag inherits format
Browse files Browse the repository at this point in the history
  • Loading branch information
umaranis committed Dec 6, 2023
1 parent 6fe72ca commit d3fac70
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions demos/playground/src/__tests__/e2e/Hashtags.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
focusEditor,
html,
initialize,
pressToggleBold,
repeat,
test,
waitForSelector,
Expand Down Expand Up @@ -278,4 +279,27 @@ test.describe('Hashtags', () => {
focusPath: [0],
});
});

test('Hashtag inherits format', async ({ page, isPlainText }) => {
test.skip(isPlainText);
await focusEditor(page);
await page.keyboard.type('Hello ');
await pressToggleBold(page);
await page.keyboard.type('#world');
await assertHTML(
page,
html`
<p
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
dir="ltr">
<span data-lexical-text="true">Hello</span>
<strong
class="PlaygroundEditorTheme__textBold PlaygroundEditorTheme__hashtag"
data-lexical-text="true">
#world
</strong>
</p>
`,
);
});
});

0 comments on commit d3fac70

Please sign in to comment.