diff --git a/packages/main/cypress/specs/Select.cy.tsx b/packages/main/cypress/specs/Select.cy.tsx index 0c21d1cdbe66..b35a41585239 100644 --- a/packages/main/cypress/specs/Select.cy.tsx +++ b/packages/main/cypress/specs/Select.cy.tsx @@ -462,6 +462,25 @@ describe("Select - Popover", () => { .should("have.text", "Custom message"); }); + it("ResponsivePopover should not have accessible name on desktop", () => { + cy.mount( + + ); + + // Open the popover + cy.get("#desktopSelect").realClick(); + + // Check that the ResponsivePopover does not have an accessible name on desktop + cy.get("#desktopSelect") + .shadow() + .find("[ui5-responsive-popover]") + .should("not.have.attr", "accessible-name"); + }); + it("Value state message popover can extend beyond select width", () => { cy.mount( + + + + ); + + // Open the popover + cy.get("#select").realClick(); + + // Check if accessible-name is equal to select._headerTitleText + cy.get("#select").invoke("prop", "_headerTitleText").then(_headerTitleText => { + cy.get("#select") + .shadow() + .find("[ui5-responsive-popover]") + .should("have.attr", "accessible-name") + .and("equal", _headerTitleText); + }); + }); + it("should focus the selected option when popover opens", () => { + cy.mount( + + ); + cy.get("#select").realClick(); + + cy.get("#opt2").should("have.attr", "focused"); + cy.get("#opt2").shadow() + .find(".ui5-li-root") + .should("be.focused"); + }); + + it("Changes selection in Dialog", () => { cy.mount(