diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-12-03 22:42:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 22:42:14 +0300 |
commit | 0d5053c6d0f0f539d8ad460af70ce7cc86420fd0 (patch) | |
tree | 15dc3ca7f8a872ad7abf1c7f44b1f26885b15d32 /tests | |
parent | 8e2d7c590c952568bbfa190b10b967ea33269ad5 (diff) |
When forcing GET request method in JS tracker then disable send beacon (#16870)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/javascript/index.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php index 2f91e16423..3fd38fa141 100644 --- a/tests/javascript/index.php +++ b/tests/javascript/index.php @@ -3269,7 +3269,7 @@ function PiwikTest() { }); test("POST requests are sent with cookies", function() { - expect(3); + expect(5); var tracker = Piwik.getTracker(); tracker.setTrackerUrl("matomo.php"); @@ -3283,6 +3283,9 @@ function PiwikTest() { ok(event.success, 'succeeded'); ok(event.xhr && event.xhr.withCredentials, 'withCredentials is true'); }); + ok(tracker.isUsingAlwaysUseSendBeacon()); + tracker.setRequestMethod('GeT'); + ok(!tracker.isUsingAlwaysUseSendBeacon()); stop(); setTimeout(function() { |