diff --git a/VERSION b/VERSION index 437459c..73462a5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.0 +2.5.1 diff --git a/adapters/e2e/README.md b/adapters/e2e/README.md index d22cc66..8725342 100644 --- a/adapters/e2e/README.md +++ b/adapters/e2e/README.md @@ -60,6 +60,10 @@ Save `--reporter json` output in `logs/` with the scenario ID. assignment in its viewer marked it submitted on the server. Before driving a flow on shared or seeded data, find out what opening, closing and navigating write, and use fixture accounts whose state may change. +- A URL assertion right after `app.open` can pass on the address the app is + about to redirect away from: expecting the opened URL passed in the trial + although the app redirected to another page. Wait for an element only the + settled screen shows, then assert the URL. - An agent step absorbs a renamed control and still passes; only the det locator catches that regression. Keep det as the gate. - A wrong expectation after a correct replay evicts the correct recording; diff --git a/adapters/e2e/templates/scenario.e2e.ts b/adapters/e2e/templates/scenario.e2e.ts index 2deff6c..a62d97b 100644 --- a/adapters/e2e/templates/scenario.e2e.ts +++ b/adapters/e2e/templates/scenario.e2e.ts @@ -7,6 +7,9 @@ import { expect } from 'e2e'; describe('S1 ', { session: 'user', tags: ['S1'] }, () => { test('det', { tags: ['det'] }, async ({ app, browser }) => { await app.open('/start'); + // Wait for something only the settled screen shows before any URL check: right after + // open, toHaveURL can match the address the app is about to redirect away from. + await expect(browser.locator('nav')).toBeVisible(); await browser.locator('nav >> text=Reports').tap(); await expect(browser).toHaveURL('/reports'); // A request the change must (or must not) send: record it, then assert. diff --git a/log/changelog-v2.5.1.md b/log/changelog-v2.5.1.md new file mode 100644 index 0000000..3617656 --- /dev/null +++ b/log/changelog-v2.5.1.md @@ -0,0 +1,15 @@ +# v2.5.1 — URL assertions wait for the settled screen + +A negative control run after v2.5.0 found a false pass in the e2e adapter's +deterministic layer. Documentation and template only; no script change. + +## Changes + +- **URL checks after a redirect.** A test that opened `/a` and asserted + `toHaveURL('/a')` passed, although the app redirects `/a` to `/b`: the + assertion matched the address before the client-side redirect. The same + assertion after waiting for a rendered element failed as it should, and + the settled path was `/b`. `adapters/e2e/README.md` lists this under + "Limits seen in use", and `templates/scenario.e2e.ts` waits for a settled + element before its URL check. A test that expects the redirect target was + unaffected: `toHaveURL` waits until it matches.