Skip to content

Commit ac558ae

Browse files
authored
Add information on how examples are tested
1 parent 784a496 commit ac558ae

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
[![Github Actions Status](https://github.com/jupyterlab/extension-examples/workflows/CI/badge.svg)](https://github.com/jupyterlab/extension-examples/actions?query=workflow%3ACI)
44
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterlab/extension-examples/master?urlpath=lab)
55

6+
1. [Goal](#tldr)
7+
2. [Develop by Examples](#develop-by-examples)
8+
1. [Commands](#commands)
9+
2. [Command Palette](#command-palette)
10+
3. [Context Menu](#context-menu)
11+
4. [Custom Log Console](#custom-log-console)
12+
5. [Datagrid](#datagrid)
13+
6. _[Hello World](#hello-world)_
14+
7. [Kernel Messaging](#kernel-messaging)
15+
8. [Kernel Output](#kernel-output)
16+
9. [Launcher](#launcher)
17+
10. [Log Messages](#log-messages)
18+
11. [Main Menu](#main-menu)
19+
12. [React Widget](#react-widget)
20+
13. _[Server Hello World](#server-hello-world)_
21+
14. [Settings](#settings)
22+
15. [Signals](#signals)
23+
16. [State](#state)
24+
17. [Toolbar Item](#toolbar-item)
25+
18. [Widgets](#widgets)
26+
3. [Prerequisites](#prerequisites)
27+
4. [Develop and Use the Examples](#develop-and-use-the-examples)
28+
5. [Test the Examples](#test-the-examples)
29+
6. [Install a Published Extension](#install-a-published-extension)
30+
7. [About JupyterLab](#about-jupyterlab)
31+
8. [Credits](#credits)
32+
9. [Community Guidelines and Code of Conduct](#community-guidelines-and-code-of-conduct)
33+
634
## TL;DR
735

836
The goal of this repository is to show how to develop extensions for [JupyterLab](https://github.com/jupyterlab/jupyterlab), presented as short tutorial series.
@@ -178,7 +206,7 @@ Use State persistence in an extension.
178206

179207
[![State](state/preview.gif)](state)
180208

181-
### [Toolbar item](toolbar-button)
209+
### [Toolbar Item](toolbar-button)
182210

183211
Add a new button to the notebook toolbar.
184212

@@ -275,6 +303,20 @@ and you can refresh your browser to see your changes.
275303

276304
We are using [embedme](https://github.com/zakhenry/embedme) to embed code snippets into the markdown READMEs. If you make changes to the source code, ensure you update the README and run `jlpm embedme` from the root of the repository to regenerate the READMEs.
277305

306+
## Test the Examples
307+
308+
The examples are automatically tested for:
309+
310+
- Homogeneous configuration:
311+
Configuration files are compared to the reference ones of the _hello-world_ example
312+
- TypeScript code lint
313+
- Installation in JupyterLab:
314+
The installation is checked by listing the installed extension and running JupyterLab with the helper `python -m jupyterlab.browser_check`
315+
- Integration test:
316+
Those tests are emulating user action in JupyterLab to check the extension is behaving as expected.
317+
The tests are defined in the `ui-tests` subfolder within each example.
318+
This is possible thanks to a tool called [playwright](https://playwright.dev/).
319+
278320
## Install a Published Extension
279321

280322
Once your extension is published on [pypi.org](https://pypi.org/) (outside of this scope), you can install it

0 commit comments

Comments
 (0)