Skip to content

Datepicker test broken on certain days #2238

@ZoeBijl

Description

@ZoeBijl

Line 335 at test/tests/spinbutton_datepicker.js

After sending 31 up arrows to the day spinner, the day should be:

Today (25th of February 2022) this assert fails.

This is likely because of the modulo:

control = (control + 30) % daysInMonth;

  • control started out at 25
  • control is updated with control = (control + 1) % daysInMonth; (25 + 1) % 28 = 26
  • control is updated again control = (control + 30) % daysInMonth; (26 + 30) % 28 = 0

There’s no day “0”

Metadata

Metadata

Assignees

No one assigned

    Labels

    regression-testingRelated to AVA regression tests of example pages or AVA framework implementation within repo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions