Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
rchiodo committed Mar 30, 2020
1 parent 25a40da commit fdbc150
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/datascience/interactiveWindow.functional.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1086,4 +1086,23 @@ Type: builtin_function_or_method`,
return ioc;
}
);
runMountedTest(
'Update display data',
async (wrapper, context) => {
if (ioc.mockJupyter) {
context.skip();
} else {
// Create 3 cells. Last cell should update the second
await addCode(ioc, wrapper, 'dh = display(display_id=True)');
await addCode(ioc, wrapper, 'dh.display("Hello")');
verifyHtmlOnCell(wrapper, 'InteractiveCell', 'Hello', CellPosition.Last);
await addCode(ioc, wrapper, 'dh.update("Goodbye")');
verifyHtmlOnCell(wrapper, 'InteractiveCell', '<div></div>', CellPosition.Last);
verifyHtmlOnCell(wrapper, 'InteractiveCell', 'Goodbye', 1);
}
},
() => {
return ioc;
}
);
});

0 comments on commit fdbc150

Please sign in to comment.