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

Replace site decided with new site address question #7486

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

oliverjwroberts
Copy link
Contributor

@oliverjwroberts oliverjwroberts commented Jan 23, 2025

Description of change

This PR replaces the current site_decided question with a new site_address_is_company_address question on the project edit requirement form. It also removes the actual_uk_regions field.

Test instructions

For projects that have:

  • site_address_is_company_address === null: the radio buttons should be unselected. If no modifications are made, the frontend will set the address fields to empty strings (as this was the existing behaviour);
  • site_address_is_company_address === true && !uk_company): the yes option will be selected and show some help text prompting users to select a UK recipient company. Upon submission, the frontend will set site_address_is_company_address === true the address fields to empty strings.
  • site_address_is_company_address === true && uk_company): the yes option will be selected and show the Uk recipient company address fields. Upon submission, the frontend will set site_address_is_company_address === true the address fields to the UK company address.
  • site_address_is_company_address === false: the no option will be selected and address fields will appear for manual entry. Upon submission, the frontend will set site_address_is_company_address === false the address fields to the values entered.

Screenshots

Before

The site_decided field when Yes is selected:

image

The site_decided field when No is selected:

image

The incomplete fields flash message:

image

After

The site_address_is_company_address field when Yes is selected, but the project does not have a uk_company:

image

The site_address_is_company_address field when Yes is selected and the project has a uk_company:

image

The site_address_is_company_address field when No is selected:

image

The incomplete fields flash message:

image

Checklist

  • Has the branch been rebased to main?
  • Automated tests (Any of the following when applicable: Unit, Functional or End-to-End)
  • Manual compatibility testing (Browsers: Chrome, Firefox, Edge, Safari)

Copy link

cypress bot commented Jan 23, 2025

data-hub-frontend    Run #58896

Run Properties:  status check passed Passed #58896  •  git commit 56362af111: Replace default behaviour of sending empty strings and add test case for no acti...
Project data-hub-frontend
Branch Review feature/CLS2-1175-site-address-changes
Run status status check passed Passed #58896
Run duration 01m 39s
Commit git commit 56362af111: Replace default behaviour of sending empty strings and add test case for no acti...
Committer Oliver Roberts
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 15
View all changes introduced in this branch ↗︎

Co-authored-by: Stuart Mindt <stuart.mindt@madetech.com>
@oliverjwroberts oliverjwroberts force-pushed the feature/CLS2-1175-site-address-changes branch 2 times, most recently from 4f0bc76 to ccd48a4 Compare January 28, 2025 18:39
Also removes two investment project fixtures in favour of fakers.
@oliverjwroberts oliverjwroberts force-pushed the feature/CLS2-1175-site-address-changes branch from ccd48a4 to 868e38b Compare January 28, 2025 19:13
Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.55%. Comparing base (4c418b4) to head (56362af).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...dules/Investments/Projects/Details/transformers.js 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7486      +/-   ##
==========================================
- Coverage   88.57%   88.55%   -0.03%     
==========================================
  Files        1144     1144              
  Lines       17789    17792       +3     
  Branches     5097     5099       +2     
==========================================
- Hits        15757    15756       -1     
- Misses       2032     2036       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oliverjwroberts oliverjwroberts merged commit 382debc into main Jan 30, 2025
16 checks passed
@oliverjwroberts oliverjwroberts deleted the feature/CLS2-1175-site-address-changes branch January 30, 2025 09:16
chopkinsmade pushed a commit that referenced this pull request Jan 30, 2025
oliverjwroberts added a commit that referenced this pull request Jan 30, 2025
chopkinsmade pushed a commit that referenced this pull request Jan 30, 2025
oliverjwroberts added a commit that referenced this pull request Feb 4, 2025
Reapplies PR #7486 (commit 382debc). Modifications include keeping the `actual_uk_regions` question and unnesting it.
oliverjwroberts added a commit that referenced this pull request Feb 10, 2025
* Reapply site address question changes with some modifications

Reapplies PR #7486 (commit 382debc). Modifications include keeping the `actual_uk_regions` question and unnesting it.

* Remove superfluous return

* Test transformation of actual_uk_regions field
dredmonds pushed a commit that referenced this pull request Feb 10, 2025
* Reapply site address question changes with some modifications

Reapplies PR #7486 (commit 382debc). Modifications include keeping the `actual_uk_regions` question and unnesting it.

* Remove superfluous return

* Test transformation of actual_uk_regions field
dredmonds pushed a commit that referenced this pull request Feb 11, 2025
* Reapply site address question changes with some modifications

Reapplies PR #7486 (commit 382debc). Modifications include keeping the `actual_uk_regions` question and unnesting it.

* Remove superfluous return

* Test transformation of actual_uk_regions field
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.

4 participants