Commit 660dc56
authored
fix(site/src/pages/AISettingsPage): match Formik onSubmit args in Bedrock story (#27211)
> 🤖 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:
```ts
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.1 parent db643c8 commit 660dc56
1 file changed
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
0 commit comments