Skip to content

Commit f2cf03d

Browse files
committed
test: added tests for experiment with preserving empty rows
1 parent bcae21a commit f2cf03d

File tree

19 files changed

+56
-1
lines changed

19 files changed

+56
-1
lines changed

demo/components/Playground.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ export const Playground = memo<PlaygroundProps>((props) => {
230230
uploadFile: fileUploadHandler,
231231
},
232232
experimental: {
233-
...experimental,
234233
directiveSyntax,
235234
preserveEmptyRows,
236235
prepareRawMarkup: prepareRawMarkup
237236
? (value) => '**prepare raw markup**\n\n' + value
238237
: undefined,
238+
...experimental,
239239
},
240240
markupConfig: {
241241
parseHtmlOnPaste: true,
@@ -261,6 +261,7 @@ export const Playground = memo<PlaygroundProps>((props) => {
261261
experimental?.needToSetDimensionsForUploadedImages,
262262
experimental?.beforeEditorModeChange,
263263
experimental?.prepareRawMarkup,
264+
experimental?.preserveEmptyRows,
264265
directiveSyntax,
265266
disableMarkdownItAttrs,
266267
markupParseHtmlOnPaste,

tests/playwright/core/editor.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class MarkdownEditorLocators {
1313
readonly settingsContent;
1414
readonly toolbar;
1515
readonly toolbarMoreActionButton;
16+
readonly cmAutocomplete;
1617

1718
constructor(page: Page) {
1819
// page
@@ -28,6 +29,8 @@ class MarkdownEditorLocators {
2829
// editor
2930
this.contenteditable = this.editor.locator('[contenteditable=true]');
3031
this.toolbarMoreActionButton = this.editor.getByTestId('g-md-toolbar-more-action');
32+
33+
this.cmAutocomplete = this.editor.locator('.cm-tooltip-autocomplete');
3134
}
3235
}
3336

@@ -257,4 +260,8 @@ export class MarkdownEditorPage {
257260
loc.selectText();
258261
await this.page.waitForTimeout(100);
259262
}
263+
264+
async waitForCMAutocomplete() {
265+
await this.locators.cmAutocomplete.waitFor({state: 'visible'});
266+
}
260267
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)