mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
Add Open Notebook Folder functionality to Books viewlet. (#9939)
This commit is contained in:
@@ -235,10 +235,9 @@ describe('BookTreeViewProviderTests', function () {
|
||||
});
|
||||
|
||||
it('should ignore toc.yml files not in _data folder', async () => {
|
||||
await bookTreeViewProvider.currentBook.getTableOfContentFiles(rootFolderPath);
|
||||
for (let p of bookTreeViewProvider.currentBook.tableOfContentPaths) {
|
||||
should(p.toLocaleLowerCase()).equal(tableOfContentsFile.replace(/\\/g, '/').toLocaleLowerCase());
|
||||
}
|
||||
await bookTreeViewProvider.currentBook.loadTableOfContentFiles(rootFolderPath);
|
||||
let path = bookTreeViewProvider.currentBook.tableOfContentsPath;
|
||||
should(path.toLocaleLowerCase()).equal(tableOfContentsFile.replace(/\\/g, '/').toLocaleLowerCase());
|
||||
});
|
||||
|
||||
this.afterAll(async function (): Promise<void> {
|
||||
|
||||
@@ -53,6 +53,7 @@ describe('BookTrustManagerTests', function () {
|
||||
|
||||
// Mock Book Data
|
||||
let bookTreeItemFormat1: BookTreeItemFormat = {
|
||||
contentPath: undefined,
|
||||
root: '/temp/SubFolder/',
|
||||
tableOfContents: {
|
||||
sections: [
|
||||
@@ -72,6 +73,7 @@ describe('BookTrustManagerTests', function () {
|
||||
};
|
||||
|
||||
let bookTreeItemFormat2: BookTreeItemFormat = {
|
||||
contentPath: undefined,
|
||||
root: '/temp/SubFolder2/',
|
||||
tableOfContents: {
|
||||
sections: [
|
||||
@@ -88,6 +90,7 @@ describe('BookTrustManagerTests', function () {
|
||||
};
|
||||
|
||||
let bookTreeItemFormat3: BookTreeItemFormat = {
|
||||
contentPath: undefined,
|
||||
root: '/temp2/SubFolder3/',
|
||||
tableOfContents: {
|
||||
sections: [
|
||||
@@ -206,6 +209,7 @@ describe('BookTrustManagerTests', function () {
|
||||
apiWrapperMock.setup(api => api.getWorkspaceFolders()).returns(() => []);
|
||||
apiWrapperMock.setup(api => api.getConfiguration(TypeMoq.It.isValue(constants.notebookConfigKey))).returns(() => workspaceConfigurtionMock.object);
|
||||
let bookTreeItemFormat1: BookTreeItemFormat = {
|
||||
contentPath: undefined,
|
||||
root: '/temp/SubFolder/',
|
||||
tableOfContents: {
|
||||
sections: [
|
||||
@@ -225,6 +229,7 @@ describe('BookTrustManagerTests', function () {
|
||||
};
|
||||
|
||||
let bookTreeItemFormat2: BookTreeItemFormat = {
|
||||
contentPath: undefined,
|
||||
root: '/temp/SubFolder2/',
|
||||
tableOfContents: {
|
||||
sections: [
|
||||
|
||||
Reference in New Issue
Block a user