Skip to content

Commit 69d2f74

Browse files
CezarSTFci-build
authored andcommitted
FORMS-18686: added test cases
1 parent 8bfeff8 commit 69d2f74

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ui.tests/test-module/specs/datepicker/datepicker.runtime.cy.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,20 @@ describe("Form Runtime with Date Picker", () => {
513513
})
514514
});
515515
});
516+
517+
it("calendar icon should have role='button' for accessibility", () => {
518+
const [datePicker1, datePicker1FieldView] = Object.entries(formContainer._fields)[0];
519+
cy.get(`#${datePicker1}`).find(".cmp-adaptiveform-datepicker__calendar-icon")
520+
.should("have.attr", "role", "button");
521+
});
522+
523+
it("calendar icon should have aria-label for screen readers", () => {
524+
const [datePicker1, datePicker1FieldView] = Object.entries(formContainer._fields)[0];
525+
cy.get(`#${datePicker1}`).find(".cmp-adaptiveform-datepicker__calendar-icon")
526+
.should("have.attr", "aria-label")
527+
.and("not.be.empty");
528+
});
529+
516530
it("Test dd/MM/yyyy format - verify July is highlighted for 03/07/2025", () => {
517531
// Test the datepicker component configured with dd/MM/yyyy format
518532

0 commit comments

Comments
 (0)