Update README
This commit is contained in:
15
README.md
15
README.md
@@ -124,6 +124,9 @@ tests/
|
|||||||
playwright.config.js # Parallel by default; serial when --headed or --slow
|
playwright.config.js # Parallel by default; serial when --headed or --slow
|
||||||
global-setup.js # Creates firmware symlink once before all tests
|
global-setup.js # Creates firmware symlink once before all tests
|
||||||
run-e2e.sh
|
run-e2e.sh
|
||||||
|
screenshots.mjs # Captures screenshots of every wizard step
|
||||||
|
screenshots.config.js # Mobile + desktop project config for screenshots
|
||||||
|
run-screenshots.sh # Runs screenshot capture
|
||||||
|
|
||||||
# Root scripts
|
# Root scripts
|
||||||
test.sh # Runs all tests (WASM + E2E)
|
test.sh # Runs all tests (WASM + E2E)
|
||||||
@@ -268,6 +271,17 @@ Extra Playwright arguments can be passed after `--`:
|
|||||||
./run-e2e.sh --headed --slow -- --grep "NickelMenu"
|
./run-e2e.sh --headed --slow -- --grep "NickelMenu"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Screenshots
|
||||||
|
|
||||||
|
Capture screenshots of every wizard step for visual review (mobile + desktop):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd tests/e2e
|
||||||
|
./run-screenshots.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Output is saved to `tests/e2e/screenshots/mobile/` and `tests/e2e/screenshots/desktop/` (gitignored). The script uses a separate Playwright config (`screenshots.config.js`) with two projects: mobile (393×852, 3× DPI) and desktop (1280×900, 3× DPI). Screenshots cover the full wizard flow including device connection, mode selection, NickelMenu configuration, custom patches, error states, dialogs, and the feedback widget.
|
||||||
|
|
||||||
### WASM integration test
|
### WASM integration test
|
||||||
|
|
||||||
Calls `patchFirmware()` directly in Go/WASM via Node.js:
|
Calls `patchFirmware()` directly in Go/WASM via Node.js:
|
||||||
@@ -295,6 +309,7 @@ The hosted version at [kp.nicoverbruggen.be](https://kp.nicoverbruggen.be) uses
|
|||||||
- **nm-simplified-home** — whether simplified home screen features were selected
|
- **nm-simplified-home** — whether simplified home screen features were selected
|
||||||
- **nm-basic-tabs** — whether the basic tab bar option was selected
|
- **nm-basic-tabs** — whether the basic tab bar option was selected
|
||||||
- **flow-end** — how the flow ended (write to device or download, for both NickelMenu and custom patches)
|
- **flow-end** — how the flow ended (write to device or download, for both NickelMenu and custom patches)
|
||||||
|
- **feedback** — thumbs up/down response to "Did you find it easy to use this wizard?" shown on done screens
|
||||||
|
|
||||||
Analytics are disabled for local and self-hosted installs. They activate only when `UMAMI_WEBSITE_ID` and `UMAMI_SCRIPT_URL` environment variables are set on the server. To test the analytics UI locally without sending any data:
|
Analytics are disabled for local and self-hosted installs. They activate only when `UMAMI_WEBSITE_ID` and `UMAMI_SCRIPT_URL` environment variables are set on the server. To test the analytics UI locally without sending any data:
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,40 @@ test('capture all steps', async ({ page }, testInfo) => {
|
|||||||
await shot(page, '10-patches-selected', testInfo);
|
await shot(page, '10-patches-selected', testInfo);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('nickelmenu done with feedback', async ({ page }, testInfo) => {
|
||||||
|
// Enable analytics so the feedback widget appears
|
||||||
|
await page.addInitScript(() => { window.__ANALYTICS_ENABLED = true; });
|
||||||
|
|
||||||
|
await page.goto('/');
|
||||||
|
await dismissMobileModal(page);
|
||||||
|
await injectMockDevice(page);
|
||||||
|
|
||||||
|
// Connect device → mode selection → NickelMenu
|
||||||
|
await page.click('#btn-connect');
|
||||||
|
await page.click('#btn-connect-ready');
|
||||||
|
await expect(page.locator('#step-device')).not.toBeHidden();
|
||||||
|
await page.click('#btn-device-next');
|
||||||
|
await page.click('input[name="mode"][value="nickelmenu"]');
|
||||||
|
await page.click('#btn-mode-next');
|
||||||
|
|
||||||
|
// NickelMenu-only → review → write to device
|
||||||
|
await page.click('input[value="nickelmenu-only"]');
|
||||||
|
await page.click('#btn-nm-next');
|
||||||
|
await expect(page.locator('#step-nm-review')).not.toBeHidden();
|
||||||
|
await page.click('#btn-nm-write');
|
||||||
|
|
||||||
|
// Wait for done step
|
||||||
|
const nmDone = page.locator('#step-nm-done');
|
||||||
|
await expect(nmDone).not.toBeHidden();
|
||||||
|
await expect(nmDone.locator('.feedback')).toBeVisible();
|
||||||
|
await shot(page, '15-done-feedback', testInfo);
|
||||||
|
|
||||||
|
// Click thumbs up and capture the thank-you state
|
||||||
|
await nmDone.locator('.feedback-btn[data-vote="up"]').click();
|
||||||
|
await expect(nmDone.locator('.feedback-thanks')).toBeVisible();
|
||||||
|
await shot(page, '16-done-feedback-voted', testInfo);
|
||||||
|
});
|
||||||
|
|
||||||
test('incompatible firmware', async ({ page }, testInfo) => {
|
test('incompatible firmware', async ({ page }, testInfo) => {
|
||||||
await page.goto('/');
|
await page.goto('/');
|
||||||
await dismissMobileModal(page);
|
await dismissMobileModal(page);
|
||||||
|
|||||||
Reference in New Issue
Block a user