Ma77Ball opened a new pull request, #4991:
URL: https://github.com/apache/texera/pull/4991

   ### What changes were proposed in this PR?
   
    Replaces the old all-commented-out preset.service.spec.ts with a real, 
runnable Vitest test suite for PresetService, and re-enables the file in 
angular.json and tsconfig.spec.json (it was previously excluded from the 
build).  
      
     The new suite uses fake UserConfigService and NzMessageService providers 
and covers:                                                                     
                                                                         
     - Preset I/O: applyPresetStream / savePresetsStream event emission; 
savePresets routing non-empty lists to userConfig.set and empty lists to 
userConfig.delete; default vs. suppressed save toast; createPreset / 
updatePreset /
     deletePreset / getPresets happy paths and error cases.                     
                                                                                
                                                                       
     - Operator preset application: applyPreset is a no-op for non-operator 
types and unknown operator IDs; valid presets merge into operator properties; 
invalid presets leave properties unchanged.
     - Validation: isValidOperatorPreset and isValidNewOperatorPreset 
accept/reject the expected shapes.                                              
                                                                                
 
     - Static helpers: getOperatorPresetSchema, getOperatorPreset, and 
filterOperatorPresetProperties.                                                 
                                                                                
                                                                                
                                                                                
                                                                       
     Also registers the project's custom "enable-presets" Ajv keyword as a 
no-op in the test file so Ajv 8 strict mode doesn't reject the operator schemas 
at compile time.  
   
   ### Any related issues, documentation, or discussions?
   Closes: #4968
   
   ### Was this PR authored or co-authored using generative AI tooling?
   Co-Authored with Claude Opus 4.7 in compliance with ASF


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to