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

Wizard: Add validation to Timezone select (HMS-5493) #2887

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

regexowl
Copy link
Collaborator

@regexowl regexowl commented Feb 12, 2025

This adds the timezones to the step validation and renders an error when an invalid timezone is imported.

How to test:

  1. import a blueprint with invalid timezone "foo"
  2. select a target
  3. go to Registration step
  4. click on "Review and finish" button

Current behaviour:

  • the "Create" button is disabled, but when navigating to Timezone step no error is displayed

After update:

  • there is an error rendered under the timezone select

JIRA: HMS-5493

@regexowl
Copy link
Collaborator Author

Currently there is no error status displayed next to the nav item of the step, this PR will fix that: #2878

@regexowl
Copy link
Collaborator Author

/jira-epic HMS-5008

@schutzbot schutzbot changed the title Wizard: Add validation to Timezone select Wizard: Add validation to Timezone select (HMS-5493) Feb 12, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 82.07%. Comparing base (609397d) to head (641bf09).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ents/CreateImageWizard/utilities/useValidation.tsx 44.44% 5 Missing ⚠️
...ard/steps/Timezone/components/TimezoneDropDown.tsx 63.63% 4 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2887      +/-   ##
==========================================
- Coverage   82.09%   82.07%   -0.03%     
==========================================
  Files         207      207              
  Lines       23293    23313      +20     
  Branches     2286     2289       +3     
==========================================
+ Hits        19122    19133      +11     
- Misses       4144     4153       +9     
  Partials       27       27              
Files with missing lines Coverage Δ
...ard/steps/Timezone/components/TimezoneDropDown.tsx 85.00% <63.63%> (-2.16%) ⬇️
...ents/CreateImageWizard/utilities/useValidation.tsx 83.70% <44.44%> (-1.01%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 609397d...641bf09. Read the comment docs.

@regexowl regexowl force-pushed the timezone-field-validation branch 2 times, most recently from c6fda71 to 46b1cc8 Compare February 13, 2025 14:28
This adds the timezones to the step validation and renders an error when an invalid timezone is imported.

How to test:
1. import a blueprint with invalid timezone "foo"
2. select a target
3. go to Registration step
4. click on "Review and finish" button

Current behaviour:
- the "Create" button is disabled, but when navigating to Timezone step no error is displayed

After update:
- there is an error rendered under the timezone select
@regexowl regexowl force-pushed the timezone-field-validation branch from 46b1cc8 to 641bf09 Compare February 17, 2025 14:09
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