thefrontside / thefrontside/interactors
Should Checkbox `checked` filter also exclude any indeterminate checkboxes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 2
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
Checkbox has two different flags checked and indeterminate both can be in two states
-
checked=falseandindeterminate=false

-
checked=trueandindeterminate=false

-
checked=falseandindeterminate=true

-
checked=trueandindeterminate=true

As you can see the indeterminate has higher priority for UI view. And it doesn't matter if a checkbox has checked or not when indeterminate is true. User sees only a checkbox in an indeterminate state.
For now, Checkbox interactor doesn't check the indeterminate state for the checked filter. And if user has the checkbox in forth case the Checkbox({ checked: true }).exists() doesn't throw an exception. But for a real user, who works in a browser, the view will be different, he sees only a checkbox in an indeterminate state.
Should we change Checkbox interactor's checked filter API?
There are possible variants:
- 👀
checked: (element) => element.checked && !element.indeterminate - 👍
checked: (element) => element.indeterminate ? 'indeterminate' : element.checked
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Checkbox interactor's checked filter and inspect how it represents the checked and indeterminate states. Compare the two API variants described in the issue, then identify the existing Checkbox interactor tests or entry points that would need to define the intended behavior. Done means the API decision is implemented and the fourth state no longer matches checked if that is the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100