Conversation
The bool case in fillParameters blindly toggled the switch with a single click. If dynamic parameters hydrated after the click and reset the switch state, the final value was wrong, causing the 'overwrite default parameters' test to flake. Mirror the retry pattern already used for string/number parameters: read the current aria-checked state, click only if it differs from the desired value, then verify and retry up to 3 times.
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.
Problem
The e2e test
create workspace and overwrite default parameterswas flaking becausefillParametersblindly toggled the boolean switch with a single click. If dynamic parameters hydrated after the click and reset the switch state, the final value was wrong -- the verification step would find the checkbox still checked (true) when it expectedfalse.Root Cause
The
boolcase infillParameters(helpers.ts) did:This toggle-style interaction is inherently racy: it assumes the switch has already rendered with its default value before the click. Dynamic parameters can hydrate after initial render and overwrite the toggled state, which is exactly the same class of bug that was already fixed for
string/numberparameters with a retry loop.Fix
Mirror the retry pattern already used for string/number parameters:
aria-checkedattribute to determine switch state