Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

adding maxWait command line flag #85

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -259,6 +259,10 @@ Notes:

*Default*: `false`

- **--max-wait**: Maximum time (in ms) to wait for JupyterLab to load

*Default*: `5000`

- **--help**: Show usage information

Shows usage information with list of all command-line options. Skips test execution.
5 changes: 5 additions & 0 deletions packages/galata/bin/cli.js
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@ const cli = meow(
--image-match-threshold image matching threshold
--slow-mo slow down UI operations by the specified ms
--theme JupyterLab Theme to set [light / JupyterLab Light, dark / JupyterLab Dark, installed theme name]
--max-wait maximum time (in ms) to wait for for JupyterLab to load (window.jupyterlab object available)
Other options:
--launch-result-server launch result file server for a test
@@ -193,6 +194,10 @@ const cli = meow(
theme: {
type: 'string',
default: config.theme || ''
},
maxWait: {
type: 'number',
default: config.maxWait || 5000
}
}
}
3 changes: 2 additions & 1 deletion packages/galata/jest-env.js
Original file line number Diff line number Diff line change
@@ -103,7 +103,8 @@ class TestEnvironment extends NodeEnvironment {
await context.page.goto(context.jlabUrl, {
waitUntil: 'domcontentloaded'
});
await this.waitForJupyterLabAppObject();
const maxWait = config.maxWait ? config.maxWait : 5000;
await this.waitForJupyterLabAppObject(maxWait);
} catch (error) {
await logAndExit(
'error',
3 changes: 2 additions & 1 deletion packages/galata/util.js
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@ const configKeys = {
'testId',
'testOutputDir',
'referenceDir',
'theme'
'theme',
'maxWait'
]),
boolean: new Set([
'headless',