Skip to content

Commit e5dcf7b

Browse files
committed
Update galata testing
Signed-off-by: martinRenou <[email protected]>
1 parent 166689a commit e5dcf7b

File tree

5 files changed

+42
-34
lines changed

5 files changed

+42
-34
lines changed

.github/workflows/check.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,25 +122,22 @@ jobs:
122122
- name: Install the package
123123
run: pip install -vv .
124124

125-
- name: Install Galata
126-
run: |
127-
yarn install
128-
yarn playwright install chromium
125+
- name: Install dependencies
126+
shell: bash -l {0}
129127
working-directory: ui-tests-ipw7
128+
env:
129+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
130+
run: jlpm install
130131

131-
- name: Launch JupyterLab
132-
run: yarn run start:detached &
132+
- name: Install browser
133+
shell: bash -l {0}
134+
run: npx playwright install chromium
133135
working-directory: ui-tests-ipw7
134136

135-
- name: Wait for JupyterLab
136-
uses: ifaxity/wait-on-action@v1
137-
with:
138-
resource: http-get://localhost:8888/api
139-
timeout: 20000
140-
141-
- name: Run UI Tests
142-
run: yarn run test
137+
- name: Execute integration tests
138+
shell: bash -l {0}
143139
working-directory: ui-tests-ipw7
140+
run: npx playwright test
144141

145142
- name: Upload UI Test artifacts
146143
if: always()
@@ -170,25 +167,22 @@ jobs:
170167
- name: Install the package
171168
run: pip install -vv .
172169

173-
- name: Install Galata
174-
run: |
175-
yarn install
176-
yarn playwright install chromium
170+
- name: Install dependencies
171+
shell: bash -l {0}
177172
working-directory: ui-tests-ipw8
173+
env:
174+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
175+
run: jlpm install
178176

179-
- name: Launch JupyterLab
180-
run: yarn run start:detached &
177+
- name: Install browser
178+
shell: bash -l {0}
179+
run: npx playwright install chromium
181180
working-directory: ui-tests-ipw8
182181

183-
- name: Wait for JupyterLab
184-
uses: ifaxity/wait-on-action@v1
185-
with:
186-
resource: http-get://localhost:8888/api
187-
timeout: 20000
188-
189-
- name: Run UI Tests
190-
run: yarn run test
182+
- name: Execute integration tests
183+
shell: bash -l {0}
191184
working-directory: ui-tests-ipw8
185+
run: npx playwright test
192186

193187
- name: Upload UI Test artifacts
194188
if: always()

ui-tests-ipw7/playwright.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
/**
2+
* Configuration for Playwright using default from @jupyterlab/galata
3+
*/
14
const baseConfig = require('@jupyterlab/galata/lib/playwright-config');
25

36
module.exports = {
47
...baseConfig,
8+
webServer: {
9+
command: 'jlpm start',
10+
url: 'http://localhost:8888/lab',
11+
reuseExistingServer: !process.env.CI
12+
},
513
timeout: 600000,
6-
retries: 1,
14+
retries: 1
715
};

ui-tests-ipw7/tests/ipydatagrid.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { IJupyterLabPageFixture, test } from '@jupyterlab/galata';
5-
import { expect } from '@playwright/test';
4+
import { expect, IJupyterLabPageFixture, test } from '@jupyterlab/galata';
65
import * as path from 'path';
76
const klaw = require('klaw-sync');
87

ui-tests-ipw8/playwright.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
/**
2+
* Configuration for Playwright using default from @jupyterlab/galata
3+
*/
14
const baseConfig = require('@jupyterlab/galata/lib/playwright-config');
25

36
module.exports = {
47
...baseConfig,
8+
webServer: {
9+
command: 'jlpm start',
10+
url: 'http://localhost:8888/lab',
11+
reuseExistingServer: !process.env.CI
12+
},
513
timeout: 600000,
6-
retries: 1,
14+
retries: 1
715
};

ui-tests-ipw8/tests/ipydatagrid.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { IJupyterLabPageFixture, test } from '@jupyterlab/galata';
5-
import { expect } from '@playwright/test';
4+
import { expect, IJupyterLabPageFixture, test } from '@jupyterlab/galata';
65
import * as path from 'path';
76
const klaw = require('klaw-sync');
87

0 commit comments

Comments
 (0)