refactor: strengthen createSession URL assertion#857
Open
empiricalrun[bot] wants to merge 11 commits intomainfrom
Open
refactor: strengthen createSession URL assertion#857empiricalrun[bot] wants to merge 11 commits intomainfrom
empiricalrun[bot] wants to merge 11 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Identified that
createSession()intests/pages/sessions.tshad a loose URL check (/sessions/) after clicking "Create". This caused 9 test files to repeat a more specific URL assertion (/sessions/[^\/]+/) right after everycreateSession()call — a clear duplication.Change (1 helper modification)
Updated
createSessionintests/pages/sessions.tsto wait for the precise session detail URL:Cleanup (redundant assertions removed)
Removed the now-redundant follow-up URL checks from:
tests/tool-execution/session.spec.ts— 8 occurrencestests/rename-file-tool.spec.ts— 1 occurrenceThe 2 remaining
toHaveURL(/sessions\/[^\/]+/)calls intool-execution/session.spec.ts(line 160) andissues.spec.ts(line 148) are kept intentionally — they belong to custom session creation flows that don't usecreateSession().Test Results
✅ Verified with a passing test run: https://reports-r2.empirical.run/test-gen-chat-agent/1776401978258/index.html
PR created from session #120971
Updated at 2026-04-17 05:01:03.475 UTC