-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
For Outlinks and Download URLs, do not exclude URL parameters and store URLs untouched #7992
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,15 +106,17 @@ private function trackVisits() | |
|
||
// Click on external link after 6 minutes (3rd action) | ||
$t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.1)->getDatetime()); | ||
self::checkResponse($t->doTrackAction('http://dev.piwik.org/svn', 'link')); | ||
|
||
// Testing Outlink that contains a URL Fragment | ||
self::checkResponse($t->doTrackAction('https://outlinks.org/#!outlink-with-fragment-<script>', 'link')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In addition to modifying a fixture (and thus testing archiving as well as tracking), would it be possible to add a test in System/TrackerTest.php? This test would test just the tracker behavior. Could add it to Integration/TrackerTest.php instead, though would be better to do this after tracker encapsulation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The test here tests for Tracker behavior + Archiver (since both were modified in this PR) and I want to test both edit: I can add another test for tracker only There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just FYI, purpose of my comment was just that it would be easier to debug a regression by running one test, instead of all system tests. In case it wasn't clear ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was very clear but issue was that I attempted a reply before being fully awake 👍 |
||
|
||
// Click on file download after 12 minutes (4th action) | ||
$t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.2)->getDatetime()); | ||
self::checkResponse($t->doTrackAction('http://piwik.org/path/again/latest.zip', 'download')); | ||
|
||
// Click on two more external links, one the same as before (5th & 6th actions) | ||
$t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.22)->getDateTime()); | ||
self::checkResponse($t->doTrackAction('http://outlinks.org/other_outlink', 'link')); | ||
self::checkResponse($t->doTrackAction('http://outlinks.org/other_outlink#fragment&pk_campaign=Open%20partnership', 'link')); | ||
$t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.25)->getDateTime()); | ||
self::checkResponse($t->doTrackAction('http://dev.piwik.org/svn', 'link')); | ||
|
||
|
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.
Don't have to call the same method twice here.
Also, this skips the logging in setActionUrl. Perhaps that method can be refactored to call this new method or another one.