Skip to content

Commit 3b3901e

Browse files
jtpiofcollonval
andauthored
Use existing server settings when creating the ConfigSection (#85)
* Use existing server settings when creating the `ConfigSection` * fix yarn.lock * lint changelog * add serviceManager to mockApp * test * Fix notebook integration test * We of course dont need to select a kernel --------- Co-authored-by: Frédéric Collonval <[email protected]>
1 parent 465aa05 commit 3b3901e

File tree

5 files changed

+45
-17
lines changed

5 files changed

+45
-17
lines changed

CHANGELOG.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,52 @@
88

99
### Enhancements made
1010

11-
- Enhance tour version [#81](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/81) ([@fcollonval](https://github.com/fcollonval))
12-
- Add support for notebook 7 [#75](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/75) ([@fcollonval](https://github.com/fcollonval))
13-
- Add notebook tours, icons [#29](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/29) ([@bollwyvl](https://github.com/bollwyvl))
11+
- Enhance tour version
12+
[#81](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/81)
13+
([@fcollonval](https://github.com/fcollonval))
14+
- Add support for notebook 7
15+
[#75](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/75)
16+
([@fcollonval](https://github.com/fcollonval))
17+
- Add notebook tours, icons
18+
[#29](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/29)
19+
([@bollwyvl](https://github.com/bollwyvl))
1420

1521
### Bugs fixed
1622

17-
- Fix internationalization [#74](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/74) ([@fcollonval](https://github.com/fcollonval))
23+
- Fix internationalization
24+
[#74](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/74)
25+
([@fcollonval](https://github.com/fcollonval))
1826

1927
### Maintenance and upkeep improvements
2028

21-
- Bump @babel/traverse from 7.22.10 to 7.23.2 [#80](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/80) ([@dependabot](https://github.com/dependabot))
22-
- Bump postcss from 8.4.27 to 8.4.31 [#79](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/79) ([@dependabot](https://github.com/dependabot))
23-
- Bump postcss from 8.4.27 to 8.4.31 in /ui-tests [#78](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/78) ([@dependabot](https://github.com/dependabot))
24-
- Bump systeminformation from 5.18.10 to 5.21.8 in /ui-tests [#77](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/77) ([@dependabot](https://github.com/dependabot))
25-
- upgrade to jupyterlab4 [#71](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/71) ([@djangoliv](https://github.com/djangoliv))
29+
- Bump @babel/traverse from 7.22.10 to 7.23.2
30+
[#80](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/80)
31+
([@dependabot](https://github.com/dependabot))
32+
- Bump postcss from 8.4.27 to 8.4.31
33+
[#79](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/79)
34+
([@dependabot](https://github.com/dependabot))
35+
- Bump postcss from 8.4.27 to 8.4.31 in /ui-tests
36+
[#78](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/78)
37+
([@dependabot](https://github.com/dependabot))
38+
- Bump systeminformation from 5.18.10 to 5.21.8 in /ui-tests
39+
[#77](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/77)
40+
([@dependabot](https://github.com/dependabot))
41+
- upgrade to jupyterlab4
42+
[#71](https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/71)
43+
([@djangoliv](https://github.com/djangoliv))
2644

2745
### Contributors to this release
2846

2947
([GitHub contributors page for this release](https://github.com/jupyterlab-contrib/jupyterlab-tour/graphs/contributors?from=2021-10-31&to=2023-11-08&type=c))
3048

31-
[@bollwyvl](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Abollwyvl+updated%3A2021-10-31..2023-11-08&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Adependabot+updated%3A2021-10-31..2023-11-08&type=Issues) | [@djangoliv](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Adjangoliv+updated%3A2021-10-31..2023-11-08&type=Issues) | [@fcollonval](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Afcollonval+updated%3A2021-10-31..2023-11-08&type=Issues) | [@github-actions](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Agithub-actions+updated%3A2021-10-31..2023-11-08&type=Issues)
49+
[@bollwyvl](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Abollwyvl+updated%3A2021-10-31..2023-11-08&type=Issues)
50+
|
51+
[@dependabot](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Adependabot+updated%3A2021-10-31..2023-11-08&type=Issues)
52+
|
53+
[@djangoliv](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Adjangoliv+updated%3A2021-10-31..2023-11-08&type=Issues)
54+
|
55+
[@fcollonval](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Afcollonval+updated%3A2021-10-31..2023-11-08&type=Issues)
56+
|
57+
[@github-actions](https://github.com/search?q=repo%3Ajupyterlab-contrib%2Fjupyterlab-tour+involves%3Agithub-actions+updated%3A2021-10-31..2023-11-08&type=Issues)
3258

3359
<!-- <END NEW CHANGELOG ENTRY> -->

src/__tests__/plugin.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ISettingRegistry } from '@jupyterlab/settingregistry';
99
import { CommandRegistry } from '@lumino/commands';
1010
import { ReadonlyJSONObject } from '@lumino/coreutils';
1111
import { DocumentRegistry } from '@jupyterlab/docregistry';
12+
import { ServerConnection } from '@jupyterlab/services';
1213
import {
1314
CodeMirrorEditorFactory,
1415
CodeMirrorMimeTypeService,
@@ -34,7 +35,8 @@ function mockApp(): Partial<JupyterFrontEnd> {
3435
return {
3536
commands: new CommandRegistry(),
3637
restored: Promise.resolve(),
37-
docRegistry: new DocumentRegistry()
38+
docRegistry: new DocumentRegistry(),
39+
serviceManager: { serverSettings: ServerConnection.makeSettings() } as any
3840
};
3941
}
4042

src/plugin.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@ function activate(
5555
translator: ITranslator | null
5656
): ITourManager {
5757
const CONFIG_SECTION_NAME = corePlugin.id.replace(/[^\w]/g, '');
58-
const { commands } = app;
58+
const { commands, serviceManager } = app;
5959

6060
translator = translator ?? nullTranslator;
6161

6262
const restoreState = new PromiseDelegate<ITourState[]>();
6363
const configReady = ConfigSection.create({
64-
name: CONFIG_SECTION_NAME
64+
name: CONFIG_SECTION_NAME,
65+
serverSettings: serviceManager.serverSettings
6566
}).catch(error => {
6667
console.error('Failed to fetch state for jupyterlab-tour.', error);
6768
});

ui-tests/tests/notebook-tour.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ test('should run the notebook tour', async ({ page }) => {
2929

3030
const [notebookPage] = await Promise.all([
3131
page.waitForEvent('popup'),
32-
page.getByText('Notebook', { exact: true }).click()
32+
page.getByText('Python 3 (ipykernel)').click()
3333
]);
34-
await notebookPage.getByRole('button', { name: 'Select Kernel' }).click();
3534
await notebookPage.getByRole('button', { name: 'Start now' }).click();
3635
await notebookPage.getByLabel('Next', { exact: true }).click();
3736
await notebookPage.getByLabel('Next', { exact: true }).click();

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10668,11 +10668,11 @@ __metadata:
1066810668

1066910669
"typescript@patch:typescript@~5.0.4#~builtin<compat/typescript>":
1067010670
version: 5.0.4
10671-
resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=b5f058"
10671+
resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=85af82"
1067210672
bin:
1067310673
tsc: bin/tsc
1067410674
tsserver: bin/tsserver
10675-
checksum: d26b6ba97b6d163c55dbdffd9bbb4c211667ebebc743accfeb2c8c0154aace7afd097b51165a72a5bad2cf65a4612259344ff60f8e642362aa1695c760d303ac
10675+
checksum: bb309d320c59a26565fb3793dba550576ab861018ff3fd1b7fccabbe46ae4a35546bc45f342c0a0b6f265c801ccdf64ffd68f548f117ceb7f0eac4b805cd52a9
1067610676
languageName: node
1067710677
linkType: hard
1067810678

0 commit comments

Comments
 (0)