Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nowakdaniel
Copy link
Contributor

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.

Migration of wdio tests (excluding fixed header tests) to the new cypress framework.
.click("left");

cy.get("@rows").eq(0).should("be.focused")

Copy link
Member

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")

Copy link
Member

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")
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants