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

Merge develop -> main for new release ver 1.3.6 #990

Merged
merged 78 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
2a1c2c2
collaps result summary in mobile
shawn320 Nov 24, 2023
235b78b
title language fix
shawn320 Nov 24, 2023
b6337c0
changed date to 1900 to match error message
MarcoGoC Nov 27, 2023
33ead0f
Merge pull request #953 from DTS-STN/mobile-collapse
shawn320 Nov 28, 2023
c04697b
Checking in tests
Maxim-Lam Nov 29, 2023
788a173
force white background on select
MarcoGoC Nov 29, 2023
780c839
check benefit exists
MarcoGoC Nov 30, 2023
911533f
Merge pull request #954 from DTS-STN/153393-AgeValidation
MarcoGoC Nov 30, 2023
28c4c67
just to check deployment
MarcoGoC Nov 30, 2023
6d406fe
update title
shawn320 Nov 30, 2023
4c81370
final test fixes.
Maxim-Lam Nov 30, 2023
c7ac33e
update
shawn320 Nov 30, 2023
32330e3
change reference to ALWS
Maxim-Lam Nov 30, 2023
0f8a4c1
Merge pull request #956 from DTS-STN/157393-FixCrash
MarcoGoC Nov 30, 2023
e0f2197
change year to 1899
MarcoGoC Dec 1, 2023
bb3098d
initial commit
andr0272 Dec 4, 2023
4c4d014
Merge pull request #958 from DTS-STN/134866-add-alw-scenarios
Maxim-Lam Dec 6, 2023
603156b
Update build-and-push-dev.yml
andr0272 Dec 6, 2023
b99fb9a
Update build-and-push-prod.yml
andr0272 Dec 6, 2023
bc4bf66
Update build-and-push-dev.yml
andr0272 Dec 6, 2023
f7d268a
Update build-and-push-prod.yml
andr0272 Dec 6, 2023
120950e
Merge pull request #961 from DTS-STN/azure-pipelines
andr0272 Dec 7, 2023
bac3545
fixing trigger and cleanup
andr0272 Dec 7, 2023
f90df99
Merge pull request #959 from DTS-STN/153393-AgeValidation
MarcoGoC Dec 7, 2023
9ac9ddf
Merge pull request #955 from DTS-STN/156845-BG-Color
MarcoGoC Dec 7, 2023
6f6ccb1
fix:updated rates for Q1 2024
numbap Dec 7, 2023
62b0ea8
updated links and border color on focus
MarcoGoC Dec 7, 2023
fba7ce8
fix:updated rates for Q1 2024
numbap Dec 8, 2023
805a9ec
fix: removed excess packages
numbap Dec 8, 2023
ff39539
Merge pull request #963 from DTS-STN/156831-Links
MarcoGoC Dec 8, 2023
fa22222
Merge pull request #962 from DTS-STN/azure-pipelines
andr0272 Dec 8, 2023
380682a
Adding pipeline secrets
andr0272 Dec 8, 2023
e3658a8
Use fieldDefinition instead of categoryMapping
shawn320 Dec 8, 2023
7c7f2fa
Adding values for variables, removing unused secrets
andr0272 Dec 11, 2023
53af9a9
ADO 134595: Refactor benefitHandler (#960)
alex-solo Dec 11, 2023
6010afc
Undoing previous commit, cleaning up the variable names
andr0272 Dec 11, 2023
158245a
Using a new service principal
andr0272 Dec 11, 2023
751fb21
Merge branch 'develop' into result-capital
shawn320 Dec 11, 2023
95a5aa2
Merge pull request #965 from DTS-STN/pipeline-secrets
andr0272 Dec 11, 2023
7393e5a
Merge branch 'develop' into result-capital
shawn320 Dec 11, 2023
950f2f8
July 2013 OAS deferral (#945)
alex-solo Dec 11, 2023
69c907c
Merge pull request #957 from DTS-STN/result-capital
shawn320 Dec 11, 2023
066a0ff
updated link anchor for footer
MarcoGoC Dec 11, 2023
b8623ab
update width
shawn320 Dec 11, 2023
44f508a
update
shawn320 Dec 11, 2023
4f43946
Adding the NEXT_AUTH_SECRET variable
andr0272 Dec 11, 2023
4f47300
Adding the EXPOSE instruction for the proper port of this app
andr0272 Dec 11, 2023
520bd4f
Merge pull request #968 from DTS-STN/pipeline-secrets
andr0272 Dec 11, 2023
91e0300
Merge pull request #969 from DTS-STN/DockerfileExposePort
andr0272 Dec 11, 2023
d5658a6
Merge pull request #967 from DTS-STN/update-width
shawn320 Dec 12, 2023
bc504c8
Merge pull request #964 from DTS-STN/q124-rate-update
numbap Dec 12, 2023
94065ad
Revert "Q124 rate update"
numbap Dec 12, 2023
6ff3ae9
Merge pull request #970 from DTS-STN/revert-964-q124-rate-update
numbap Dec 12, 2023
06d1125
removing an underscore (#971)
andr0272 Dec 12, 2023
8509cb3
Pipeline underscore (#972)
andr0272 Dec 12, 2023
c307149
Pipeline underscore2 (#974)
andr0272 Dec 13, 2023
8f3b4d8
Merge pull request #966 from DTS-STN/156831-Links
MarcoGoC Dec 13, 2023
55e75ef
Fix 143948
Maxim-Lam Dec 15, 2023
81bab3b
fix for failing tests
Maxim-Lam Dec 15, 2023
09507cc
Pipeline updates (#977)
andr0272 Dec 15, 2023
32d74fb
Pipeline underscore (#973)
andr0272 Dec 15, 2023
837d8b0
clarify comment
Maxim-Lam Dec 15, 2023
11a6856
Merge pull request #976 from DTS-STN/143948-gap-in-residency-bug
Maxim-Lam Dec 15, 2023
299ed53
Pipeline updates (#978)
andr0272 Dec 15, 2023
ac394b4
added condition for partner legal status
MarcoGoC Dec 18, 2023
ee6d5f9
Merge pull request #981 from DTS-STN/160795-Future
MarcoGoC Dec 18, 2023
2257dd7
updated dev yml
MarcoGoC Dec 18, 2023
5dadaea
Merge pull request #982 from DTS-STN/143689-Update-NextAuth
MarcoGoC Dec 18, 2023
a0af7e8
hotfix typo
Maxim-Lam Dec 19, 2023
761ad9f
fix:ran scraper
numbap Dec 19, 2023
cd886df
fix:ran scraper
numbap Dec 19, 2023
2ed7490
Remove leading space in message, fix for 40 years not displaying
Maxim-Lam Dec 19, 2023
a3799ec
added params to current result benefit handler
Maxim-Lam Dec 19, 2023
564fbee
Merge pull request #985 from DTS-STN/143948-hotfix
Maxim-Lam Dec 19, 2023
fa31190
super hotfix
Maxim-Lam Dec 20, 2023
9e58ce4
Merge pull request #987 from DTS-STN/143948-super-hotfix
Maxim-Lam Dec 20, 2023
97f018d
Merge main (#989)
andr0272 Dec 20, 2023
9ab895f
Merge pull request #986 from DTS-STN/q124-new-branch
MarcoGoC Dec 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .azuredevops/build-and-push-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
trigger:
- develop

pr: none

variables:
azureContainerRegistry.repository: 'oas/eligibility-estimator'
azureContainerRegistry.name: 'DTSShared-December/2023'
azureContainerRegistry.domain: 'dtsshared.azurecr.io'
app.environment: development
app.buildDate: $[ format('{0:yyyy}-{0:MM}-{0:dd}', pipeline.startTime) ]
app.domain: 'https://app-eligibilityestimator-dev.azurewebsites.net/'
app.logLevel: 'info'
image.tag: '$(Build.SourceVersion)'
System.Debug: false

stages:
- stage: Cache
displayName: Pull latest image for caching
jobs:
- job:
displayName: Pull latest image
steps:
- task: Docker@2
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'login'

- script: 'docker pull $(azureContainerRegistry.domain)/$(azureContainerRegistry.repository):latest'
displayName: Pull latest for layer caching
continueOnError: true

- stage: Build
displayName: Build and Push to ACR
jobs:
- job: Build
displayName: Build and Push Container
steps:
- bash: |
short_hash=`git rev-parse --short=7 HEAD`
echo ""
echo "Full git hash: $(Build.SourceVersion)"
echo "Short git hash: $short_hash"
echo "##vso[task.setvariable variable=image.tag]$short_hash"
workingDirectory: $(Build.SourcesDirectory)
displayName: Get short git hash
- task: AzureKeyVault@2
inputs:
azureSubscription: 'id-eligibilityestimator-dev'
KeyVaultName: 'kv-oas-ee-dev'
SecretsFilter: 'DEV-ADOBE-ANALYTICS-URL, NEXT-AUTH-PASSWORD, NEXT-AUTH-USERCODE'
RunAsPreJob: false

- task: Docker@2
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'build'
Dockerfile: './Dockerfile'
tags: |
$(image.tag)
latest
release-candidate
arguments: |
--pull
--cache-from $(azureContainerRegistry.domain)/$(azureContainerRegistry.repository):latest
--build-arg home=/app
--build-arg NEXT_BUILD_DATE=$(app.buildDate)
--build-arg NEXTAUTH_URL=$(app.domain)
--build-arg NEXT_AUTH_USERNAME=$(NEXT-AUTH-USERCODE)
--build-arg NEXT_AUTH_PASSWORD=$(NEXT-AUTH-PASSWORD)
--build-arg NEXTAUTH_SECRET=$(NEXT_AUTH_SECRET)
--build-arg ADOBE_ANALYTICS_URL=$(DEV-ADOBE-ANALYTICS-URL)
--build-arg APP_ENV=$(app.environment)
--build-arg LOGGING_LEVEL=$(app.logLevel)

- task: Docker@2
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'push'
tags: |
$(image.tag)
latest
release-candidate
84 changes: 84 additions & 0 deletions .azuredevops/build-and-push-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
trigger:
- main

pr: none

variables:
azureContainerRegistry.repository: 'oas/eligibility-estimator'
azureContainerRegistry.name: 'DTSShared-December/2023'
azureContainerRegistry.domain: 'dtsshared.azurecr.io'
app.environment: production
app.buildDate: $[ format('{0:yyyy}-{0:MM}-{0:dd}', pipeline.startTime) ]
app.domain: 'https://app-eligibilityestimator-prod.azurewebsites.net/'
app.logLevel: 'info'
image.tag: '$(Build.SourceVersion)'

stages:
- stage: Cache
displayName: Pull latest image for caching
jobs:
- job:
displayName: Pull latest image
steps:
- task: Docker@2
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'login'

- script: 'docker pull $(azureContainerRegistry.domain)/$(azureContainerRegistry.repository):latest'
displayName: Pull latest for layer caching
continueOnError: true
- stage: Build
displayName: Build and Push to ACR
jobs:
- job: Build
displayName: Build and Push Container
steps:
- bash: |
short_hash=`git rev-parse --short=7 HEAD`
echo ""
echo "Full git hash: $(Build.SourceVersion)"
echo "Short git hash: $short_hash"
echo "##vso[task.setvariable variable=image.tag]$short_hash"
workingDirectory: $(Build.SourcesDirectory)
displayName: Get short git hash
- task: AzureKeyVault@2
inputs:
azureSubscription: 'id-eligibilityestimator-prod'
KeyVaultName: 'kv-oas-ee-prod'
SecretsFilter: 'PROD-ADOBE-ANALYTICS-URL, NEXT-AUTH-PASSWORD, NEXT-AUTH-USERCODE'
RunAsPreJob: false

- task: Docker@2
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'build'
Dockerfile: './Dockerfile'
tags: |
$(image.tag)
latest
production-release
arguments: |
--pull
--cache-from $(azureContainerRegistry.domain)/$(azureContainerRegistry.repository):latest
--build-arg home=/app
--build-arg NEXT_BUILD_DATE=$(app.buildDate)
--build-arg NEXTAUTH_URL=$(app.domain)
--build-arg NEXT_AUTH_USERNAME=$(NEXT-AUTH-USERCODE)
--build-arg NEXT_AUTH_PASSWORD=$(NEXT-AUTH-PASSWORD)
--build-arg NEXTAUTH_SECRET=$(NEXT_AUTH_SECRET)
--build-arg ADOBE_ANALYTICS_URL=$(PROD-ADOBE-ANALYTICS-URL)
--build-arg APP_ENV=$(app.environment)
--build-arg LOGGING_LEVEL=$(app.logLevel)

- task: Docker@2
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'push'
tags: |
$(image.tag)
latest
production-release
98 changes: 98 additions & 0 deletions .azuredevops/dynamic-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
trigger:
- none

pr: develop

variables:
azure.servicePrincipal: ''
webapp.name: ''
webapp.resourceGroup: ''
webapp.slotName: null
azureContainerRegistry.name: ''
azureContainerRegistry.repository: ''
azureContainerRegistry.domain: ''
azureContainerRegistry.tag: ''
System.Debug: false

steps:
- task: Docker@2
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'login'
- script: 'docker pull $(azureContainerRegistry.domain)/$(azureContainerRegistry.repository):latest'
displayName: Pull latest for layer caching
continueOnError: true

- task: Docker@2
displayName: 'Build image'
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'build'
Dockerfile: '**/Dockerfile'
tags: |
$(azureContainerRegistry.tag)
latest
arguments: |
--cache-from $(azureContainerRegistry.domain)/$(azureContainerRegistry.repository):latest

- task: Docker@2
displayName: 'Push image'
inputs:
containerRegistry: '$(azureContainerRegistry.name)'
repository: '$(azureContainerRegistry.repository)'
command: 'push'
tags: |
$(azureContainerRegistry.tag)
latest

- task: PowerShell@2
displayName: 'Decide which AppService slot to put this preview in'
inputs:
targetType: 'inline'
script: |
[int] $slotNumber = $(System.PullRequest.PullRequestId) % 4
Write-Host "Generated slot number:"
Write-Host "$slotNumber"
Write-Host "From PRID"
Write-Host "$(System.PullRequest.PullRequestId)"
Write-Host "##vso[task.setvariable variable=webapp.slotName]$slotNumber"

- task: AzureCLI@2
displayName: 'Create new slot in App Service'
inputs:
azureSubscription: $(azure.servicePrincipal)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az webapp deployment slot create \
--name $(webapp.name) \
--resource-group $(webapp.resourceGroup) \
--slot pr-preview-$(webapp.slotName) \
--configuration-source $(webapp.name)
az webapp identity assign \
-g $(webapp.resourceGroup) \
-n $(webapp.name) \
--slot pr-preview-$(webapp.slotName) \
--identities /subscriptions/400c5730-25f5-4ee6-a933-8b289b9ccb0d/resourcegroups/rg-dts-id-shared/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id-SCLabs-Shared

- task: AzureCLI@2
displayName: 'Deploy pr image to new slot'
inputs:
azureSubscription: $(azure.servicePrincipal)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az webapp config container set \
--docker-custom-image-name $(azureContainerRegistry.domain)/$(azureContainerRegistry.repository):$(azureContainerRegistry.tag) \
--name $(webapp.name) \
--slot pr-preview-$(webapp.slotName) \
--resource-group $(webapp.resourceGroup)

- task: GitHubComment@0
displayName: 'Post a comment with a link to the new PR preview'
inputs:
gitHubConnection: "Adam'sGitHub-9/15/2023"
repositoryName: '$(Build.Repository.Name)'
comment: 'Check out a preview of your pull request here: https://$(webapp.name)-pr-preview-$(webapp.slotName).azurewebsites.net'
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,6 @@ COPY --chown=55:$group public ./public
RUN VERSION_NEXT=`node -p -e "require('./package.json').dependencies.next"`&& yarn add next@"$VERSION_NEXT"
USER $user

EXPOSE 3000

CMD [ "yarn", "start" ]
8 changes: 4 additions & 4 deletions __tests__/pages/api/general.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ describe('translation checks', () => {
describe('country checks', () => {
const COUNTRY_COUNT = 196
const handlerEn = new BenefitHandler({ _language: Language.EN })
handlerEn.requiredFields = [FieldKey.LIVING_COUNTRY]
const fieldDataEn = handlerEn.fieldData as Array<FieldConfigDropdown>
handlerEn.fields.requiredFields = [FieldKey.LIVING_COUNTRY]
const fieldDataEn = handlerEn.fields.fieldData as Array<FieldConfigDropdown>
const handlerFr = new BenefitHandler({ _language: Language.FR })
handlerFr.requiredFields = [FieldKey.LIVING_COUNTRY]
const fieldDataFr = handlerFr.fieldData as Array<FieldConfigDropdown>
handlerFr.fields.requiredFields = [FieldKey.LIVING_COUNTRY]
const fieldDataFr = handlerFr.fields.fieldData as Array<FieldConfigDropdown>
it(`produces a list of ${COUNTRY_COUNT} countries (EN and FR)`, async () => {
expect(fieldDataEn[0].values.length).toEqual(COUNTRY_COUNT)
expect(fieldDataFr[0].values.length).toEqual(COUNTRY_COUNT)
Expand Down
10 changes: 5 additions & 5 deletions __tests__/pages/api/gisCoupleAlwBenefit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ describe('gisCoupleALWBenefit', () => {
const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.FULL, 1045.11)
expectOasEligible(res, EntitlementResultType.FULL, 768.46)
expectGisEligible(res, 241.52)
expectAlwTooOld(res)
expectAlwsMarital(res)
//Future Benefit
expectFutureOasGisBenefitEligible(res, 100, 1045.11, 8.3, 0)
expectFutureOasGisBenefitEligible(res, 100, 768.46, 8.3, 0)

//partner results
expectOasNotEligible(res, true)
Expand All @@ -177,12 +177,12 @@ describe('gisCoupleALWBenefit', () => {
const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.PARTIAL, 857.6)
expectGisEligible(res, 318.37)
expectOasEligible(res, EntitlementResultType.FULL, 768.46)
expectGisEligible(res, 241.52)
expectAlwTooOld(res)
expectAlwsMarital(res)
//Future Benefit
expectFutureOasGisBenefitEligible(res, 94, 857.6, 72.15, 0)
expectFutureOasGisBenefitEligible(res, 94, 768.46, 0, 0)

//partner results
expectOasNotEligible(res, true)
Expand Down
7 changes: 4 additions & 3 deletions __tests__/pages/api/gisCoupleOnePenBenefit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,18 @@ describe('gisCoupleOnePenBenefit', () => {
it('should pass 51 test - CALC-51', async () => {
const desiredName = 'CALC-51' // Replace with the desired name
const extractedPayload = getTransformedPayloadByName(filePath, desiredName)

const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.FULL, 1045.11)
expectOasEligible(res, EntitlementResultType.FULL, 768.46)
expectGisEligible(res, 0.82)
expectAlwTooOld(res)
expectAlwsMarital(res)

//Future Benefit
expectFutureOasGisBenefitEligible(res, 82, 1045.11, 0.82, 0)
expectFutureOasGisBenefitEligible(res, 87, 1045.11, 0.0, 1)
expectFutureOasGisBenefitEligible(res, 82, 768.46, 0.82, 0)
expectFutureOasGisBenefitEligible(res, 87, 768.46, 0.0, 1)

//partner results
expectAllIneligible(res, true)
Expand Down
10 changes: 5 additions & 5 deletions __tests__/pages/api/gisCoupleTwoPensBenefit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ describe('gisCoupleTwoPensBenefit', () => {
const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.PARTIAL, 731.57)
expectGisEligible(res, 1066.99)
expectOasEligible(res, EntitlementResultType.PARTIAL, 717.6)
expectGisEligible(res, 1047.78)
expectAlwTooOld(res)
expectAlwsMarital(res)

Expand All @@ -314,7 +314,7 @@ describe('gisCoupleTwoPensBenefit', () => {
const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.FULL, 1045.11)
expectOasEligible(res, EntitlementResultType.FULL, 999)
expectGisEligible(res, 561.45)
expectAlwTooOld(res)
expectAlwsMarital(res)
Expand All @@ -332,7 +332,7 @@ describe('gisCoupleTwoPensBenefit', () => {
const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.FULL, 1045.11)
expectOasEligible(res, EntitlementResultType.FULL, 860.68)
expectGisEligible(res, 92.82)
expectAlwTooOld(res)
expectAlwsMarital(res)
Expand All @@ -350,7 +350,7 @@ describe('gisCoupleTwoPensBenefit', () => {
const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.PARTIAL, 857.6)
expectOasEligible(res, EntitlementResultType.FULL, 768.46)
expectGisEligible(res, 0.0)
expect(res.body.results.gis.eligibility.reason).toEqual(ResultReason.INCOME)
expectAlwTooOld(res)
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/api/gisSingleBenefit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ describe('gisSingleBenefit', () => {
const res = await mockGetRequest(extractedPayload)

//client results
expectOasEligible(res, EntitlementResultType.PARTIAL, 267.89)
expectGisEligible(res, 537.74)
expectOasEligible(res, EntitlementResultType.PARTIAL, 288.18)
expectGisEligible(res, 480.11)
expectAlwTooOld(res)
expectAlwsMarital(res)
})
Expand Down
Loading