mirror of
https://github.com/penpot/penpot.git
synced 2026-11-05 01:20:38 +00:00
* ✨ Add unit tests for the token form and combobox helpers Several helpers of the token forms and the token value combobox were already pure but had no tests. Cover the reference under the cursor, the order of the token tree, moving through the combobox options, the shadow and typography form values and their validation, which value a form tab validates, and that a token import needs a json file. Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com> * ✨ Test the shadow and typography form rules Add tests for the shadow and typography form schemas: a negative blur is rejected, a negative spread and a blank blur or spread are accepted, every shadow needs its offsets and color, a line height needs a font size, and a token can't reference itself. A typography token submitted without any field is rejected. They replace the tests of the validator wrappers, the combobox focus order and the import file check. Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com> --------- Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>