Repository navigation
test: assert onConfigure blocks invalid app install params [] - #11420
Open
Jared Jolton (jjolton-contentful) wants to merge 1 commit into
Open
Jared Jolton (jjolton-contentful) wants to merge 1 commit into
Jared Jolton (jjolton-contentful) wants to merge 1 commit into
Conversation
Strengthen bedrock-content-generator and braze config specs so invalid installation input must resolve to false, not only show a toast or touch an un-awaited Promise. Co-authored-by: Cursor <cursoragent@cursor.com>
Jared Jolton (jjolton-contentful)
requested review from
a team
as code owners
November 5, 2026 18:13
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.
Summary
useSaveConfigHandler.spec.tsx): When validation fails, assertonConfigureresolves tofalseand the notifier shows the error. The prior spec read.parameterson an un-awaited Promise, so a broken save path could stay green.ConfigScreen.spec.tsx): On invalid or missing install fields, assertonConfigurereturnsfalsein addition to the error toast. Without that, the handler could return install parameters while the spec still passed.Test-only changes; no production code.
Rationale
Both specs guard app installation: invalid credentials or missing required fields must block save in Contentful. Stricter assertions catch regressions during refactors without changing runtime behavior.
Test plan
cd apps/bedrock-content-generator && npx vitest --run src/hooks/config/useSaveConfigHandler.spec.tsxcd apps/braze && npm test -- --run test/locations/ConfigScreen.spec.tsxfalseon validation errors → invalid-params test fails onresolves.toBe(false). Braze — same mutation on validation branch → three negative install tests fail ontoBe(false).