Explorar o código

Fix acceptDialog utility

Steven Silvester %!s(int64=8) %!d(string=hai) anos
pai
achega
b5d2b89981
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      test/src/utils.ts

+ 3 - 0
test/src/utils.ts

@@ -100,6 +100,9 @@ export
 function acceptDialog(host: HTMLElement = document.body): Promise<void> {
   return waitForDialog(host).then(() => {
     let node = host.getElementsByClassName('jp-Dialog-okButton')[0];
+    if (!node) {
+      node = host.getElementsByClassName('jp-Dialog-warningButton')[0];
+    }
     if (node) {
       (node as HTMLElement).click();
     }