acidb / mobiscroll

Cross platform UI controls for progressive web and hybrid apps (plain JS, jQuery, Angular and React)
https://mobiscroll.com
Other
1.54k stars 439 forks source link

Improve mobiscroll interaction with autotesting #499

Open MessiasMorten opened 2 years ago

MessiasMorten commented 2 years ago

When writing autotests for applications, mobiscroll tends to be difficult to deal with. Despite opening the modal with the current month active, a click on a date with autotesting tools like Cypress tends to be difficult due to the existence of multiple hidden grids for non-active months. For instance, if I were to use cypress in order to click a date in the current opened month, it would go back, switch the modal to a previous point in time and click the same date in a different month.

Performing a query on all clickable mbsc-calendar-day objects yield a result of 140 something clickables, despite a month having a maximum of 31 days. I do not understand the need to keep all of this invisible to the user, instead of loading the frontend on a month to month basis off the users selections in the modal.

We can sidestep this by mandating that the clickable's parent object has the property :visible, but it also creates a larger issue when selecting timespans that overlap two different months.