Skip to content

Commit

Permalink
February 2024 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlin-sfgov authored Mar 1, 2024
2 parents 2a70ee4 + d1b5986 commit dfa2c97
Show file tree
Hide file tree
Showing 95 changed files with 3,952 additions and 4,171 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,20 @@ jobs:
JEST_JUNIT_OUTPUT_DIR: ./reports/junit/
- store_test_results:
path: ./reports/junit/
- store_artifacts:
path: app/javascript/test-coverage
unit-rspec:
<<: *defaults
steps:
- setup
- run: wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- run: sudo apt-get update -y
- run: sudo apt-get install graphicsmagick
- run: RAILS_ENV=test bundle exec rails db:create
- run: RAILS_ENV=test bundle exec rails db:test:prepare
- run: bundle exec rake spec
- store_artifacts:
path: coverage
unit-angular:
<<: *defaults
steps:
Expand Down
5 changes: 1 addition & 4 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
EASYPOST_API_KEY=''
SFGOV_DATA_USERNAME=''
SFGOV_DATA_PASSWORD=''
SFGOV_DATA_APP_TOKEN=''
LOCALHOST=''
GOOGLE_TAG_MANAGER_KEY=''
S3_ACCESS_KEY=''
Expand All @@ -16,7 +13,7 @@ SALESFORCE_PASSWORD=''
SALESFORCE_SECURITY_TOKEN=''
SALESFORCE_CLIENT_SECRET=''
SALESFORCE_CLIENT_ID=''
SALESFORCE_HOST='test.salesforce.com'
SALESFORCE_HOST=''
SALESFORCE_INSTANCE_URL=''
S3_BUCKET=''
RESOURCE_URL=''
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ module.exports = {
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
cy: "readonly",
Cypress: "readonly",
},
// Specifies the ESLint parser
parser: "@typescript-eslint/parser",
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ yarn-debug.log*
.DS_Store

# Test output
coverage
app/javascript/test-coverage
junit.xml
cypress/screenshots/*
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gem "sprockets-rails"
gem 'sprockets_uglifier_with_source_maps'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'puma', '~> 5.6.8'
gem 'puma', '~> 6.4.2'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.8.0'
Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ GEM
net-protocol
newrelic_rpm (9.0.0)
nio4r (2.7.0)
nokogiri (1.14.2-arm64-darwin)
nokogiri (1.16.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.2-x86_64-darwin)
nokogiri (1.16.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.2-x86_64-linux)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
oj (3.14.2)
oj_mimic_json (1.0.1)
Expand All @@ -286,9 +286,9 @@ GEM
pry (>= 0.10.4)
psych (3.3.4)
public_suffix (5.0.1)
puma (5.6.8)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.6.2)
racc (1.7.3)
rack (2.2.6.4)
rack-cors (1.0.6)
rack (>= 1.6.0)
Expand Down Expand Up @@ -521,7 +521,7 @@ DEPENDENCIES
pry-byebug
pry-rails
psych (< 4)
puma (~> 5.6.8)
puma (~> 6.4.2)
rack (>= 2.2.3)
rack-cors (~> 1.0.5)
rack-rewrite (~> 1.5.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ ListingPreferenceService = ($http, ListingConstantsService, ListingIdentityServi
!_.invert(Service.preferenceMap)[listingPref.preferenceName]
customProofPreferences = _.remove customPreferences, (customPref) ->
_.includes(Service.hardcodeCustomProofPrefs, customPref.preferenceName)

# custom preferences related to Veterans should not be seen by applicants
_.remove(customPreferences, (pref) -> _.includes(pref.preferenceName?.toLowerCase(), "veteran"))

listing.customPreferences = _.sortBy customPreferences, (pref) -> pref.order
listing.customProofPreferences = _.sortBy customProofPreferences, (pref) -> pref.order

Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/shared/SharedService.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ SharedService = ($http, $state, $window, $document) ->
$window.VETERANS_APPLICATION_QUESTION is 'true' &&
!!listing.Listing_Lottery_Preferences &&
_.some(listing.Listing_Lottery_Preferences, (pref) ->
pref?.Lottery_Preference?.Name?.toLowerCase().includes("veteran")
_.includes(pref?.Lottery_Preference?.Name?.toLowerCase(), "veteran")
)

return Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,19 +718,13 @@ ShortFormApplicationController = (
$scope.preferences.veterans_household_member = null

$scope.checkAfterVeteransPreference = ->
# We don't want to show custom-preference page at all right now, because of the new combo-preferences in salesforce
# We might want to re-enable them in the future
# $scope.checkForCustomPreferences()
$scope.checkIfNoPreferencesSelected()
$scope.checkForCustomPreferences()

$scope.checkAfterPreferencesPrograms = ->
if $scope.showVeteransApplicationQuestion()
ShortFormNavigationService.goToApplicationPage('dahlia.short-form-application.veterans-preference')
else
# We don't want to show custom-preference page at all right now, because of the new combo-preferences in salesforce
# We might want to re-enable them in the future
# $scope.checkForCustomPreferences()
$scope.checkIfNoPreferencesSelected()
$scope.checkForCustomPreferences()


########## END VETERANS PREFERENCE LOGIC ##########
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,8 @@ ShortFormNavigationService = (
when 'review-optional'
if ShortFormApplicationService.applicantHasNoPreferences()
'general-lottery-notice'
# We don't want to show custom-preference page at all right now, because of the new combo-preferences in salesforce
# We might want to re-enable them in the future
# else if Service.hasCustomPreferences()
# 'custom-preferences'
else if Service.hasCustomPreferences()
'custom-preferences'
else if !Service.showVeteransApplicationQuestion()
'preferences-programs'
else
Expand Down Expand Up @@ -493,18 +491,12 @@ ShortFormNavigationService = (
"custom-proof-preferences({prefIdx: #{currentIndex - 1}})"

Service.getPrevPageOfGeneralLottery = ->
# We don't want to show custom-preference page at all right now, because of the new combo-preferences in salesforce
# We might want to re-enable them in the future
# customProofPreferences = ShortFormApplicationService.listing.customProofPreferences
# if customProofPreferences.length
# "custom-proof-preferences({prefIdx: #{customProofPreferences.length - 1}})"
# else if Service.hasCustomPreferences()
# 'custom-preferences'
# else if !Service.showVeteransApplicationQuestion()
# 'preferences-programs'
# else
# 'veterans-preference'
if !Service.showVeteransApplicationQuestion()
customProofPreferences = ShortFormApplicationService.listing.customProofPreferences
if customProofPreferences.length
"custom-proof-preferences({prefIdx: #{customProofPreferences.length - 1}})"
else if Service.hasCustomPreferences()
'custom-preferences'
else if !ShortFormApplicationService.showVeteransApplicationQuestion
'preferences-programs'
else
'veterans-preference'
Expand Down
8 changes: 4 additions & 4 deletions app/assets/json/translations/react/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@
"listings.apply.submitAPaperApplication": "Submit a Paper Application",
"listings.apply.visitAHousingCounselor": "Visit a local housing counselor for help with your application.",
"listings.apply.visitHomeownershipSf": "Visit HomeownershipSF",
"listings.atTotalIncome": "at <span class='eligibility-subtext'>$%{income}</span> %{per}",
"listings.atTotalIncome": "at <span className='eligibility-subtext'>$%{income}</span> %{per}",
"listings.availableAndWaitlist": "Available Units & Open Waitlist",
"listings.availableUnits": "Available Units",
"listings.availableUnitsAndOpenWaitlist": "Available Units & Open Waitlist",
Expand All @@ -860,7 +860,7 @@
"listings.call": "Call %{phoneNumber}",
"listings.cc&r": "Covenants, Conditions and Restrictions (CC&R's)",
"listings.cc&rDescription": "The CC&R's explain the rules of the homeowners' association, and restrict how you can modify the property.",
"listings.clickForOtherLisitings": "<a class='lined' href='%{url}'>Click Here</a> for other rental and ownership affordable housing opportunities.",
"listings.clickForOtherLisitings": "<a className='lined' href='%{url}'>Click Here</a> for other rental and ownership affordable housing opportunities.",
"listings.confirmedPreferenceList": "Confirmed %{preference} List",
"listings.currentWaitlistSize": "Current Waitlist Size",
"listings.customListingType.educator": "SF public schools employee housing",
Expand Down Expand Up @@ -933,7 +933,7 @@
"listings.features.unitFeatures": "Unit Features",
"listings.features.utilities": "Utilities",
"listings.finalWaitlistSize": "Final Waitlist Size",
"listings.forHouseholdSize": "for <span class='eligibility-subtext'>%{size}</span> %{people}",
"listings.forHouseholdSize": "for <span className='eligibility-subtext'>%{size}</span> %{people}",
"listings.forIncomeCalculations": "For income calculations, household size includes everyone (all ages) living in the unit.",
"listings.habitat.applicationProcess.ol1": "You must go to a <a target='_blank' href='%{infoSessionLink}'>Habitat for Humanity information session</a>.",
"listings.habitat.applicationProcess.ol10": "You can move into your new home!",
Expand Down Expand Up @@ -966,7 +966,7 @@
"listings.housingProgram": "Housing Program",
"listings.importantProgramRules": "Important Program Rules",
"listings.includesPriorityUnits": "Includes Priority Units for:",
"listings.includingChildren": "(including <span class='eligibility-subtext'>%{number} %{children}</span> under 6)",
"listings.includingChildren": "(including <span className='eligibility-subtext'>%{number} %{children}</span> under 6)",
"listings.incomeExceptions.intro": "People in your household may need <a href='%{url}' target='_blank'>special income calculations</a> if they:",
"listings.incomeExceptions.nontaxable": "Receive non-taxable income (non-taxable income might include SSI, SSDI, child support payments, and worker’s compensation benefits).",
"listings.incomeExceptions.students": "Are full-time students (but not the primary applicant).",
Expand Down
12 changes: 6 additions & 6 deletions app/assets/json/translations/react/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,12 @@
"f2ReviewTerms.title": "Términos",
"footer.cityCountyOfSf": "Ciudad y condado de San Francisco",
"footer.contact": "Comuníquese con",
"footer.dahliaDescription": "DAHLIA: El Portal de Vivienda de San Francisco es un proyecto de la <br/><a class='text-white' href='%{mohcdUrl}' target='_blank'>Oficina de Desarrollo Comunitario y de Viviendas del Alcalde</a>",
"footer.dahliaDescription": "DAHLIA: El Portal de Vivienda de San Francisco es un proyecto de la <br/><a className='text-white' href='%{mohcdUrl}' target='_blank'>Oficina de Desarrollo Comunitario y de Viviendas del Alcalde</a>",
"footer.disclaimer": "Aviso de responsabilidad",
"footer.forGeneralQuestions": "Si desea hacer una consulta general sobre el programa, comuníquese con MOHCD al 415-701-5500.",
"footer.forListingQuestions": "Si desea hacer preguntas sobre los anuncios y la solicitud, comuníquese con el agente del anuncio.",
"footer.giveFeedback": "Envíe sus comentarios",
"footer.inPartnershipWith": "en colaboración con la<br/><a class='text-white' href='%{sfdsUrl}' target='_blank'>Departamento de Servicios Digitales de San Francisco (San Francisco Digital Services)</a><br/><a class='text-white' href='%{mayorUrl}' target='_blank'>Oficina de Innovación Cívica de la Alcaldía (Mayor's Office of Civic Innovation)</a>",
"footer.inPartnershipWith": "en colaboración con la<br/><a className='text-white' href='%{sfdsUrl}' target='_blank'>Departamento de Servicios Digitales de San Francisco (San Francisco Digital Services)</a><br/><a className='text-white' href='%{mayorUrl}' target='_blank'>Oficina de Innovación Cívica de la Alcaldía (Mayor's Office of Civic Innovation)</a>",
"footer.listingQuestions": "Si desea hacer preguntas sobre los anuncios y la solicitud, comuníquese con el agente del anuncio.",
"footer.privacyPolicy": "Política de Privacidad",
"forgotPassword.emailSentDescription": "Recibirá un correo electrónico con un enlace para restablecer su contraseña.",
Expand Down Expand Up @@ -842,7 +842,7 @@
"listings.apply.submitAPaperApplication": "Presente una solicitud impresa",
"listings.apply.visitAHousingCounselor": "Visite a un consejero de vivienda local si desea recibir ayuda con su solicitud.",
"listings.apply.visitHomeownershipSf": "Visite HomeownershipSF",
"listings.atTotalIncome": "a <span class='eligibility-subtext'>$%{income}</span> %{per}",
"listings.atTotalIncome": "a <span className='eligibility-subtext'>$%{income}</span> %{per}",
"listings.availableAndWaitlist": "Unidades disponibles y lista de espera abierta",
"listings.availableUnits": "Unidades disponibles",
"listings.availableUnitsAndOpenWaitlist": "Unidades disponibles y lista de espera abierta",
Expand All @@ -856,7 +856,7 @@
"listings.call": "Llame al %{phoneNumber}",
"listings.cc&r": "Cláusulas, condiciones y restricciones (Covenants, Conditions and Restrictions, CC&R)",
"listings.cc&rDescription": "Las CC&R establecen las normas de la asociación de propietarios y limitan la modificación de la propiedad.",
"listings.clickForOtherLisitings": "<a class='lined' href='%{url}'>Haga clic aquí</a> para ver otras oportunidades de alquiler y de compra de vivienda asequible.",
"listings.clickForOtherLisitings": "<a className='lined' href='%{url}'>Haga clic aquí</a> para ver otras oportunidades de alquiler y de compra de vivienda asequible.",
"listings.confirmedPreferenceList": "Lista de %{preference} confirmada",
"listings.currentWaitlistSize": "Tamaño de la lista de espera actual",
"listings.customListingType.educator": "Viviendas para empleados de las escuelas públicas de SF",
Expand Down Expand Up @@ -929,7 +929,7 @@
"listings.features.unitFeatures": "Características de la unidad",
"listings.features.utilities": "Servicios públicos",
"listings.finalWaitlistSize": "Tamaño de la lista de espera final",
"listings.forHouseholdSize": "para <span class='eligibility-subtext'>%{size}</span> %{people}",
"listings.forHouseholdSize": "para <span className='eligibility-subtext'>%{size}</span> %{people}",
"listings.forIncomeCalculations": "Para el cálculo de los ingresos, tenga en cuenta que el tamaño del grupo familiar incluye a todas las personas (de cualquier edad) que viven en la unidad.",
"listings.habitat.applicationProcess.ol1": "Debe asistir a una <a target='_blank' href='%{infoSessionLink}'>sesión informativa de Habitat for Humanity</a>.",
"listings.habitat.applicationProcess.ol10": "¡Puede mudarse a su nueva casa!",
Expand Down Expand Up @@ -962,7 +962,7 @@
"listings.housingProgram": "Programa de vivienda",
"listings.importantProgramRules": "Reglas Importantes del Programa",
"listings.includesPriorityUnits": "Incluye unidades prioritarias para:",
"listings.includingChildren": "(incluidos <span class='eligibility-subtext'>%{number} %{children}</span> menores de 6 años)",
"listings.includingChildren": "(incluidos <span className='eligibility-subtext'>%{number} %{children}</span> menores de 6 años)",
"listings.incomeExceptions.intro": "Las personas en su hogar pueden necesitar <a href='%{url}' target='_blank'> cálculos de ingresos especiales</a> en el caso que ellos",
"listings.incomeExceptions.nontaxable": "Recibir ingresos no gravables (los ingresos no gravables pueden incluir SSI, SSDI, pagos de manutención infantil e indemnizaciones por accidentes laborales).",
"listings.incomeExceptions.students": "Sean estudiantes de tiempo completo (no se aplica al solicitante principal)",
Expand Down
Loading

0 comments on commit dfa2c97

Please sign in to comment.