-
Notifications
You must be signed in to change notification settings - Fork 273
chore(ui5-carousel): migrate wdio tests to cypress #11328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commands.ts looks good to me and there is approve from my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent with tabs
</Carousel>); | ||
|
||
cy.get("#carousel2") | ||
.realHover() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrow should be displayed even without hovering, so delete line 24.
We should check why in Carousel#onBeforeRendering
isDesktop()
call returns true
|
||
it("Buttons (navigation arrows) are rendered in the navigation without hovering (arrows-placement)", () => { | ||
cy.mount( | ||
<Carousel id="carousel3" arrows-placement="Navigation"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Carousel id="carousel3" arrowsPlacement="Navigation">
}); | ||
|
||
it("ItemsPerPage property is working properly", () => { | ||
cy.mount( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify this carousel to:
<Carousel id="carousel4">
<span>page 1</span>
<span>page 2</span>
<span>page 3</span>
</Carousel>
cy.get('#carousel5') | ||
.then((carousel) => { | ||
const el = carousel[0] as HTMLElement & { _id: string }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.get<Carousel>('#carousel5')
.then(($carousel) => {
const el = $carousel[0];
|
||
cy.get("#carousel6") | ||
.shadow() | ||
.find(".Carousel-navigation-arrows") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.find(".ui5-carousel-navigation-arrows")
|
||
cy.get("#carouselHiddenPageIndicator") | ||
.shadow() | ||
.find(".Carousel-navigation > *") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.find(".ui5-carousel-navigation > *")
cy.get("#carousel9").then((carousel) => { | ||
const el = carousel[0] as HTMLElement & { navigateTo: (index: number) => void }; | ||
el.navigateTo(1); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.get<Carousel>("#carousel9").then(($carousel) => {
$carousel[0].navigateTo(1);
});
cy.get("#carouselF7").then((carousel) => { | ||
const el = carousel[0] as HTMLElement & { navigateTo: (index: number) => void }; | ||
el.navigateTo(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.get<Carousel>("#carousel9").then(($carousel) => {
$carousel[0].navigateTo(1);
});
|
||
it("Items per page", () => { | ||
cy.mount( | ||
<Carousel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify to:
<Carousel
id="itemsPerPage"
cyclic
itemsPerPage="S1 M2 L3 XL4"
arrowsPlacement="Navigation"
>
<span>item 1</span>
<span>item 2</span>
<span>item 3</span>
<span>item 4</span>
<span>item 5</span>
</Carousel>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are couple of cyclic="true"
usages, which cause errors in the console. Should be replaced with cyclic={true}
JIRA: BGSOFUIRODOPI-3414