-
Notifications
You must be signed in to change notification settings - Fork 273
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
chore(ui5-table): migrate TableNavigation wdio tests to cypress #10620
base: main
Are you sure you want to change the base?
Conversation
Migration of wdio tests (excluding fixed header tests) to the new cypress framework.
.click("left"); | ||
|
||
cy.get("@rows").eq(0).should("be.focused") | ||
|
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.
Formatting is a bit weird here. Why is there a whitespace here?
|
||
cy.get("@rows").eq(0).realPress("F2"); | ||
cy.get("@row1Input").eq(0).should("be.focused") | ||
|
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.
Again. There are multiple instances in the code, where formatting is just weird. please have a look again
// otherwise the it would click in the center of the row where an input is | ||
// resulting in a focus on the input instead of the row | ||
.click("left"); | ||
cy.get("@rows").eq(0).should("be.focused") |
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.
I feel like it would be nice to have a function for this, at it's most of the time the same thing, except for the cy-element switching up.
Maybe a function where you can pass an array of objects containing element and associated action would be neat.
function performActions(actions: Array<{ element: [whatever the cypress element type is], action: string }>)
Usage:
performActions([
{ element: cy.get("@rows").eq(0), action: "{leftarrow}" },
{ element: cy.get("@headerRow"), action: "{uparrow}" },
...
]
It would make the tests a bit cleaner I think. Up to you if you want to implement this. Can be also done as a follow-up
Migration of
TableNavigation.spec.js
wdio tests to cypress. This change does not include the fixed header tests which will be migrated in another PR.