fix(site/src/pages/AISettingsPage): match Formik onSubmit args in Bedrock story - #27211
Merged
Merged
Conversation
…edrock story The AddBedrockWithoutStaticCredentials interaction test asserted onSubmit was called with a single objectContaining argument, but Formik invokes onSubmit as (values, formikHelpers). The trailing helpers bag made toHaveBeenCalledWith never match, failing the storybook test deterministically on release/2.34 and breaking storybook CI for any PR targeting the branch. Match the second argument with expect.anything() so the assertion reflects Formik's actual call signature.
This comment was marked as outdated.
This comment was marked as outdated.
jakehwll
marked this pull request as ready for review
July 14, 2026 03:48
mtojek
self-requested a review
July 14, 2026 07:11
mtojek
approved these changes
Jul 14, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Test-only fix for
release/2.34.Problem
The
AddBedrockWithoutStaticCredentialsinteraction test inProviderForm.stories.tsxasserts:Formik invokes
onSubmit(values, formikHelpers)with two arguments, sotoHaveBeenCalledWithnever matches and the storybook/Chromatic interaction test fails deterministically. This breaks storybook CI for any PR targetingrelease/2.34(e.g. the #27083 backport in #27144).mainandrelease/2.35don't hit this because #25848 refactored the story there to forward onlyvaluesto the spy; that refactor was never backported to 2.34.Fix
Match the second argument with
expect.anything()so the assertion reflects Formik's actual call signature. Test-only, minimal, no product code change.Verified on 2.34:
ProviderFormstorybook stories (13) pass; lint clean.