-
Notifications
You must be signed in to change notification settings - Fork 22
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
[RSDK-4265] Sensor widget tests #81
Conversation
expect(playButton, findsNothing); | ||
expect(pauseButton, findsNothing); | ||
expect(refreshButton, findsNothing); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(q) how come you aren't calling tester.pump() in this test like you are in the other ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tester.pump
only needs to be called if the state changes in order to reevaluate the UI with the new state see docs
expect(playButton, findsNothing); | ||
expect(pauseButton, findsNothing); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(q) maybe obvious but does it also hide the refresh button? should we still test for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope! When refreshInterval
is null
, only the play/pause button is hidden. The manual refresh button needs to be available so that users can manually refresh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you are correct that we should have a test to make sure the refresh button is visible so I added it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two questions about the test but LGTM
Documentation and tests for sensor widget