1 import { mount } from "@cypress/vue";
3 const dayjs = require("dayjs");
6 today_iso: dayjs().format("YYYY-MM-DD"),
7 today_us: dayjs().format("MM/DD/YYYY"),
8 tomorrow_iso: dayjs().add(1, "day").format("YYYY-MM-DD"),
9 tomorrow_us: dayjs().add(1, "day").format("MM/DD/YYYY"),
12 describe("Flatpickr", () => {
15 cy.title().should("eq", "Koha staff interface");
18 it("'Clear filter' works correctly", () => {
19 cy.visit("/cgi-bin/koha/circ/overdue.pl");
21 cy.get("#from+span > input").click();
22 cy.get(".flatpickr-calendar")
25 .click({ force: true });
26 cy.get("#from").invoke("val").should("eq", dates["today_iso"]);
28 cy.get("#from+span > a").click();
29 cy.get("#from").invoke("val").should("have.length", 0);
31 cy.get("#from+span > input").should("exist");