Browse Source

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

Ian Rose 5 years ago
parent
commit
9065bfa6e0
1 changed files with 5 additions and 0 deletions
  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) {