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

fix(KONFLUX-5956): ensure optional username and mandatory password for secret form #112

Merged
merged 4 commits into from
Feb 13, 2025

Conversation

rakshett
Copy link
Contributor

Fixes

https://issues.redhat.com/browse/KONFLUX-5956

Description

removed required for username and added * for password

Type of change

  • Feature
  • Bugfix
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Screen shots / Gifs for design review

Screenshot 2025-02-11 at 5 55 27 PM image

How to test or reproduce?

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.07%. Comparing base (fc997b2) to head (5e9397d).
Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #112   +/-   ##
=======================================
  Coverage   80.07%   80.07%           
=======================================
  Files         544      544           
  Lines       21179    21179           
  Branches     5327     5327           
=======================================
  Hits        16960    16960           
- Misses       4194     4195    +1     
+ Partials       25       24    -1     
Flag Coverage Δ
unittests 80.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...omponents/Secrets/SecretsForm/SourceSecretForm.tsx 100.00% <ø> (ø)
src/components/Secrets/utils/secret-validation.ts 41.46% <ø> (ø)

... and 1 file with indirect coverage changes


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 fc997b2...5e9397d. Read the comment docs.

@sahil143
Copy link
Collaborator

/test

@@ -49,10 +49,6 @@ export const secretFormValidationSchema = yup.object({
is: SecretTypeDropdownLabel.source,
then: yup.object({
authType: yup.string(),
username: yup.string().when('authType', {
is: SourceSecretType.basic,
then: yup.string().required('Required'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only remove the required method from the validation

@rakshett rakshett changed the title feat(KONFLUX-5956): removed required for username and added * for pas… fix(KONFLUX-5956): removed required for username and added * for pas… Feb 12, 2025
@testcara
Copy link
Contributor

How about change the title to something like 'ensure optional username and mandatory password'?
and it would be better to add test cases for the changes.

@rakshett
Copy link
Contributor Author

How about change the title to something like 'ensure optional username and mandatory password'? and it would be better to add test cases for the changes.

@testcara Could you please let me know if we need to make this username optional?
Password is already mandatory which doesn't require any change.

@sahil143 sahil143 changed the title fix(KONFLUX-5956): removed required for username and added * for pas… fix(KONFLUX-5956): ensure optional username and mandatory password for secret form Feb 13, 2025
@sahil143
Copy link
Collaborator

/test

@sahil143 sahil143 merged commit d7b127d into konflux-ci:main Feb 13, 2025
5 checks passed
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.

3 participants