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

tests: added timepicker interaction tests #56

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

Conversation

thetaungg
Copy link
Contributor

No description provided.

await delay(500);

// type in 60
await userEvent.type(canvas.getByTestId('timePickerInteractions-minute-input-plain'), '60');
Copy link
Contributor

Choose a reason for hiding this comment

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

While this works, this doesn't verify anything.

Does it test AM/PM values?
Does it test 24 hours mode?

Try this use case..
With the current time 11:00AM.. start making it 60 minutes.
everytime the hour updates.. add a 6 before the 0 in the minutes section.. hours would update; in this case it is the expected behaviour..
but see what happens when it hits 11:00 AM after a full circle..
It will crash..

Our test cases should find bugs like these..
Think about all the possible scenarios..

Whatever is wrapped in an if condition.. is a code branch. every code branch is an error waiting to happen.

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.

2 participants