Skip to content

Commit eb212b1

Browse files
authored
Bump JupyterCAD 3.0.0 (#28)
* Bump jupytercad * Bump JS * Update galata * Gneh * Redo yarn.lock * Update test * Update tests * Do not wait for open * Set retries * Remove icon * Undo changes on the ui-tests * Trying to fix icon
1 parent fad026e commit eb212b1

File tree

10 files changed

+1556
-2020
lines changed

10 files changed

+1556
-2020
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ jobs:
9494
micromamba-version: '1.5.5-0'
9595
environment-name: cad
9696
create-args: >-
97-
python=3.10
98-
jupyterlab=4
97+
python=3.9
98+
jupyterlab
9999
freecad=0.21.2
100100
101101
- name: Download extension package
@@ -107,7 +107,7 @@ jobs:
107107
shell: bash -l {0}
108108
run: |
109109
set -eux
110-
pip install "jupyterlab>=4.0.0,<4.2.0" "jupytercad>=3.0.0a6" jupytercad_freecad*.whl
110+
pip install "jupytercad>=3.0.0" jupytercad_freecad*.whl
111111
112112
- name: Install dependencies
113113
shell: bash -l {0}

.github/workflows/update_galata_references.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
shell: bash -l {0}
9090
run: |
9191
whereis python
92-
pip install "jupyterlab>=4.0.0,<5" "jupytercad>=3.0.0a6" jupytercad_freecad*.whl
92+
pip install "jupytercad>=3.0.0" jupytercad_freecad*.whl
9393
9494
- name: Install dependencies
9595
shell: bash -l {0}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
},
5353
"dependencies": {
5454
"@jupyter/collaborative-drive": "^3.0.0",
55-
"@jupytercad/base": "^3.0.0-alpha.5",
56-
"@jupytercad/jupytercad-core": "^3.0.0-alpha.5",
57-
"@jupytercad/schema": "^3.0.0-alpha.5",
55+
"@jupytercad/base": "^3.0.0",
56+
"@jupytercad/jupytercad-core": "^3.0.0",
57+
"@jupytercad/schema": "^3.0.0",
5858
"@jupyterlab/application": "^4.0.0"
5959
},
6060
"devDependencies": {

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ classifiers = [
2828
]
2929
dependencies = [
3030
"jupyter_ydoc>=3,<4",
31-
"jupytercad_core>=3.0.0a1,<4",
31+
"jupytercad_core>=3.0.0,<4",
3232
]
3333
dynamic = ["version", "description", "authors", "urls", "keywords"]
3434

style/freecad.svg

Lines changed: 2 additions & 7 deletions
Loading

ui-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test:debug": "PWDEBUG=1 npx playwright test"
1111
},
1212
"devDependencies": {
13-
"@jupyterlab/galata": "^5.1.0",
13+
"@jupyterlab/galata": "^5.2.5",
1414
"@playwright/test": "^1.32.0",
1515
"@types/klaw-sync": "^6.0.1"
1616
},

ui-tests/playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
timeout: 120 * 1000,
1212
reuseExistingServer: false
1313
},
14-
retries: 0,
14+
retries: 1,
1515
use: {
1616
...baseConfig.use,
1717
trace: 'on-first-retry'

ui-tests/tests/ui.spec.ts

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,14 @@ test.describe('UI Test', () => {
6767
await page.notebook.openByPath(fullPath);
6868
await page.notebook.activate(fullPath);
6969
await page.locator('div.jpcad-Spinner').waitFor({ state: 'hidden' });
70+
await page.waitForTimeout(1000);
71+
72+
if (await page.getByRole('button', { name: 'Ok' }).isVisible()) {
73+
await page.getByRole('button', { name: 'Ok' }).click();
74+
}
7075

71-
await page
72-
.getByRole('tablist', { name: 'main sidebar' })
73-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
74-
.click();
75-
await page
76-
.getByRole('tablist', { name: 'alternate sidebar' })
77-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
78-
.click();
76+
await page.sidebar.close('left');
77+
await page.sidebar.close('right');
7978
await page.waitForTimeout(1000);
8079
const main = await page.$('#jp-main-split-panel');
8180
expect(errors).toBe(0);
@@ -131,14 +130,8 @@ test.describe('UI Test', () => {
131130
});
132131
await accept.click();
133132

134-
await page
135-
.getByRole('tablist', { name: 'main sidebar' })
136-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
137-
.click();
138-
await page
139-
.getByRole('tablist', { name: 'alternate sidebar' })
140-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
141-
.click();
133+
await page.sidebar.close('left');
134+
await page.sidebar.close('right');
142135

143136
await page.waitForTimeout(1000);
144137
expect(errors).toBe(0);
@@ -173,14 +166,8 @@ test.describe('UI Test', () => {
173166
await page.getByRole('button', { name: 'Ok' }).click();
174167
}
175168

176-
await page
177-
.getByRole('tablist', { name: 'main sidebar' })
178-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
179-
.click();
180-
await page
181-
.getByRole('tablist', { name: 'alternate sidebar' })
182-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
183-
.click();
169+
await page.sidebar.close('left');
170+
await page.sidebar.close('right');
184171

185172
await page.waitForTimeout(1000);
186173
expect(errors).toBe(0);
@@ -217,14 +204,8 @@ test.describe('UI Test', () => {
217204
.click();
218205

219206
// Hide side bars for the screenshot
220-
await page
221-
.getByRole('tablist', { name: 'main sidebar' })
222-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
223-
.click();
224-
await page
225-
.getByRole('tablist', { name: 'alternate sidebar' })
226-
.getByRole('tab', { name: 'JupyterCad Control Panel' })
227-
.click();
207+
await page.sidebar.close('left');
208+
await page.sidebar.close('right');
228209

229210
await page.waitForTimeout(1000);
230211
expect(errors).toBe(0);

0 commit comments

Comments
 (0)