Skip to content

Commit

Permalink
MLPAB-1997 Fix attorney fixture when trust corporation wanting an ema…
Browse files Browse the repository at this point in the history
…il (#1237)

Also run cypress tests on image for weblate PRs
  • Loading branch information
hawx authored May 16, 2024
1 parent 92496df commit 23d64d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/workflow_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
with:
run_against_image: true
tag: ${{ needs.create_tags.outputs.version_tag }}
skip: ${{ contains(fromJSON('["weblate-pr"]'), github.head_ref) }}
specs: 'cypress/e2e/**/*.cy.js'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
Expand Down
13 changes: 5 additions & 8 deletions internal/page/fixtures/attorney.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,11 @@ func Attorney(
}

if email != "" {
if isTrustCorporation {
if isReplacement {
donorDetails.ReplacementAttorneys.TrustCorporation.Email = email
} else {
donorDetails.Attorneys.TrustCorporation.Email = email
}
}
if isReplacement {
if isTrustCorporation && isReplacement {
donorDetails.ReplacementAttorneys.TrustCorporation.Email = email
} else if isTrustCorporation {
donorDetails.Attorneys.TrustCorporation.Email = email
} else if isReplacement {
donorDetails.ReplacementAttorneys.Attorneys[0].Email = email
} else {
donorDetails.Attorneys.Attorneys[0].Email = email
Expand Down

0 comments on commit 23d64d1

Please sign in to comment.