mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
Add hideInputs query param in notebookViewer and other minor updates (#82)
* Add hideInputs query param in notebookViewer * Fix test and other minor changes * Make GalleryHeaderComponent more functional
This commit is contained in:
@@ -93,21 +93,23 @@ describe("GalleryUtils", () => {
|
||||
selectedTab,
|
||||
sortBy,
|
||||
searchText: decodeURIComponent(searchText)
|
||||
});
|
||||
} as GalleryUtils.GalleryViewerProps);
|
||||
});
|
||||
|
||||
it("getNotebookViewerProps gets notebook viewer props correctly", () => {
|
||||
const notebookUrl = "https%3A%2F%2Fnotebook.url";
|
||||
const galleryItemId = "1234-abcd-efgh";
|
||||
const hideInputs = "true";
|
||||
|
||||
const response = GalleryUtils.getNotebookViewerProps(
|
||||
`?${GalleryUtils.NotebookViewerParams.NotebookUrl}=${notebookUrl}&${GalleryUtils.NotebookViewerParams.GalleryItemId}=${galleryItemId}`
|
||||
`?${GalleryUtils.NotebookViewerParams.NotebookUrl}=${notebookUrl}&${GalleryUtils.NotebookViewerParams.GalleryItemId}=${galleryItemId}&${GalleryUtils.NotebookViewerParams.HideInputs}=${hideInputs}`
|
||||
);
|
||||
|
||||
expect(response).toEqual({
|
||||
notebookUrl: decodeURIComponent(notebookUrl),
|
||||
galleryItemId
|
||||
});
|
||||
galleryItemId,
|
||||
hideInputs: true
|
||||
} as GalleryUtils.NotebookViewerProps);
|
||||
});
|
||||
|
||||
it("getTabTitle returns correct title for official samples", () => {
|
||||
|
||||
Reference in New Issue
Block a user