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

test: make keyboard tests more reliable #3793

Merged
merged 1 commit into from
May 6, 2022

Conversation

vursen
Copy link
Contributor

@vursen vursen commented May 6, 2022

Description

Added more waitForScrollToFinish to ensure the date-picker has finished scrolling before checking that the correct cell is focused.

A follow-up to #3659

Part of #3538

Type of change

  • Internal

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

@vursen vursen requested a review from web-padawan May 6, 2022 11:13
@vursen vursen force-pushed the test/make-date-picker-tests-more-reliable branch from ad43666 to 83e3e60 Compare May 6, 2022 11:31
@@ -132,7 +132,8 @@ import { getDefaultI18n, getFocusedCell, getOverlayContent, open, waitForScrollT
const initialDate = new Date(2000, 0, 1);
overlay.initialPosition = initialDate;
await nextRender(overlay);
await overlay.focusDate(initialDate);
overlay.focusDate(initialDate);
Copy link
Contributor Author

@vursen vursen May 6, 2022

Choose a reason for hiding this comment

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

note: overlay.focusDate() doesn't wait for the scroll animation to finish.

@vursen vursen force-pushed the test/make-date-picker-tests-more-reliable branch from 83e3e60 to 4697171 Compare May 6, 2022 11:48
@sonarcloud
Copy link

sonarcloud bot commented May 6, 2022

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan web-padawan merged commit 38a1bb8 into master May 6, 2022
@web-padawan web-padawan deleted the test/make-date-picker-tests-more-reliable branch May 6, 2022 12:14
web-padawan pushed a commit that referenced this pull request May 6, 2022
Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
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.

3 participants