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

Added tap testing to exercise more code. #137

Merged
merged 1 commit into from
Oct 24, 2020

Conversation

awhitford
Copy link
Collaborator

Additional test cases to exercise the onTap callback logic, and displayFullTextOnTap.

@codecov
Copy link

codecov bot commented Oct 24, 2020

Codecov Report

Merging #137 into master will increase coverage by 7.89%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
+ Coverage   72.36%   80.26%   +7.89%     
==========================================
  Files           8        8              
  Lines         760      760              
==========================================
+ Hits          550      610      +60     
+ Misses        210      150      -60     
Impacted Files Coverage Δ
lib/src/typewriter.dart 79.43% <0.00%> (+12.14%) ⬆️
lib/src/typer.dart 82.14% <0.00%> (+15.47%) ⬆️
lib/src/scale.dart 77.55% <0.00%> (+17.34%) ⬆️
lib/src/fade.dart 76.40% <0.00%> (+19.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b78fa0...63707f0. Read the comment docs.

@awhitford
Copy link
Collaborator Author

I'm pleased that this addition boosts code coverage to about 80%! 🎉

However, this seems to have exposed a bug 🐛 -- the onTap callback for RotateAnimatedTextKit does not seem to be working. Every other widget works fine -- and the code is very similar.

I can't see the issue; hopefully another pair of eyes can help. 🤓

@aagarwal1012
Copy link
Owner

Looks great!

@aagarwal1012 aagarwal1012 merged commit af36e40 into aagarwal1012:master Oct 24, 2020
@awhitford awhitford deleted the taptest branch October 24, 2020 19:25
@awhitford
Copy link
Collaborator Author

For the record, the onTap functionality works fine for RotateAnimatedTextKit. However, the unit test fails to demonstrate that. I think this is because for Rotate, the tap event needs to hit the text -- and if that is being rotated in, the text isn't clickable. In other words, it is a timing issue -- and it matches real world behavior. I'm unclear how to best improve this, but I'm sure there is a way. 🤔

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