-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ATS-analytics - fix check for safari browser #5474
Conversation
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.
please add a unit test
This pull request introduces 1 alert when merging 9d3b306 into a2ec9c2 - view on LGTM.com new alerts:
|
@@ -2,7 +2,7 @@ import atsAnalyticsAdapter from '../../../modules/atsAnalyticsAdapter.js'; | |||
import { expect } from 'chai'; | |||
import adapterManager from 'src/adapterManager.js'; | |||
import {server} from '../../mocks/xhr.js'; | |||
import {browserIsChrome, browserIsEdge, browserIsFirefox, browserIsSafari} from '../../../modules/atsAnalyticsAdapter.js'; | |||
import {checkUserBrowser, browserIsChrome, browserIsEdge, browserIsSafari} from '../../../modules/atsAnalyticsAdapter.js'; |
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.
Is there a reason for not testing browserIsFirefox()?
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.
Hi, yes, I didn't manage to mock InstallTrigger. We use this check to determine if user browser is firefox
(typeof InstallTrigger !== 'undefined').
https://developer.mozilla.org/en-US/docs/Web/API/InstallTrigger
https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser/9851769
Hi @bretg, |
Type of change
Description of change
Safari is reporting a value of “false” for userBrowser in ATS Analytics.
Other information
@bretg