Skip to content

Commit 98430a6

Browse files
committed
Revert changes on the ipywidgets 7 ui tests
Signed-off-by: martinRenou <[email protected]>
1 parent 6eb7e62 commit 98430a6

File tree

6 files changed

+3578
-1954
lines changed

6 files changed

+3578
-1954
lines changed

.github/workflows/check.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,25 @@ jobs:
147147
run: pip install -vv ipydatagrid*.whl
148148
working-directory: dist
149149

150-
- name: Install dependencies
151-
shell: bash -l {0}
150+
- name: Install Galata
151+
run: |
152+
yarn install
153+
yarn playwright install chromium
152154
working-directory: ui-tests-ipw7
153-
env:
154-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
155-
run: jlpm install
156155

157-
- name: Install browser
158-
shell: bash -l {0}
159-
run: npx playwright install chromium
156+
- name: Launch JupyterLab
157+
run: yarn run start:detached &
160158
working-directory: ui-tests-ipw7
161159

162-
- name: Execute integration tests
163-
shell: bash -l {0}
160+
- name: Wait for JupyterLab
161+
uses: ifaxity/wait-on-action@v1
162+
with:
163+
resource: http-get://localhost:8888/api
164+
timeout: 20000
165+
166+
- name: Run UI Tests
167+
run: yarn run test
164168
working-directory: ui-tests-ipw7
165-
run: npx playwright test
166169

167170
- name: Upload UI Test artifacts
168171
if: always()
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
from jupyterlab.galata import configure_jupyter_server
1+
from tempfile import mkdtemp
22

3-
configure_jupyter_server(c) # noqa: F821
3+
c.ServerApp.port = 8888 # noqa: F821
4+
c.ServerApp.token = "" # noqa: F821
5+
c.ServerApp.password = "" # noqa: F821
6+
c.ServerApp.disable_check_xsrf = True # noqa: F821
7+
c.ServerApp.open_browser = False # noqa: F821
8+
c.ServerApp.root_dir = mkdtemp(prefix="galata-test-") # noqa: F821
9+
10+
c.LabApp.expose_app_in_browser = True # noqa: F821

ui-tests-ipw7/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"author": "ipydatagrid",
1515
"license": "Apache-2.0",
1616
"dependencies": {
17-
"@jupyterlab/galata": "^5.0.0",
17+
"@jupyterlab/galata": "~4.5.0",
1818
"klaw-sync": "^6.0.0",
1919
"rimraf": "^3.0.2"
2020
},
2121
"devDependencies": {
22-
"@playwright/test": "^1.32.0"
22+
"@playwright/test": "^1.16.2"
2323
}
2424
}

ui-tests-ipw7/playwright.config.js

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

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

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

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

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

0 commit comments

Comments
 (0)