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

[RSDK-4265] Sensor widget tests #81

Merged
merged 9 commits into from
Aug 2, 2023

Conversation

njooma
Copy link
Member

@njooma njooma commented Aug 2, 2023

Documentation and tests for sensor widget

@njooma njooma requested a review from jckras August 2, 2023 21:23
@njooma njooma requested a review from a team as a code owner August 2, 2023 21:23
@njooma njooma requested a review from clintpurser August 2, 2023 21:23
expect(playButton, findsNothing);
expect(pauseButton, findsNothing);
expect(refreshButton, findsNothing);
});
Copy link
Member

@jckras jckras Aug 2, 2023

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?

Copy link
Member Author

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);
});
});
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

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 :)

Copy link
Member

@jckras jckras left a 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

@njooma njooma merged commit 20344fc into viamrobotics:main Aug 2, 2023
1 check passed
@njooma njooma deleted the RSDK-4265/widgets branch August 2, 2023 23:34
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