Skip to content

test: refactor scrollable tabs tests to check for visible tabs - #6852

Merged
yuriy-fix merged 1 commit into
mainfrom
test/scrollable-tabs-async
Feb 27, 2024
Merged

yuriy-fix merged 1 commit into
mainfrom
test/scrollable-tabs-async

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Fixes #6812

Updated scrollable tabs tests to actually check that every tab is visible at some point while scrolling using buttons.
The new assertion using getBoundingClientRect() is rather complicated but I was unable to find a better way 🤷‍♂️

Type of change

  • Tests

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ugur-vaadin ugur-vaadin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Would it be even more stable if we expect all the items to have been visible at one point instead of expecting a distinct set at each step?

@web-padawan

Copy link
Copy Markdown
Member Author

Would it be even more stable if we expect all the items to have been visible at one point

Yes, probably. But it would mean that we only have one assertion checking the resulting array length.

@yuriy-fix
yuriy-fix merged commit 08f04ee into main Feb 27, 2024
@yuriy-fix
yuriy-fix deleted the test/scrollable-tabs-async branch February 27, 2024 08:58
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.alpha9 and is also targeting the upcoming stable 24.4.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tabs] Scrollable tabs tests fail when adding await to beforeEach

4 participants