@@ -346,6 +346,11 @@ describe('isCriticalPath', () => {
346346 expect ( isCriticalPath ( 'user_settings.password_settings.min_length' ) ) . toBe ( true ) ;
347347 } ) ;
348348
349+ it ( 'flags captcha_enabled but not captcha_widget_type' , ( ) => {
350+ expect ( isCriticalPath ( 'user_settings.sign_up.captcha_enabled' ) ) . toBe ( true ) ;
351+ expect ( isCriticalPath ( 'user_settings.sign_up.captcha_widget_type' ) ) . toBe ( false ) ;
352+ } ) ;
353+
349354 it ( 'does not flag cosmetic / non-critical paths' , ( ) => {
350355 expect ( isCriticalPath ( 'auth_config.single_session_mode' ) ) . toBe ( false ) ;
351356 expect ( isCriticalPath ( 'organization_settings.enabled' ) ) . toBe ( false ) ;
@@ -389,6 +394,16 @@ describe('classifyMismatches', () => {
389394 const accepted = [ { path : / ^ u s e r _ s e t t i n g s \. p a s s w o r d _ s e t t i n g s \. / , reason : 'x' } ] ;
390395 expect ( classifyMismatches ( 'any' , mismatches , accepted ) . blocking ) . toHaveLength ( 0 ) ;
391396 } ) ;
397+
398+ it ( 'blocks on captcha_enabled drift but not captcha_widget_type' , ( ) => {
399+ const mismatches = [
400+ { path : 'user_settings.sign_up.captcha_enabled' , prod : false , staging : true } ,
401+ { path : 'user_settings.sign_up.captcha_widget_type' , prod : 'smart' , staging : '' } ,
402+ ] ;
403+ const { blocking, informational } = classifyMismatches ( 'with-legal-consent' , mismatches ) ;
404+ expect ( blocking . map ( m => m . path ) ) . toEqual ( [ 'user_settings.sign_up.captcha_enabled' ] ) ;
405+ expect ( informational . map ( m => m . path ) ) . toEqual ( [ 'user_settings.sign_up.captcha_widget_type' ] ) ;
406+ } ) ;
392407} ) ;
393408
394409// ── fetchEnvironment ────────────────────────────────────────────────────────
0 commit comments