Create stg classes#30
Conversation
RJO23
commented
Apr 2, 2026
- Cleaned text.
- Wrote standard, unit and accepted values tests.
- Calculated class duration.
|
Can you link the ticket please? |
rosie-taylor
left a comment
There was a problem hiding this comment.
Could you add a unit test to this? Something that double checks edge cases (e.g. for duration)
| - name: duration_minutes | ||
| description: "Calculated length of the class in minutes." | ||
| tests: | ||
| - not_null No newline at end of file |
There was a problem hiding this comment.
are there accepted values for this? like 30, 45 and 60? maybe check
…d data types to avoid conflicts. Also added two missing class categories.
EmilyYoung26
left a comment
There was a problem hiding this comment.
Looks nice and clean and I can see you've made all the changes and added a singular test similar to my one. Nice job!
| - accepted_values: | ||
| arguments: | ||
| values: ['Boxing Basics', 'Boxing Conditioning', 'Evening Boxing', 'Express HIIT', 'Flow Yoga', 'HIIT Blast', 'Lunch Yoga', 'Mobility Reset', 'Morning Muay Thai', 'Morning Pilates', 'Muay Thai Advanced', 'Muay Thai Fundamentals', 'Pilates Core', 'Restore Yoga', 'Stretch & Recover'] | ||
| values: ['Express Hiit', 'Hiit Blast', 'Boxing Basics', 'Boxing Conditioning', 'Evening Boxing', 'Express HIIT', 'Flow Yoga', 'HIIT Blast', 'Lunch Yoga', 'Mobility Reset', 'Morning Muay Thai', 'Morning Pilates', 'Muay Thai Advanced', 'Muay Thai Fundamentals', 'Pilates Core', 'Restore Yoga', 'Stretch & Recover'] |
There was a problem hiding this comment.
The class_name accepted values should match the actual cleaned output of initcap(trim(class_name)). Right now it looks like a mix of raw and cleaned values, especially around HIIT/Hiit. For example, because initcap would turn:
HIIT Blast into Hiit Blast
Express HIIT into Express Hiit
We shouldnt have the raw version in the accepted values as we are checking they turned into the clean version.
harjeetkalsi
left a comment
There was a problem hiding this comment.
This is looking good, just a few changes and things to think about.
EmilyYoung26
left a comment
There was a problem hiding this comment.
Looks nice and clean, happy to approve! Great job 😄