mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
Add smoke test for converting from Rich Text to Markdown. (#19151)
This commit is contained in:
@@ -326,6 +326,7 @@ export function setup(opts: minimist.ParsedArgs) {
|
||||
const linkSelector = '.notebook-cell.active .notebook-text a[href=\'http://www.microsoft.com\']';
|
||||
await verifyElementRendered(app, markdownString, linkSelector);
|
||||
});
|
||||
|
||||
it('can create img from markdown', async function () {
|
||||
const app = this.app as Application;
|
||||
const markdownString = '';
|
||||
@@ -333,6 +334,24 @@ export function setup(opts: minimist.ParsedArgs) {
|
||||
const imgSelector = '.notebook-cell.active .notebook-text img[src=\'https://www.ngdata.com/wp-content/uploads/2016/05/churn.jpg\'][alt=\'Churn-Index\']';
|
||||
await verifyElementRendered(app, markdownString, imgSelector);
|
||||
});
|
||||
|
||||
it('can convert WYSIWYG to Markdown', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.sqlNotebook.newUntitledNotebook();
|
||||
await app.workbench.sqlNotebook.addCellFromPlaceholder('Markdown');
|
||||
await app.workbench.sqlNotebook.waitForPlaceholderGone();
|
||||
await app.workbench.sqlNotebook.textCellToolbar.changeTextCellView('Markdown View');
|
||||
await app.workbench.sqlNotebook.waitForTypeInEditor('Markdown Test');
|
||||
await app.workbench.sqlNotebook.textCellToolbar.changeTextCellView('Rich Text View');
|
||||
await app.workbench.sqlNotebook.selectAllTextInRichTextEditor();
|
||||
await app.workbench.sqlNotebook.textCellToolbar.boldSelectedText();
|
||||
await app.workbench.sqlNotebook.textCellToolbar.italicizeSelectedText();
|
||||
await app.workbench.sqlNotebook.textCellToolbar.underlineSelectedText();
|
||||
await app.workbench.sqlNotebook.textCellToolbar.highlightSelectedText();
|
||||
await app.workbench.sqlNotebook.textCellToolbar.insertList();
|
||||
await app.workbench.sqlNotebook.textCellToolbar.changeTextCellView('Markdown View');
|
||||
await app.workbench.sqlNotebook.waitForActiveCellEditorContents(s => s.includes('- **_<u><mark>Markdown Test</mark></u>_**'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Cell Actions', function () {
|
||||
|
||||
Reference in New Issue
Block a user