diff --git a/packages/main/cypress/specs/TabContainer.cy.tsx b/packages/main/cypress/specs/TabContainer.cy.tsx index 653f366d15cc..90297c29a222 100644 --- a/packages/main/cypress/specs/TabContainer.cy.tsx +++ b/packages/main/cypress/specs/TabContainer.cy.tsx @@ -494,7 +494,8 @@ describe("TabContainer general interaction", () => { }); }); - it.skip("tests start and end overflow behavior - tabs don't move to the right if there is enough space", () => { + it("tests start and end overflow behavior - tabs don't move to the right if there is enough space", () => { + cy.viewport(600, 1080); cy.mount( Tab 1 @@ -530,14 +531,14 @@ describe("TabContainer general interaction", () => { ); - cy.viewport(600, 1080); - cy.get("#tabContainerStartAndEndOverflow").shadow().find(".ui5-tc__overflow--start").as("startOverflow"); cy.get("#tabContainerStartAndEndOverflow").should("have.attr", "overflow-mode", "StartAndEnd"); - cy.get("@startOverflow").should("have.text", "+4"); + + cy.get("@startOverflow").should("be.visible").invoke("text").should("equal", "+4"); - cy.get("#tabContainerStartAndEndOverflow").shadow().find(".ui5-tab-strip-item:nth-child(5)").as("tab5"); - cy.get("@tab5").click(); + cy.get("#tabContainerStartAndEndOverflow").shadow().find(".ui5-tab-strip-item:visible:not([hidden])").first().as("visibleTab"); + cy.get("@visibleTab").should("exist"); + cy.get("@visibleTab").realClick(); cy.get("@startOverflow").should("have.text", "+4"); });