Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix angular tests #2466

wants to merge 1 commit into from

Conversation

chadbrokaw
Copy link
Collaborator

@chadbrokaw chadbrokaw commented Dec 19, 2024

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

  • branch name begins with angular if it contains updates to Angular code
  • branch name contains the Jira ticket number
  • PR name follows type: TICKET-NUMBER Description format, e.g. feat: DAH-123 New Feature

Code quality

  • the set of changes is small
  • all automated code checks pass (linting, tests, coverage, etc.)
  • code irrelevant to the ticket is not modified e.g. changing indentation due to automated formatting
  • if the code changes the UI, it matches the UI design exactly
  • if the changes include human translations, follow the human translations process

Review instructions

  • instructions specify which environment(s) it applies to
  • instructions work for PA testers
  • instructions have already been performed at least once

Request review

  • PR has needs review label
  • Use Housing Eng group to automatically assign reviewers, and/or assign specific engineers
  • If time sensitive, notify engineers in Slack

@chadbrokaw chadbrokaw requested review from a team, tallulahkay and jimlin-sfgov and removed request for a team December 19, 2024 23:50
@chadbrokaw chadbrokaw marked this pull request as ready for review December 19, 2024 23:50
Comment on lines 9 to +17
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)
Copy link
Collaborator Author

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

Copy link
Contributor

@tallulahkay tallulahkay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@tallulahkay
Copy link
Contributor

tallulahkay commented Dec 20, 2024

@chadbrokaw The tests are still failing, but it's because of a salesforce error! I've notified the Salesforce channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants