Repository navigation
fix(mocks): mock every endpoint the app calls and keep changes for the session - #337
Merged
Merged
Conversation
…e session Ten endpoints had no mock, and several mocks used paths that ts-client does not call (metadata, OAuth apps, system functions and exec, clusters). Metadata, start and stop, system modules and system triggers were not saved, so a reload lost them. All handlers now use one store that saves to session storage on every change. Requests that have no mock write a warning to the console. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CodeQL flagged mock API keys, OAuth secrets and webhook secrets made with Math.random(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
In mock mode, many pages had no data or failed to load. Changes made in the UI were also lost after a reload. Ten endpoints had no mock. Several other mocks used paths that ts-client does not call:
doorkeeper/applications, but ts-client callsoauth_apps./metadata/:id. The mock only had/systems/:id/metadataand similar./clusters, but ts-client calls/cluster.Metadata, start/stop, system modules and system triggers were not saved at all.
Fix
common.mock.tssaves to session storage on every change. Every handler uses it now, so all changes stay after a reload. Seed data is saved the first time it loads, so random seed values stay the same for the session.groups/currentremote_*systems/:id/settingsso it no longer crashes when a system has no settings.system-control.mock.tsmocks module functions, exec, state and the websocket bindings, so the module "connected" dots and trigger state work.[mock] No handler for …to the console.Two e2e seeds use the new storage keys:
api_staff_v1_tenantsandapi_engine_v2_api_keys.Testing
chromiumandmobile-chromee2e suites pass (161 tests).Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code