🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

fix(site/src/pages/AISettingsPage): match Formik onSubmit args in Bedrock story - #27211

Merged
mtojek merged 1 commit into
release/2.34from
fix/bedrock-provider-form-story-2.34
Jul 14, 2026
Merged

fix(site/src/pages/AISettingsPage): match Formik onSubmit args in Bedrock story#27211
mtojek merged 1 commit into
release/2.34from
fix/bedrock-provider-form-story-2.34

Conversation

@jakehwll

Copy link
Copy Markdown
Contributor

🤖 This PR was written by Coder Agents on behalf of Jake Howell.

Test-only fix for release/2.34.

Problem

The AddBedrockWithoutStaticCredentials interaction test in ProviderForm.stories.tsx asserts:

expect(args.onSubmit).toHaveBeenCalledWith(expect.objectContaining({ type: "bedrock", ... }))

Formik invokes onSubmit(values, formikHelpers) with two arguments, so toHaveBeenCalledWith never matches and the storybook/Chromatic interaction test fails deterministically. This breaks storybook CI for any PR targeting release/2.34 (e.g. the #27083 backport in #27144).

main and release/2.35 don't hit this because #25848 refactored the story there to forward only values to 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: ProviderForm storybook stories (13) pass; lint clean.

…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.
@github-actions

This comment was marked as outdated.

@jakehwll jakehwll changed the title 🤖 fix(site/src/pages/AISettingsPage): match Formik onSubmit args in Bedrock story fix(site/src/pages/AISettingsPage): match Formik onSubmit args in Bedrock story Jul 14, 2026
@jakehwll
jakehwll marked this pull request as ready for review July 14, 2026 03:48
@mtojek
mtojek self-requested a review July 14, 2026 07:11
@mtojek
mtojek merged commit 660dc56 into release/2.34 Jul 14, 2026
58 of 61 checks passed
@mtojek
mtojek deleted the fix/bedrock-provider-form-story-2.34 branch July 14, 2026 07:12
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants