Skip to content

Commit 065a049

Browse files
committed
chore: extend form-validity test for ui5-checkbox and ui5-select
1 parent 62447cb commit 065a049

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/main/cypress/specs/FormSupport.cy.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ describe("Form support", () => {
5353

5454
cy.get("#cb5")
5555
.then($el => {
56-
expect(($el[0] as CheckBox).validity.valueMissing).to.be.true;
56+
const checkbox = $el[0] as CheckBox;
57+
expect(checkbox.validity.valueMissing).to.be.true;
58+
expect(checkbox.checkValidity()).to.be.false;
59+
expect(checkbox.reportValidity()).to.be.false;
5760
});
5861

5962
cy.get("form :invalid") // select using :invalid CSS pseudo-class
@@ -675,7 +678,10 @@ describe("Form support", () => {
675678

676679
cy.get("#select9")
677680
.then($el => {
678-
expect(($el[0] as Select).validity.valueMissing).to.be.true;
681+
const select = $el[0] as Select;
682+
expect(select.validity.valueMissing).to.be.true;
683+
expect(select.checkValidity()).to.be.false;
684+
expect(select.reportValidity()).to.be.false;
679685
});
680686

681687
cy.get("form :invalid") // select using :invalid CSS pseudo-class

0 commit comments

Comments
 (0)