Browse Source

Wait for local login file to redirect when testing example apps.

Ian Rose 5 năm trước cách đây
mục cha
commit
9065bfa6e0
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      examples/chrome-example-test.js

+ 5 - 0
examples/chrome-example-test.js

@@ -47,6 +47,11 @@ async function main() {
   console.info('Navigating to page:', URL);
   await page.goto(URL);
   console.info('Waiting for page to load...');
+  // Wait for the local file to redirect on noteboox >= 6.0,
+  // which happens after 1000ms.
+  await new Promise(resolve => {
+    setTimeout(resolve, 2000);
+  });
 
   const html = await page.content();
   if (inspect(html).indexOf('jupyter-config-data') === -1) {