-
Notifications
You must be signed in to change notification settings - Fork 509
test: 🧪 Added utilities test cases #554
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
base: master
Are you sure you want to change the base?
Conversation
Constants.defaultProgressIndicator, | ||
isA<ShowcaseCircularProgressIndicator>(), | ||
); | ||
expect(Constants.defaultTargetShapeBorder, isA<RoundedRectangleBorder>()); |
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.
Please check the borderRadius
as well.
}); | ||
|
||
test( | ||
'Constants progress indicator is instance of ShowcaseCircularProgressIndicator', |
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.
Already covered.
expect(progressIndicator, isA<ShowcaseCircularProgressIndicator>()); | ||
}); | ||
|
||
test('Constants target shape border is instance of RoundedRectangleBorder', |
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.
Already covered.
expect(TooltipPosition.right.toString(), 'TooltipPosition.right'); | ||
}); | ||
|
||
test('TooltipPosition enum equality', () { |
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.
==
operator can't be overridden for an enum so this check seems unnecessary.
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.
Not all enums are covered.
}); | ||
}); | ||
|
||
group('Enum Tests', () { |
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.
You can test for enum's properties' default values too.
expect(find.text('Target Widget'), findsOneWidget); | ||
}); | ||
|
||
testWidgets('Floating action widget integration', |
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.
Already covered. Doesn't qualify as an integration test.
}); | ||
|
||
group('Error Handling Tests', () { | ||
testWidgets('Invalid overlay opacity throws assertion error', |
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.
This test doesn't fall under utils.
); | ||
}); | ||
|
||
testWidgets('Invalid targetTooltipGap throws assertion error', |
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.
This test doesn't fall under utils.
}); | ||
|
||
testWidgets( | ||
'Invalid disposeOnTap and onTargetClick combination throws assertion error', |
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.
This test doesn't fall under utils.
}); | ||
|
||
testWidgets( | ||
'Invalid onBarrierClick and disableBarrierInteraction combination throws assertion error', |
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.
This test doesn't fall under utils.
Description
Checklist
fix:
,feat:
,docs:
etc).docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Related Issues