diff --git a/test/smoke/src/sql/areas/notebook/notebook.test.ts b/test/smoke/src/sql/areas/notebook/notebook.test.ts index 442228e3b7..808cf4ea47 100644 --- a/test/smoke/src/sql/areas/notebook/notebook.test.ts +++ b/test/smoke/src/sql/areas/notebook/notebook.test.ts @@ -435,6 +435,27 @@ export function setup(opts: minimist.ParsedArgs) { await app.workbench.sqlNotebook.textCellToolbar.changeTextCellView('Markdown View'); await app.workbench.sqlNotebook.waitForActiveCellEditorContents(s => s.includes('- **_Markdown Test_**')); }); + + it('can save and reopen WYSIWYG notebook', async function () { + const app = this.app as Application; + const filename = 'emptyNotebook.ipynb'; + await app.workbench.sqlNotebook.openFile(filename); + + // Add some text to a WYSIWYG cell and add some basic styling + await app.workbench.sqlNotebook.addCell('markdown'); + await app.workbench.sqlNotebook.textCellToolbar.changeTextCellView('Markdown View'); + let text = 'WYSIWYG Test'; + await app.workbench.sqlNotebook.waitForTypeInEditor(text); + await app.workbench.sqlNotebook.textCellToolbar.changeTextCellView('Rich Text View'); + await app.workbench.sqlNotebook.selectAllTextInRichTextEditor(); + await app.workbench.sqlNotebook.textCellToolbar.boldSelectedText(); + + // Save file, close it, and then reopen to verify WYSIWYG cell contents are the same + await app.workbench.quickaccess.runCommand('workbench.action.files.save'); + await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor'); + await app.workbench.sqlNotebook.openFile(filename); + await app.workbench.sqlNotebook.waitForTextCellPreviewContent(text, 'p strong'); + }); }); describe('Cell Actions', function () {