Skip to content

Commit e5f7c52

Browse files
NakataCodennaydenow
authored andcommitted
test(flexible-column-layout): fix test (#12131)
Fixes test by setting AnimationMode.Full before component mount instead of after. Eliminates race condition where animation classes weren't applied in time on slower CI environments. Also the rerender is now done with layout change.
1 parent 40c2d78 commit e5f7c52

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/fiori/cypress/specs/FCL.cy.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ describe("Columns resize", () => {
8888
});
8989

9090
it("keeps hidden class on columns after rerendering", () => {
91+
cy.wrap({ setAnimationMode })
92+
.invoke("setAnimationMode", AnimationMode.Full);
93+
9194
cy.mount(
9295
<FlexibleColumnLayout layout="TwoColumnsStartExpanded">
9396
<div class="column" slot="startColumn">some content</div>
@@ -104,8 +107,8 @@ describe("Columns resize", () => {
104107
.find(".ui5-fcl-column--end")
105108
.should("have.class", "ui5-fcl-column--hidden");
106109

107-
cy.wrap({ setAnimationMode })
108-
.invoke("setAnimationMode", AnimationMode.Full);
110+
cy.get("@fcl")
111+
.invoke("prop", "layout", "TwoColumnsMidExpanded");
109112

110113
cy.get("@fcl")
111114
.shadow()

0 commit comments

Comments
 (0)