From fdbc1507627d53a5c241d75d99c1e720a1ab84bc Mon Sep 17 00:00:00 2001 From: Rich Chiodo Date: Mon, 30 Mar 2020 16:15:18 -0700 Subject: [PATCH] Add test --- .../interactiveWindow.functional.test.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/test/datascience/interactiveWindow.functional.test.tsx b/src/test/datascience/interactiveWindow.functional.test.tsx index 83640bebe4ebb..6b783bef07327 100644 --- a/src/test/datascience/interactiveWindow.functional.test.tsx +++ b/src/test/datascience/interactiveWindow.functional.test.tsx @@ -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', '
', CellPosition.Last); + verifyHtmlOnCell(wrapper, 'InteractiveCell', 'Goodbye', 1); + } + }, + () => { + return ioc; + } + ); });