Skip to content

Commit 68c9216

Browse files
Merge branch 'main' into click-nli
2 parents 983c73c + 34c5537 commit 68c9216

29 files changed

+2167
-172
lines changed

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

Lines changed: 465 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,4 +777,26 @@ describe("Carousel general interaction", () => {
777777

778778
cy.get("#outsideButton").should("be.focused");
779779
});
780+
781+
it("visibleItemsIndices should not contain negative values when initial items < itemsPerPage", () => {
782+
cy.mount(
783+
<Carousel id="dynamicCarousel" itemsPerPage="S1 M2 L3 XL4">
784+
<Card>Card 1</Card>
785+
<Card>Card 2</Card>
786+
</Carousel>
787+
);
788+
789+
cy.viewport(1200, 500);
790+
791+
cy.get("#dynamicCarousel")
792+
.shadow()
793+
.find(".ui5-carousel-item:not(.ui5-carousel-item--hidden)")
794+
.should("have.length", 2);
795+
796+
cy.get<Carousel>("#dynamicCarousel")
797+
.then($carousel => {
798+
const indices = $carousel[0].visibleItemsIndices;
799+
expect(indices.every(i => i >= 0), "visibleItemsIndices should not contain negative values").to.be.true;
800+
});
801+
});
780802
});

0 commit comments

Comments
 (0)