codeforboston / codeforboston/cliff-effects

Comprehensive tests for `ManagedNumberField`

Open
#639 4 comments 0 reactions 0 assignees View on GitHub
testing
Dominant language
JavaScript
Stars
30
Forks
62
PR merge metrics
No merged PRs in 30d

Description

This is what I've got so far for `` desired behavior.

**Valid number:** A positive decimal or whole number, 0, or a blank field.
**Permitted invalid input:** Numbers with multiple decimal points.

- [ ] User clicks on field with '0' in it:
- [ ] Field goes blank, ready for input
- [ ] User clicks on field with valid number in it:
- [ ] Nothing changes
- [ ] User types a valid number in the field:
- [ ] Typing shows up as entered
- [ ] User types a valid number in the field and then leaves the field:
- [ ] Valid value is shown as decimal value
- [ ] (Valid value is stored permanently)
- [ ] User types an INVALID number in the field:
- [ ] Typing shows up as entered
- [ ] Field gives 'invalid value' feedback (turns red)
- [ ] User types in an INVALID number and then leaves the field
- [ ] The last valid field value previously entered is shown (last valid value typed, or last valid value left there?)
- [ ] (Invalid value is discarded)
- [ ] User types 0 in a field:
- [ ] Typing shows up as entered
- [ ] User deletes all items in the field
- [ ] Input does not turn red
- [ ] User deletes all numbers in the field then leaves the field
- [ ] Field shows '0'
- [ ] (0 is stored permanently as the value)

Which of these are done already?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the ManagedNumberField component and any existing tests for it. Compare the current behavior with each checklist case, first resolving the open questions about invalid input and the last valid value. Done means the agreed behavior is covered comprehensively and the tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.