Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

time input tests fix #2078

Merged
merged 2 commits into from
Mar 13, 2024
Merged

Conversation

adoroshk
Copy link
Contributor

@adoroshk adoroshk commented Mar 13, 2024

Summary

Currently, if the time input has no time entered, per "+" key press it fills the time with current time +1 second. If "-" pressed -1 second.

The wdio tests for that functionality are checking if the input time is in 2 seconds range from expected value, using real time instead of mocked value, which caused tests failure in 80% of cases.

This PR is temporary fix to prevent delays caused by tests failures. It replaces check for seconds be in proper time range to check for seconds to have a value in between 0 and 59. The tests needs to be updated with proper check for seconds being +1/-1 compared to current time, where current time is properly mocked. That work should be done as a part of UXPLATFORM-10295.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR is temporary fix to prevent delays caused by tests failures. It replaces check for seconds be in proper time range to check for seconds to have a value in between 0 and 59. The tests needs to be updated with proper check for seconds being +1/-1 compared to current time, where current time is properly mocked. That work should be done as a part of UXPLATFORM-10295.

@adoroshk
Copy link
Contributor Author

All checks passed from the first attempt. Re-running checks to ensure it wasn't accidental.
Screenshot 2024-03-13 at 9 29 51 AM

@adoroshk
Copy link
Contributor Author

Re-running tests passed as well. I guess that means that a fix to seconds increment/decrement testing will fix the tests failure.

@github-actions github-actions bot temporarily deployed to preview-pr-2078 March 13, 2024 14:27 Destroyed
@adoroshk adoroshk marked this pull request as ready for review March 13, 2024 14:33
Copy link
Contributor

@sdadn sdadn left a comment

Choose a reason for hiding this comment

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

Looks good!

@sdadn sdadn mentioned this pull request Mar 13, 2024
8 tasks
@adoroshk adoroshk merged commit 56ee4d7 into main Mar 13, 2024
22 checks passed
@adoroshk adoroshk deleted the time-input-one-second-increase-decrease-tests-fix branch March 13, 2024 15:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants