[Koha-bugs] [Bug 33490] Agreements - Filter by expired results in error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 13 15:47:58 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33490

--- Comment #10 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
OK, that was a nice distraction for a few hours and I feel like I've wrapped my
brain around Cypress testing much better now.

I've added tests that I believe catch this particular issue, though I'd love a
review if anyone fancies it.

* I test for the existence of the filter options when there are any agreements
in the system.
* I then test for the default date of today being filled after filtering when
the 'Filter by expired' checkbox is checked.
* This tests:
  a) that the xhr includes the correct max_expiration_date
  b) that the window url is updated to reflect the filtering
  c) the input box value is set and displayed
* We then reload the page using the url as defined in step b) above and test
that the xhr and input box value get correctly filled again
* We then add a user selected date in the input box and check
  a) that the xhr includes the new correct max_expiration_date
  b) the window url is updated to reflect the filtering (including the new
date)
  c) the input box value is set and displaying the new date too
* Finally, we reload the page again in b) above and confirm all the changes
stuck.

I added a note that we should also really be testing the other filter too.. but
I felt that was out of scope for this particular patch (and I was running low
on tuits)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list