Closed AntonioDell closed 1 month ago
I got confused with the aria-pressed
and aria-selected
properties. One is used when selecting in a MonthPicker, the other in DatePicker. So after breaking it down to a very basic example, I noticed, that the behavior I thought was a bug, was only my oversight.
Sorry for the confusion, closing the ticket :)
Describe the bug Using vue-test-utils to trigger a click on a month of the MonthPicker does not select the month in a unit test. However doing so in a DatePicker to select a date works.
Example DatePicker working:
Example MonthPicker NOT working:
Digging into the differences between
SelectionOverlay.vue
(used by MonthPicker) andDatePicker.vue
, I suspect the culprit could be the@click.prevent
in the root div ofSelectionOverlay
.DatePicker
does not have such an event handler on the root, only one on the actual date grid cells.To Reproduce I'll create a minimal project and link it here shortly.
Expected behavior In unit tests using vue-test-utils it is possible to select a month in the MonthPicker by using
monthGridCell.trigger("click")
. This is currently possible in aDatePicker
.Desktop & mobile (please complete the following information):