Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker.year_pick.select results in ValueError #125

Closed
mshriver opened this issue Nov 3, 2020 · 0 comments · Fixed by #127
Closed

Datepicker.year_pick.select results in ValueError #125

mshriver opened this issue Nov 3, 2020 · 0 comments · Fixed by #127
Labels

Comments

@mshriver
Copy link
Collaborator

mshriver commented Nov 3, 2020

    def test_bootstrap_date_picker(browser):
        <...>
        # `fill` and `read` with current date
        today_date = datetime.now()
>       view.dp_readonly.fill(today_date)

testing/test_date_picker.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.tox/py36/lib/python3.6/site-packages/widgetastic/log.py:115: in wrapped
    result = f(self, *args, **kwargs)
.tox/py36/lib/python3.6/site-packages/widgetastic/widget/base.py:30: in wrapped
    return method(self, Fillable.coerce(value), *args, **kwargs)
.tox/py36/lib/python3.6/site-packages/widgetastic_patternfly/__init__.py:2060: in fill
    self.year_pick.select(value=value.year)
.tox/py36/lib/python3.6/site-packages/widgetastic/widget/base.py:67: in wrapped
    return method(self, *new_args, **new_kwargs)
.tox/py36/lib/python3.6/site-packages/widgetastic_patternfly/__init__.py:2018: in select
    start_yr, end_yr = [int(item) for item in self.datepicker_switch.read().split('-')]

self.datepicker_switch.read() is resolving the datepicker-daysDOM and readingNovember 2020(example) instead of2020-2029as expected, from thedatepicker-years` DOM.

A HeaderView class is used to define datepicker_switch locator, but the parent isn't setup properly for the widget, resulting in an out-of-scope match and unexpected text.

@mshriver mshriver added the bug label Nov 3, 2020
omkarkhatavkar added a commit to omkarkhatavkar/widgetastic.patternfly that referenced this issue Nov 5, 2020
mshriver added a commit that referenced this issue Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant