Skip to content

Commit a963b51

Browse files
authored
Move demo files (#36)
* Using config dir * Add work around * Update script * Update script * Skip file check for action * Move notebook closing to notebook test * Lint * Change to clean script
1 parent 61bd1ad commit a963b51

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ jobs:
180180
python -m pip install .
181181
182182
- name: Build the JupyterLite assets
183+
working-directory: demo
183184
run: |
184-
jupyter lite build --contents README.md --contents demo/example.ipynb --output-dir demo/public/lite
185+
jlpm clean:lite
186+
jlpm build:lite
185187
186188
- name: Install and build Vite dependencies
187189
working-directory: demo
File renamed without changes.
File renamed without changes.

demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "VITE_DEMO_SRC='./lite/index.html' VITE_TITLE='Lite' vite",
88
"build": "tsc && VITE_DEMO_SRC='http://localhost:8888' VITE_TITLE='Local' vite build --base=./",
99
"build:ghpages": "tsc && VITE_DEMO_SRC='./lite/index.html' VITE_TITLE='Lite' vite build --base=./",
10-
"build:lite": "jupyter lite build --contents ../README.md --contents ./example.ipynb --output-dir ./public/lite",
10+
"build:lite": "jlpm clean:lite && jupyter lite build --contents ../README.md --contents ./example.ipynb --lite-dir ./config --output-dir ./public/lite",
11+
"clean:lite": "rm -rf public/lite",
1112
"preview": "VITE_DEMO_SRC='./lite/index.html' VITE_TITLE='Lite' vite preview",
1213
"start:lab": "jupyter lab --config jupyter_server_config.py",
1314
"start:lite": "jlpm dev",

ui-tests/tests/hostpage-tests.spec.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ test.describe('Commands from host should affect lab in iframe', () => {
2424

2525
const iframe = page.locator('#jupyterlab').contentFrame();
2626

27-
// Close all tabs and wait for launcher
28-
await page
29-
.getByPlaceholder('Enter a command')
30-
.fill('application:close-all');
31-
await page.getByRole('button', { name: 'Submit' }).click();
3227
await iframe.locator('.jp-LauncherCard-icon').first().waitFor();
3328

3429
// Make sure left sidebar is hidden
@@ -95,5 +90,15 @@ test.describe('Commands from host should affect lab in iframe', () => {
9590

9691
await iframe.getByRole('button', { name: 'Select Kernel' }).click();
9792
await expect(iframe.getByLabel('Cells', { exact: true })).toBeVisible();
93+
94+
// Close all tabs and wait for launcher
95+
await page
96+
.getByPlaceholder('Enter a command')
97+
.fill('application:close-all');
98+
await page.getByRole('button', { name: 'Submit' }).click();
99+
await iframe
100+
.getByRole('button', { name: 'Discard changes to file' })
101+
.click();
102+
await iframe.locator('.jp-LauncherCard-icon').first().waitFor();
98103
});
99104
});

0 commit comments

Comments
 (0)