Skip to content

chore(ui5-dynamic-page): migrate wdio tests to cypress #11778

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

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

Conversation

NakataCode
Copy link
Contributor

@NakataCode NakataCode commented Jun 23, 2025

Convert DynamicPage tests to Cypress component tests while maintaining test coverage and functionality parity with original specs.

JIRA: BGSOFUIPIRIN-6816

@NakataCode NakataCode marked this pull request as ready for review June 23, 2025 08:38
@yanaminkova yanaminkova self-requested a review August 4, 2025 15:08
.should("exist");

cy.get("@dynamicPage")
.invoke("prop", "headerSnapped", true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion: I noticed that in several tests we set the headerPinned and headerSnapped properties dynamically using .invoke(). While this approach works fine, it might improve clarity and readability to define separate mount configurations where the prop is set upfront. This way, the component's initial state is explicit in the test setup.
That said, the current approach is valid and working well, so feel free to keep it as is if you prefer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! You're right that setting properties upfront in JSX is cleaner.

After testing this approach, I discovered that the DynamicPage component has an initialization timing issue with headerSnapped={true} in JSX - it causes Cannot read properties of null (reading 'scrollTop') errors because the component tries to access scroll elements before they're ready.

So I use a hybrid approach:
Properties like headerPinned={true}, showFooter work fine in JSX and are set there
Only headerSnapped uses .invoke("prop") after mounting

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