luckyframework / luckyframework/lucky_flow
Raise error if there are multiple matches
- Dominant language
- Crystal
- Stars
- 55
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Similar to AmbiguousMatchError in Capybara
If you do `click "@something"` and there are 2 or more elements that match, raise `LuckyFlow::AmbiguousMatchError`
The error message should give pointers on what's going on and how to resolve it. For example:
```
There were X matches for "#{the_selector}" so LuckyFlow isn't sure which one you meant.
Try this...
* Use a more specific selector: ".my-wrapper-element #{the_selector}"
```
Also, add a `click_first` method to just click the first one
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the click entry point and inspect how matching and existing errors are handled, using Capybara's AmbiguousMatchError as the stated reference. Add coverage for multiple matches, the suggested error guidance, and click_first; done when ambiguous clicks raise the named error and first-match clicks are supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100