From 87e78fcdf646f9894f65747e066025f9b8168010 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Mon, 23 Mar 2026 21:35:26 +0100 Subject: [PATCH] Test for back button --- .gitignore | 1 + tests/e2e/integration.spec.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 141b98c..64a6232 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ web/src/readerly/ # Build output web/dist/ +web/test-results/ # Node web/node_modules/ diff --git a/tests/e2e/integration.spec.js b/tests/e2e/integration.spec.js index d1a687d..1126a20 100644 --- a/tests/e2e/integration.spec.js +++ b/tests/e2e/integration.spec.js @@ -756,9 +756,14 @@ test.describe('Custom patches', () => { await expect(page.locator('#device-status')).toContainText('NickelMenu does not support it'); await expect(page.locator('#device-status')).toHaveClass(/error/); - // Continue and restore buttons should be hidden + // Continue and restore buttons should be hidden, but Back should be visible await expect(page.locator('#btn-device-next')).toBeHidden(); await expect(page.locator('#btn-device-restore')).toBeHidden(); + await expect(page.locator('#btn-device-back')).toBeVisible(); + + // Back should return to connect step + await page.click('#btn-device-back'); + await expect(page.locator('#step-connect')).not.toBeHidden(); }); test('with device — unknown model shows warning and requires checkbox', async ({ page }) => {