You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains automated tests for JupyterLab Desktop using Playwright.
3
+
This directory contains screenshots generated by Playwright tests that replicate the screenshots shown in the documentation.
4
4
5
-
## Test Structure
5
+
## Structure
6
6
7
-
-`welcome-screen.spec.ts` - Tests for the welcome screen and basic app launch
8
-
-`electron-dialogs.spec.ts` - Tests for capturing various Electron dialogs
9
-
-`app-states.spec.ts` - Tests for capturing different application states
10
-
-`helpers/` - Helper utilities for testing
11
-
-`snapshots/` - Generated screenshots (excluded from git)
7
+
The tests capture the following screenshots that correspond to the documentation:
12
8
13
-
## Running Tests
14
-
15
-
```bash
16
-
# Run all tests
17
-
yarn test
9
+
-`welcome-page.png` - Captures the welcome page interface (corresponds to `media/welcome-page.png`)
10
+
-`start-session.png` - Captures the start session controls (corresponds to `media/start-session.png`)
11
+
-`recent-sessions.png` - Captures the recent sessions interface (corresponds to `media/recent-sessions.png`)
12
+
-`desktop-app-frame.png` - Captures the main desktop app frame (corresponds to `media/desktop-app-frame.png`)
13
+
-`python-env-status.png` - Captures the Python environment status (corresponds to `media/python-env-status.png`)
14
+
-`start-session-connect.png` - Captures the connect to server interface (corresponds to `media/start-session-connect.png`)
18
15
19
-
# Run tests in headed mode (with visible browser)
20
-
yarn test:headed
21
-
22
-
# Run tests in debug mode
23
-
yarn test:debug
24
-
```
16
+
## Running Tests
25
17
26
-
## Test Configuration
18
+
To generate the screenshots:
27
19
28
-
Tests are configured via `playwright.config.ts` in the root directory.
20
+
1. First build the application:
21
+
```bash
22
+
yarn build
23
+
```
29
24
30
-
## CI Integration
25
+
2. Run the tests:
26
+
```bash
27
+
yarn test
28
+
```
31
29
32
-
Tests run automatically in CI via `.github/workflows/test.yml` and generate screenshots that are uploaded as artifacts.
30
+
The tests wait for specific UI elements to be ready instead of using arbitrary timeouts, ensuring consistent screenshot capture.
33
31
34
-
## Requirements
32
+
## Note
35
33
36
-
- Electron app must be built before running tests (`yarn build`)
37
-
- Tests require a virtual display in headless environments (xvfb)
38
-
- Screenshots are captured for visual regression testing
34
+
These screenshots are committed to git to track visual changes over time. They serve as both test artifacts and visual documentation of the application's interface.
0 commit comments