Bugzilla – Attachment 166425 Details for
Bug 36774
Flatpickr clear() adds unintentional clear button
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36774: Add cypress tests
Bug-36774-Add-cypress-tests.patch (text/plain), 1.57 KB, created by
Pedro Amorim
on 2024-05-08 15:46:14 UTC
(
hide
)
Description:
Bug 36774: Add cypress tests
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-05-08 15:46:14 UTC
Size:
1.57 KB
patch
obsolete
>From 3a6c21f30cf82175d40b3847f9bdcabd9ad906ac Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 8 May 2024 15:26:52 +0000 >Subject: [PATCH] Bug 36774: Add cypress tests > >--- > t/cypress/integration/flatpickr_spec.ts | 33 +++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > create mode 100644 t/cypress/integration/flatpickr_spec.ts > >diff --git a/t/cypress/integration/flatpickr_spec.ts b/t/cypress/integration/flatpickr_spec.ts >new file mode 100644 >index 0000000000..60f744776e >--- /dev/null >+++ b/t/cypress/integration/flatpickr_spec.ts >@@ -0,0 +1,33 @@ >+import { mount } from "@cypress/vue"; >+ >+const dayjs = require("dayjs"); >+ >+const dates = { >+ today_iso: dayjs().format("YYYY-MM-DD"), >+ today_us: dayjs().format("MM/DD/YYYY"), >+ tomorrow_iso: dayjs().add(1, "day").format("YYYY-MM-DD"), >+ tomorrow_us: dayjs().add(1, "day").format("MM/DD/YYYY"), >+}; >+ >+describe("Flatpickr", () => { >+ beforeEach(() => { >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ }); >+ >+ it("'Clear filter' works correctly", () => { >+ cy.visit("/cgi-bin/koha/circ/overdue.pl"); >+ >+ cy.get("#from+span > input").click(); >+ cy.get(".flatpickr-calendar") >+ .eq(0) >+ .find("span.today") >+ .click({ force: true }); >+ cy.get("#from").invoke("val").should("eq", dates["today_iso"]); >+ >+ cy.get("#from+span > a").click(); >+ cy.get("#from").invoke("val").should("have.length", 0); >+ >+ cy.get("#from+span > input").should("exist"); >+ }); >+}); >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36774
:
166138
|
166139
|
166162
|
166163
|
166278
|
166303
|
166304
|
166305
|
166383
|
166384
|
166385
|
166395
|
166396
|
166423
|
166424
|
166425
|
166427
|
166463
|
166464