From c6db27d850ecf195c21c2f5017b0925502c2bdbb Mon Sep 17 00:00:00 2001 From: cskwork <76669236+cskwork@users.noreply.github.com> Date: Wed, 14 Oct 2026 10:33:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20e2e=20=EC=96=B4=EB=8C=91=ED=84=B0=20URL?= =?UTF-8?q?=20=EB=8B=A8=EC=96=B8=EC=9D=80=20=ED=99=94=EB=A9=B4=20=EC=95=88?= =?UTF-8?q?=EC=A0=95=20=ED=9B=84=EC=97=90=20=E2=80=94=20=EB=A6=AC=EB=8B=A4?= =?UTF-8?q?=EC=9D=B4=EB=A0=89=ED=8A=B8=20=EC=A0=84=20=EC=A3=BC=EC=86=8C=20?= =?UTF-8?q?=EA=B1=B0=EC=A7=93=20=ED=86=B5=EA=B3=BC=20(v2.5.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README Limits에 리다이렉트 전 주소로 toHaveURL이 통과하는 사례 추가 - scenario.e2e.ts det 예시가 URL 확인 전 안정 화면 요소를 기다리도록 --- VERSION | 2 +- adapters/e2e/README.md | 4 ++++ adapters/e2e/templates/scenario.e2e.ts | 3 +++ log/changelog-v2.5.1.md | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 log/changelog-v2.5.1.md 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.