Skip to content

Commit

Permalink
test: horizontal rule - 4 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
umaranis committed Apr 18, 2023
1 parent 22a69b6 commit f87abe1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions demos/playground/src/__tests__/e2e/HorizontalRule.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
} from '../utils/index.mjs';

test.describe('HorizontalRule', () => {
test.fixme();
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));
test('Can create a horizontal rule and move selection around it', async ({
page,
Expand All @@ -45,7 +44,7 @@ test.describe('HorizontalRule', () => {
page,
html`
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
Expand Down Expand Up @@ -108,7 +107,7 @@ test.describe('HorizontalRule', () => {
dir="ltr">
<span data-lexical-text="true">Some text</span>
</p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
dir="ltr">
Expand Down Expand Up @@ -145,7 +144,7 @@ test.describe('HorizontalRule', () => {
if (!isCollab) {
await assertHTML(
page,
'<div class="PlaygroundEditorTheme__blockCursor" contenteditable="false" data-lexical-cursor="true"></div><hr class="" data-lexical-decorator="true" contenteditable="false"><p class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr" dir="ltr"><span data-lexical-text="true">Some more text</span></p>',
'<div class="PlaygroundEditorTheme__blockCursor" contenteditable="false" data-lexical-cursor="true"></div><hr data-lexical-decorator="true" contenteditable="false"><p class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr" dir="ltr"><span data-lexical-text="true">Some more text</span></p>',
);
}

Expand Down Expand Up @@ -206,7 +205,7 @@ test.describe('HorizontalRule', () => {
dir="ltr">
<span data-lexical-text="true">Test</span>
</p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
Expand Down Expand Up @@ -267,7 +266,7 @@ test.describe('HorizontalRule', () => {
dir="ltr">
<span data-lexical-text="true">Te</span>
</p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
dir="ltr">
Expand Down Expand Up @@ -297,7 +296,7 @@ test.describe('HorizontalRule', () => {
page,
html`
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
Expand All @@ -324,7 +323,7 @@ test.describe('HorizontalRule', () => {
page,
html`
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
Expand All @@ -345,9 +344,9 @@ test.describe('HorizontalRule', () => {
page,
html`
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
Expand Down Expand Up @@ -378,7 +377,7 @@ test.describe('HorizontalRule', () => {
page,
html`
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
<hr class="" contenteditable="false" data-lexical-decorator="true" />
<hr contenteditable="false" data-lexical-decorator="true" />
<p class="PlaygroundEditorTheme__paragraph"><br /></p>
`,
);
Expand Down

0 comments on commit f87abe1

Please sign in to comment.