diff options
author | Ben Burgess <88810029+bx80@users.noreply.github.com> | 2021-10-04 07:01:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 07:01:04 +0300 |
commit | 2404b24c3a52f04475b63f300269a129399882ec (patch) | |
tree | 421e1a81c7f554561bec2cf8385d44ad478ed97f /tests | |
parent | deff627a8e9a4c476ba59cfe57c3797f65679c4f (diff) |
JavaScript tracker exclude query parameters (#18031)
Adds a new option to the JavaScript tracker to exclude query parameters from the tracked URL.
Co-authored-by: bx80 <bx80@users.noreply.github.com>
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'tests')
30 files changed, 87 insertions, 59 deletions
diff --git a/tests/PHPUnit/Fixtures/UITestFixture.php b/tests/PHPUnit/Fixtures/UITestFixture.php index a862e3eef5..724953f8c0 100644 --- a/tests/PHPUnit/Fixtures/UITestFixture.php +++ b/tests/PHPUnit/Fixtures/UITestFixture.php @@ -322,7 +322,11 @@ class UITestFixture extends SqlDump private function addNewSitesForSiteSelector() { for ($i = 0; $i != 8; ++$i) { - self::createWebsite("2011-01-01 00:00:00", $ecommerce = 1, $siteName = "Site #$i", $siteUrl = "http://site$i.com"); + self::createWebsite("2011-01-01 00:00:00", $ecommerce = 1, $siteName = "Site #$i", + $siteUrl = "http://site$i.com", 1, null, null, + null, null, 0, + implode(',', [$this->xssTesting->forTwig('excludedparameter'), + $this->xssTesting->forAngular('excludedparameter'),'sid'])); } } diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php index 8050865eff..96b2bc5282 100644 --- a/tests/PHPUnit/Framework/Fixture.php +++ b/tests/PHPUnit/Framework/Fixture.php @@ -530,12 +530,13 @@ class Fixture extends \PHPUnit\Framework\Assert * @param null|string $type eg 'website' or 'mobileapp' * @param null|string $settings eg 'website' or 'mobileapp' * @param int $excludeUnknownUrls + * @param null|string $excludedParameters * @return int idSite of website created */ public static function createWebsite($dateTime, $ecommerce = 0, $siteName = false, $siteUrl = false, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, $timezone = null, $type = null, - $excludeUnknownUrls = 0) + $excludeUnknownUrls = 0, $excludedParameters = null) { if($siteName === false) { $siteName = self::DEFAULT_SITE_NAME; @@ -546,7 +547,7 @@ class Fixture extends \PHPUnit\Framework\Assert $ecommerce, $siteSearch, $searchKeywordParameters, $searchCategoryParameters, $ips = null, - $excludedQueryParameters = null, + $excludedQueryParameters = $excludedParameters, $timezone, $currency = null, $group = null, diff --git a/tests/PHPUnit/Framework/XssTesting.php b/tests/PHPUnit/Framework/XssTesting.php index b037a72aa4..568ebcd434 100644 --- a/tests/PHPUnit/Framework/XssTesting.php +++ b/tests/PHPUnit/Framework/XssTesting.php @@ -138,6 +138,8 @@ JS; 'angular-(useragent)', 'twig-(annotation)', 'angular-(Annotation note 3)', + 'twig-(excludedparameter)', + 'angular-(excludedparameter)', 'twig-(scheduledreport)', 'twig-(dimensionname)', 'twig-(category)', diff --git a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php index b3faa1405c..be93db0811 100644 --- a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php +++ b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php @@ -37,7 +37,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase $pageCustomVariables = array(array("page cvar", "page cvar value")), $customCampaignNameQueryParam = "campaignKey", $customCampaignKeywordParam = "keywordKey", $doNotTrack = true, $disableCookies = false, $trackNoScript = true, - $crossDomain = true); + $crossDomain = true, $excludedQueryParams = array("uid", "aid")); $expected = "<!-- Matomo --> <script> @@ -55,6 +55,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase _paq.push([\"setCampaignNameKey\", \"campaignKey\"]); _paq.push([\"setCampaignKeywordKey\", \"keywordKey\"]); _paq.push([\"setDoNotTrack\", true]); + _paq.push([\"setExcludedQueryParams\", [\"uid\",\"aid\"]]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { @@ -114,7 +115,8 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase $visitorCustomVariables = array(array("name", "value"), array("name 2", "value 2")), $pageCustomVariables = array(array("page cvar", "page cvar value")), $customCampaignNameQueryParam = "campaignKey", $customCampaignKeywordParam = "keywordKey", - $doNotTrack = true); + $doNotTrack = true, $disableCookies = false, $trackNoScript = false, + $crossDomain = false, $excludedQueryParams = array("uid", "aid")); $expected = "<!-- Matomo --> <script> @@ -129,6 +131,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase _paq.push([\"setCampaignNameKey\", \"campaignKey\"]); _paq.push([\"setCampaignKeywordKey\", \"keywordKey\"]); _paq.push([\"setDoNotTrack\", true]); + _paq.push([\"setExcludedQueryParams\", [\"uid\",\"aid\"]]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { @@ -161,7 +164,8 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase $visitorCustomVariables = array(array("name", "value"), array("name 2", "value 2")), $pageCustomVariables = array(array("page cvar", "page cvar value")), $customCampaignNameQueryParam = "campaignKey", $customCampaignKeywordParam = "keywordKey", - $doNotTrack = true); + $doNotTrack = true, $disableCookies = false, $trackNoScript = false, + $crossDomain = false, $excludedQueryParams = array("uid", "aid")); $expected = "<!-- Matomo --> <script> @@ -176,6 +180,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase _paq.push([\"setCampaignNameKey\", \"campaignKey\"]); _paq.push([\"setCampaignKeywordKey\", \"keywordKey\"]); _paq.push([\"setDoNotTrack\", true]); + _paq.push([\"setExcludedQueryParams\", [\"uid\",\"aid\"]]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { @@ -241,7 +246,12 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase $visitorCustomVariables = array(array('abc"def', 'abc"def')), $pageCustomVariables = array(array('abc"def', 'abc"def')), $customCampaignNameQueryParam = 'abc"def', - $customCampaignKeywordParam = 'abc"def' + $customCampaignKeywordParam = 'abc"def', + $doNotTrack = false, + $disableCookies = false, + $trackNoScript = false, + $crossDomain = false, + $excludedQueryParams = array('u"id', 'a"id') ); $expected = '<!-- Matomo --> @@ -255,6 +265,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase _paq.push(["setCustomVariable", 1, "abc\"def", "abc\"def", "page"]);' : '') . ' _paq.push(["setCampaignNameKey", "abc\"def"]); _paq.push(["setCampaignKeywordKey", "abc\"def"]); + _paq.push(["setExcludedQueryParams", ["u\"id","a\"id"]]); _paq.push([\'trackPageView\']); _paq.push([\'enableLinkTracking\']); (function() { @@ -302,4 +313,5 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase { return Manager::getInstance()->isPluginActivated('CustomVariables'); } + } diff --git a/tests/UI/expected-screenshots/Comparison_bar_graph.png b/tests/UI/expected-screenshots/Comparison_bar_graph.png index ae20f05380..2d16642c04 100644 --- a/tests/UI/expected-screenshots/Comparison_bar_graph.png +++ b/tests/UI/expected-screenshots/Comparison_bar_graph.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c54701228335f320c741139d0f5bab0cff082ff2e0918a73430717f7f9240f5 -size 54389 +oid sha256:73b76d0e02a8b2b8ccfa36c7420587fbcd783e18a518b24eeb8c8fdd693665d8 +size 54575 diff --git a/tests/UI/expected-screenshots/Comparison_normal_table.png b/tests/UI/expected-screenshots/Comparison_normal_table.png index 50ee7fcf45..ff422b478c 100644 --- a/tests/UI/expected-screenshots/Comparison_normal_table.png +++ b/tests/UI/expected-screenshots/Comparison_normal_table.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9139ee16b88778fdcecf9bcba19dd027d6459d2e978c2a8dc7ae3fe1da55806e -size 113401 +oid sha256:1f8cbd7d2b781ef2e33bb714833cff3b8d945cd337834492fdcd8c1fb41b4484 +size 114929 diff --git a/tests/UI/expected-screenshots/Comparison_normal_table_no_periods.png b/tests/UI/expected-screenshots/Comparison_normal_table_no_periods.png index 2db4f7d31a..c57ec01265 100644 --- a/tests/UI/expected-screenshots/Comparison_normal_table_no_periods.png +++ b/tests/UI/expected-screenshots/Comparison_normal_table_no_periods.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6721a822306e0939d5b65e6f2fab1a49526a896c2d72357969d7d3c3d76abce -size 64710 +oid sha256:c2dbecd1a1e2999fc212cbe5c7d6d8eb0f4c6765cb82bd8d5a8eb397bd8c02a0 +size 65549 diff --git a/tests/UI/expected-screenshots/Comparison_visitors_overview.png b/tests/UI/expected-screenshots/Comparison_visitors_overview.png index c1652c2a49..fff47e4bd8 100644 --- a/tests/UI/expected-screenshots/Comparison_visitors_overview.png +++ b/tests/UI/expected-screenshots/Comparison_visitors_overview.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2383622ec647a964036a416a26f42c1fceb9f4cfabed365663afb3ef7ac7a68c -size 334153 +oid sha256:e987297a37562c8e4b4690f4008e4f184927c1a22f0204080159a25eee0f36b9 +size 334219 diff --git a/tests/UI/expected-screenshots/Comparison_visitors_overview_segment_removed.png b/tests/UI/expected-screenshots/Comparison_visitors_overview_segment_removed.png index 3676c739ee..c0f18893e9 100644 --- a/tests/UI/expected-screenshots/Comparison_visitors_overview_segment_removed.png +++ b/tests/UI/expected-screenshots/Comparison_visitors_overview_segment_removed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d6bcfe63edc688fec45252e63d29f1720d70a18bb5bb8f7e6147fd8a4a37c01 -size 178276 +oid sha256:da9d4f970a46164bf5e935f1f8762a7bc1ba9b58fe20a6564a47d293494e7acd +size 178429 diff --git a/tests/UI/expected-screenshots/Comparison_visitors_overview_switched.png b/tests/UI/expected-screenshots/Comparison_visitors_overview_switched.png index 075eaef025..ab309e38f7 100644 --- a/tests/UI/expected-screenshots/Comparison_visitors_overview_switched.png +++ b/tests/UI/expected-screenshots/Comparison_visitors_overview_switched.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d63e3948f90cc5f3ceb46c3a7500a7967550ef766b10c2056bd40729e5c5239 -size 355074 +oid sha256:afd6b7dbcc71aa173cd01d57b91399da4e612422d3e8adebb568748ad38d457c +size 355121 diff --git a/tests/UI/expected-screenshots/Comparison_visitors_overview_tooltip.png b/tests/UI/expected-screenshots/Comparison_visitors_overview_tooltip.png index 079960a75d..75184e37fc 100644 --- a/tests/UI/expected-screenshots/Comparison_visitors_overview_tooltip.png +++ b/tests/UI/expected-screenshots/Comparison_visitors_overview_tooltip.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38b5fdedb92c110e0afa76df8b054dc7a3f3c689eee6d4538a0749b8aa529bd1 -size 36306 +oid sha256:83cc19ab4f4e5aa2858008d6531bf1c5a0fb6475c3458c21c632bf78588fce1e +size 36404 diff --git a/tests/UI/expected-screenshots/Comparison_visits_overview_widget.png b/tests/UI/expected-screenshots/Comparison_visits_overview_widget.png index 2da18edd2d..a300143045 100644 --- a/tests/UI/expected-screenshots/Comparison_visits_overview_widget.png +++ b/tests/UI/expected-screenshots/Comparison_visits_overview_widget.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e8aa77bfadb3e0bfd97b52792b0050ba8c38da11455d16e38544a2f61ace063 -size 320931 +oid sha256:654110a177050c5207a124b40afc0be961efc51e083c554d8f3af3d55c9dcd78 +size 321014 diff --git a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png index ef52c8a5c6..5b2bfd3c2d 100644 --- a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png +++ b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6b453693a2fcc17812cf474d6b0be977a8b3a5592f2c390729452dcf90392b9 -size 377391 +oid sha256:b3bc7aecb3c1b44c6a39ee9178adbf50995008dfc119329e552185f8afb12204 +size 377347 diff --git a/tests/UI/expected-screenshots/QuickAccess_search_1.png b/tests/UI/expected-screenshots/QuickAccess_search_1.png index e3b9c3720a..d2ae098328 100644 --- a/tests/UI/expected-screenshots/QuickAccess_search_1.png +++ b/tests/UI/expected-screenshots/QuickAccess_search_1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:068647479c8c42eff1b541a16c050448e4d15feb99bad0ade3ab72a9eb7c0f7b -size 97192 +oid sha256:154290d86575f2861311d257ac9754b40bbcd8b866c321dbdc37bc535fa22cd0 +size 96894 diff --git a/tests/UI/expected-screenshots/QuickAccess_search_2.png b/tests/UI/expected-screenshots/QuickAccess_search_2.png index 6a65f0100d..1c1e32984f 100644 --- a/tests/UI/expected-screenshots/QuickAccess_search_2.png +++ b/tests/UI/expected-screenshots/QuickAccess_search_2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7090ec7b89149e88b6212bcb2969a23ad88329cb73bad1842cddeafd69f4a3b5 -size 13820 +oid sha256:e106c8d8150e62cecfa5a44c46811c29cc3f4fc1c1146368868cbfcc4afb64af +size 13595 diff --git a/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png b/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png index 4e9e00331c..5d0287a02d 100644 --- a/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png +++ b/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e9ce05638df6e157d1673db326373122bbb089991cfd6b4f9856cf73982b0e7 -size 222634 +oid sha256:fac1ad00a55e49afb1242be6409481ecf6337ed55d0affcd31128b5459015742 +size 222636 diff --git a/tests/UI/expected-screenshots/Theme_home.png b/tests/UI/expected-screenshots/Theme_home.png index 6dfbcd9954..858b53d362 100644 --- a/tests/UI/expected-screenshots/Theme_home.png +++ b/tests/UI/expected-screenshots/Theme_home.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4bc70ba217633684f56430232d0fcb3fe13e7597fcde7ff85ee72c32e43234b9 -size 736010 +oid sha256:35564a1b19ca6823a2e977efa5b1deb9012b2de043105f2374a18d8ed630da7f +size 736014 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_websites.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_websites.png index 90d6c0f007..6f48d0ed3e 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_websites.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_websites.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30b0c18f0bda277637fe3e9aac30e4ac4c0374cdf080f3cc6d22e388bc0c59af -size 203742 +oid sha256:17f491811d9b8a79fa7abaa7bb7eb04e9fa4dc4210463e260eaa797e75522aad +size 258452 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png b/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png index d5cb018801..72596a2cd9 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44634eadf74af1538514b5a96a05e9a45dd7e856abe0380965d7b8fdfe2e5867 -size 4985109 +oid sha256:97283bcac38de15ea354376e3554411827912136de9cd25542b0d53721729abf +size 4994214 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_category_help.png b/tests/UI/expected-screenshots/UIIntegrationTest_category_help.png index fcdfe5a6db..5de5355908 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_category_help.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_category_help.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:564ac2de34dd354ab09ef491f9a4359d12f299d7ffe46dd963b89a037766e21b -size 124917 +oid sha256:d2c1007162bf53ad0b49743bfaeb759ba9b0af4e0d376623c16f4377336196e7 +size 124911 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports.png b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports.png index 7ba1f89ad1..d337e42c59 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e016c5bda2886901e7728cbeb85f247762e1d37827b5fbb96a26f3ab84eb81ed -size 95499 +oid sha256:4337376bf235d4ac3184967487e048cef034d5c888ebe396660f640fb4573081 +size 95438 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png index 02aa5c4374..0c36e57843 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5021ec05018aef0bde067b62a87c88e5305a5af553c2952ec031c88f4add8962 -size 99956 +oid sha256:cb5b7ba7c1a02df69e97b74ce09b9c706e70789d61808582708bac749fbb465c +size 100709 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png index 6d3d1a9e1b..c98a162cb4 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12b4f0d8a2171fd72c678e47f27c23b8eb01962c28f53cefbbeab0a53367d95b -size 476855 +oid sha256:c1c639dd769c48a8d394a37a23fae273b1433c758a61961739103541a70e9943 +size 477139 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png b/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png index 3c8a7d6181..d30965f9f2 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_glossary.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e93b71cde146772dae327214cd08350aa0c7f86cb6377d1aa10b580381fbd994 -size 604468 +oid sha256:846673e9f2b974e37fe864cfe920f4f3ba1c9e0bc5373c3139f9d8c1d06e7c5a +size 604651 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png b/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png index 9538304d31..d2a1cab7e8 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_glossary_widgetized.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cda4673530bd33aa894e33ade2e94c3931f8194b856a9d4a80c1586a001c7b56 -size 751390 +oid sha256:9cc7c93bff1c5e0f7b75ab352dc8de15d51ee83c711aa9c3f564938de45e75ce +size 751559 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png b/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png index a83e8c3763..55e343e653 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65ed755dfaa25abf1b5ea7433c77f2a73910382cc11be7d5dd12bd23c643c44d -size 78445 +oid sha256:82d7c48108c493e541906efb8ac619ac0f50a050691abb0c387bc403a150b5b1 +size 78449 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png index 8bd7ee0412..7c99d2ea81 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:035898fa91efa0be4a68850ba62658377ff13709f2213acde6867d819bf4c080 -size 108400 +oid sha256:a46e28b6a9ca001cd916de1c5cf8fafdbcc4a59b7622f94f82d054119f3f65f2 +size 108409 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png b/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png index 6e52fedadd..f31cd3b29a 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56b0b949a91ea6afd697e1f6e37e132eb3531ff34cb1884c857c0b0f59f9715c -size 190846 +oid sha256:37c5efff1ec57a298b5fb468419058ce8bb2d4fa448901649753e0b61672a986 +size 190884 diff --git a/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png b/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png index ef96d02c44..6f09a3ddf8 100644 --- a/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png +++ b/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc155ae78fca63dc3480696b6e4668e0b04d599a4970d857ec86d483d437ec4c -size 232780 +oid sha256:aedf10314cc1f6703831baf47e78c784e2823f0aaa96246668fbc725c2991aaa +size 232997 diff --git a/tests/javascript/index.php b/tests/javascript/index.php index 8f66b3198f..38c023f336 100644 --- a/tests/javascript/index.php +++ b/tests/javascript/index.php @@ -2096,7 +2096,7 @@ function PiwikTest() { }); test("API methods", function() { - expect(120); + expect(121); equal( typeof Piwik.addPlugin, 'function', 'addPlugin' ); equal( typeof Piwik.addPlugin, 'function', 'addTracker' ); @@ -2164,6 +2164,7 @@ function PiwikTest() { equal( typeof tracker.disablePerformanceTracking, 'function', 'disablePerformanceTracking' ); equal( typeof tracker.setCampaignKeywordKey, 'function', 'setCampaignKeywordKey' ); equal( typeof tracker.discardHashTag, 'function', 'discardHashTag' ); + equal( typeof tracker.setExcludedQueryParams, 'function', 'setExcludedQueryParams' ); equal( typeof tracker.setCookieNamePrefix, 'function', 'setCookieNamePrefix' ); equal( typeof tracker.setCookieDomain, 'function', 'setCookieDomain' ); equal( typeof tracker.setCookiePath, 'function', 'setCookiePath' ); @@ -2392,7 +2393,7 @@ function PiwikTest() { }); test("Tracker getHostName(), *UrlParameter(), urlFixup(), domainFixup(), titleFixup() and purify()", function() { - expect(81); + expect(85); var tracker = Piwik.getTracker(); @@ -2508,6 +2509,14 @@ function PiwikTest() { equal( tracker.hook.test._purify('http://example.com'), 'http://example.com', 'http://example.com'); equal( tracker.hook.test._purify('http://example.com#hash'), 'http://example.com', 'http://example.com#hash'); equal( tracker.hook.test._purify('http://example.com/?q=xyz#hash'), 'http://example.com/?q=xyz', 'http://example.com/?q=xyz#hash'); + + tracker.setExcludedQueryParams(['sid', 'test']); + + equal( tracker.hook.test._purify('http://example.com/?sid=12345&test5=1'), 'http://example.com/?test5=1', 'http://example.com/?sid=12345&test5=1'); + equal( tracker.hook.test._purify('http://example.com/?asid=12345&test=1'), 'http://example.com/?asid=12345', 'http://example.com/?asid=12345&test=1'); + equal( tracker.hook.test._purify('http://example.com/?sid=test#hash'), 'http://example.com/', 'http://example.com/?sid=test#hash'); + equal( tracker.hook.test._purify('http://example.com/?sid=test&sidtest=xyz#test'), 'http://example.com/?sidtest=xyz', 'http://example.com/?sid=test&sidtest=xyz#test'); + }); // support for setCustomUrl( relativeURI ) |