Weight values
Issues Addressed
The following three related issues were worked on, enabling incremental development using TDD:
#244: Accept decimal values with dot or comma in the weight field.
#200: Prevent zero (0) as a valid weight input.
#242: Fix incorrect error message shown in the weight field.
Implemented Features
Support for decimal input using . or , in the weight field.
Validation to reject zero as an invalid weight.
Correct and specific error messages for invalid weight entries.
TDD Cycles Summary
Cycle 1 (#242): Test created to validate proper error message "Enter correct weight". Code adjusted to show the correct message.
Cycle 2 (#200): Test added to ensure 0 is rejected as input. Validation added to block values ≤ 0 and return a proper error message.
Cycle 3 (#200): Test created to check for a specific error message when input is 0. Code updated to show a custom message for zero.
Cycle 4 (#244): Test implemented to allow inputs like 70.5 or 70,5. Support for both comma and dot decimals was added and validated.