mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 17:23:42 -05:00
Add more notebook extension tests (#11143)
* more tests * More tests * More tests * Add prompt tests
This commit is contained in:
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as constants from '../common/constants';
|
||||
import { IPrompter, QuestionTypes, IQuestion } from '../prompts/question';
|
||||
import { IPrompter, IQuestion, confirm } from '../prompts/question';
|
||||
import CodeAdapter from '../prompts/adapter';
|
||||
import { BookTreeItem, BookTreeItemType } from './bookTreeItem';
|
||||
import { BookModel } from './bookModel';
|
||||
@@ -236,7 +236,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
||||
let notebookPath: string;
|
||||
// If no uri is passed in, try to use the current active notebook editor
|
||||
if (!uri) {
|
||||
let openDocument = azdata.nb.activeNotebookEditor;
|
||||
let openDocument = this._apiWrapper.getActiveNotebookEditor();
|
||||
if (openDocument) {
|
||||
notebookPath = openDocument.document.uri.fsPath;
|
||||
}
|
||||
@@ -511,10 +511,10 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
||||
//Confirmation message dialog
|
||||
private async confirmReplace(): Promise<boolean> {
|
||||
return await this.prompter.promptSingle<boolean>(<IQuestion>{
|
||||
type: QuestionTypes.confirm,
|
||||
type: confirm,
|
||||
message: loc.confirmReplace,
|
||||
default: false
|
||||
});
|
||||
}, this._apiWrapper);
|
||||
}
|
||||
|
||||
getNavigation(uri: vscode.Uri): Thenable<azdata.nb.NavigationResult> {
|
||||
|
||||
Reference in New Issue
Block a user