refactor: extract navigateToApiKeys helper to pages/settings.ts#813
Open
empiricalrun[bot] wants to merge 4 commits intomainfrom
Open
refactor: extract navigateToApiKeys helper to pages/settings.ts#813empiricalrun[bot] wants to merge 4 commits intomainfrom
empiricalrun[bot] wants to merge 4 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 the 3-step navigation pattern to the API Keys settings page was copy-pasted 15 times in
api-keys.spec.ts(and once more intemp-api-keys-cleanup.spec.ts):Changes
Created
tests/pages/settings.ts— new page helper file with anavigateToApiKeys(page)function, following the same pattern as existing helpers intests/pages/(e.g.,navigateToSessionsinsessions.ts).Updated
tests/api-keys.spec.ts— replaced all 15 occurrences of the 3-line navigation block withawait navigateToApiKeys(page)and added the import.Updated
tests/temp-api-keys-cleanup.spec.ts— replaced the 1 occurrence similarly.Test run
The refactored test was verified to pass:
API Keys > create new api key and make API request— ReportPR created from session #110928
Updated at 2026-04-02 04:56:30.790 UTC