RedHatQE / RedHatQE/widgetastic.core
locator arg placement inconsistency across widgets
@izapolsk is already working on this.
Since Dec 5, 2018.
- Dominant language
- Python
- Stars
- 37
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
Some of widgets are accepting locator arg as first arg, e.g. Text(), Table(), Select(), etc.
Others (usually inputs) - as a third or forth, the first one for them is name. Few examples are TextInput(), Checkbox().
This brings some confusion, as sometimes i have to specify locator= and sometimes i don't:
class MyView(View):
table = Table('//locator')
selected = Checkbox(locator='//locator')
flash = FlashMessages('//locator')
file = FileInput(locator='//locator')
message = Text('//locator')
input = TextInput(locator='//locator')
If i knew locator is always third arg - i'd always define my widgets like Text(locator='//locator'). If i knew it's always first - i'd never have to specify locator= at all. Current state of things just provokes to make common mistake and introduces some extra time for debugging :)
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.
Assessment
This issue has not been assessed yet.