Skip to content

Conversation

Sahil-Simform
Copy link
Collaborator

Description

  • Added test cases for showcaseview

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Copy link
Contributor

@aditya-chavda aditya-chavda left a comment

Choose a reason for hiding this comment

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

Widget tests are for checking whether the particular widget gets rendered properly or not and not just merely checking the widgets' properties.

await tester.pumpWidget(
MaterialApp(
home: Builder(
builder: (context) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems unnecessary.

},
);
testWidgets(
'ShowcaseView.register creates instance with correct properties',
Copy link
Contributor

Choose a reason for hiding this comment

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

This should rather be with the default values.

builder: (context) {
ShowcaseView.register(
scope: 'state_test_scope',
onStart: (index, key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use tear off and mark the unused variable with '_'

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