-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve test coverage through integration tests #226
Conversation
…st gets generated
This PR will trigger no release when merged. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #226 +/- ##
===========================================
+ Coverage 73.83% 84.58% +10.75%
===========================================
Files 5 5
Lines 493 493
===========================================
+ Hits 364 417 +53
+ Misses 129 76 -53 ☔ View full report in Codecov by Sentry. |
<img src="/test/it/img.test.html"> | ||
<script type="module"> | ||
import { runTests } from '@web/test-runner-mocha'; | ||
import { sendMouse } from '@web/test-runner-commands'; |
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.
@kptdobe referring to the discussion we had back in rumathon, maybe this sendMouse
command what we needed for the INP test?
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.
To be tested, yes.
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.
The challenge may be that we have to navigate away from the page and that can interfere with recording the test results.
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.
Nice!
<img src="/test/it/img.test.html"> | ||
<script type="module"> | ||
import { runTests } from '@web/test-runner-mocha'; | ||
import { sendMouse } from '@web/test-runner-commands'; |
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.
import { sendMouse } from '@web/test-runner-commands'; |
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 needed, no ?
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 got me. I'm clicking now.
<img src="/test/it/img.test.html"> | ||
<script type="module"> | ||
import { runTests } from '@web/test-runner-mocha'; | ||
import { sendMouse } from '@web/test-runner-commands'; |
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.
To be tested, yes.
This has been a bit more painful than I expected.
The integration test now loads helix-rum-enhancer through
a (slightly prepared) version of helix-rum-js and then
validates the checkpoints that have been sent using a mocked
navigator.sendBeacon
. This helps to bring up the coverageof
index.js
, but there are still good chunks of it thatrequire more fiddling, especially when we look at URL parameter
comprehension