-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix angular tests #2466
base: main
Are you sure you want to change the base?
fix angular tests #2466
Conversation
Service.trackEvent = (event, properties) -> | ||
dataLayer = window.dataLayer || [] | ||
combinedProperties = Object.assign({}, Service.resetProperties, properties) | ||
unless combinedProperties.label | ||
unless properties.label | ||
# by default, grab the end of the URL e.g. the "contact" from "/x/y/z/contact" | ||
current_path = _.first(_.last($state.current.url.split('/')).split('?')) | ||
combinedProperties.label = current_path | ||
combinedProperties.event = event | ||
combinedProperties.event_timestamp = new Date().toISOString(); | ||
dataLayer.push(combinedProperties) | ||
properties.label = current_path | ||
properties.event = event | ||
properties.event_timestamp = new Date().toISOString(); | ||
dataLayer.push(properties) |
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.
I wanted to keep the resetProperties object around, but it was causing issues with the tests so I figured it was more trouble than it was worth
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.
Thanks for fixing!
@chadbrokaw The tests are still failing, but it's because of a salesforce error! I've notified the Salesforce channel |
Description
This PR addresses an issue with a previous PR where tests where angular tests were failing.
To test, please pull down the branch and run
bundle exec rake jasmine:ci
Jira ticket
DAH-3043
Checklist before requesting review
Version Control
angular
if it contains updates to Angular codetype: TICKET-NUMBER Description
format, e.g.feat: DAH-123 New Feature
Code quality
Review instructions
Request review
needs review
labelHousing Eng
group to automatically assign reviewers, and/or assign specific engineers