本文整理汇总了TypeScript中@jupyterlab/testutils.dismissDialog函数的典型用法代码示例。如果您正苦于以下问题:TypeScript dismissDialog函数的具体用法?TypeScript dismissDialog怎么用?TypeScript dismissDialog使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dismissDialog函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: async
const func = async () => {
await waitForDialog();
const dialog = document.body.getElementsByClassName('jp-Dialog')[0];
const input = dialog.getElementsByTagName('input')[0];
input.value = newPath;
await acceptDialog(); // Accept rename dialog
await dismissDialog(); // Reject conflict dialog
};
示例2: it
it('should find a widget given a file', async () => {
const model = await services.contents.newUntitled({
type: 'file',
ext: '.txt'
});
widget = manager.createNew(model.path);
expect(manager.findWidget(model.path)).to.equal(widget);
await dismissDialog();
});
示例3: it
it('should initialize the model when the file is saved for the first time', async () => {
const context = await createNotebookContext();
context.model.fromJSON(NBTestUtils.DEFAULT_CONTENT);
expect(context.model.cells.canUndo).to.equal(true);
await context.initialize(true);
await context.ready;
expect(context.model.cells.canUndo).to.equal(false);
await dismissDialog();
});
示例4: it
it('should keep the existing kernel if dismissed', async () => {
await session.initialize();
const { id, name } = session.kernel;
const dismiss = dismissDialog();
await session.selectKernel();
await dismiss;
expect(session.kernel.id).to.equal(id);
expect(session.kernel.name).to.equal(name);
});