Skip to content

Make number of new jobs optional for FDI projects with no involvement #7702

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

peterhudec
Copy link
Contributor

@peterhudec peterhudec commented Apr 23, 2025

Description of change

This PR makes the number of new jobs field in the edit project values form optional for all FDI projects with no level of involvement.

Test instructions

  1. Create a new investment project with
    • Investment type = FDI -> [whatever] and
    • Level of investor involvement = No Involvement
      Or find an existing project with the above properties and grab its ID
  2. Navigate to /investments/projects/{project-id}/edit-value
  3. There should be a Number of new jobs (optional) field
  4. You should be able to leave the field empty or put 0 into it as a value
  5. Upon submitting the form, there should be no form error related to that field
  6. Change the Level of investor involvement of the project to any value other than No Involvement
  7. Now the field should be required and have a label Number of new jobs (required)
  8. If you leave the field empty or put 0 into it as a value and submit the form
  9. You should see a form error related to the field saying that the field is required or that the value must not be 0

Copy link

cypress bot commented Apr 23, 2025

data-hub-frontend    Run #60553

Run Properties:  status check passed Passed #60553  •  git commit 1d3629ba4c: Removed commented out code
Project data-hub-frontend
Branch Review feat/optional-jobs-on-fdi-projects
Run status status check passed Passed #60553
Run duration 09m 11s
Commit git commit 1d3629ba4c: Removed commented out code
Committer Peter Hudec
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 4
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 74
View all changes introduced in this branch ↗︎

@peterhudec peterhudec force-pushed the feat/optional-jobs-on-fdi-projects branch from 01d7cb0 to 5a12285 Compare April 25, 2025 08:21
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.09%. Comparing base (47d9aab) to head (1d3629b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7702      +/-   ##
==========================================
+ Coverage   89.90%   90.09%   +0.19%     
==========================================
  Files        1151     1151              
  Lines       17812    17807       -5     
  Branches     5167     5165       -2     
==========================================
+ Hits        16014    16044      +30     
+ Misses       1798     1763      -35     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@peterhudec peterhudec marked this pull request as ready for review April 25, 2025 12:49
@peterhudec peterhudec requested a review from a team as a code owner April 25, 2025 12:49
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.

1 participant