From 23d64d183d1be7448d95656389582ad277951841 Mon Sep 17 00:00:00 2001 From: Joshua Hawxwell Date: Thu, 16 May 2024 11:18:35 +0100 Subject: [PATCH] MLPAB-1997 Fix attorney fixture when trust corporation wanting an email (#1237) Also run cypress tests on image for weblate PRs --- .github/workflows/workflow_pr.yml | 1 - internal/page/fixtures/attorney.go | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/workflow_pr.yml b/.github/workflows/workflow_pr.yml index dced46a5c4..6dc957fe33 100644 --- a/.github/workflows/workflow_pr.yml +++ b/.github/workflows/workflow_pr.yml @@ -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 }} diff --git a/internal/page/fixtures/attorney.go b/internal/page/fixtures/attorney.go index fb172f6958..e0b541dfa0 100644 --- a/internal/page/fixtures/attorney.go +++ b/internal/page/fixtures/attorney.go @@ -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