Pārlūkot izejas kodu

Fix acceptDialog utility

Steven Silvester 8 gadi atpakaļ
vecāks
revīzija
b5d2b89981
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  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();
     }