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

FI-3643: Check input components for auth #587

Merged
merged 7 commits into from
Jan 10, 2025
Merged

Conversation

AlyssaWang
Copy link
Collaborator

Summary

Bug fix for the following:

Current behavior: Auth inputs check first component provided for default selection settings. If another component is provided, inputs break.

Expected behavior: Inputs should find first component with type auth

See branch fi-3093-debug

Testing Guidance

Pull this branch into fi-3093-debug -- should be able to open inputs without errors. Check auth inputs, access inputs, and type selector; all should work.

Cases to check:

  1. components is empty and/or undefined -- AuthInfo Suite
  2. components has only auth_type -- AuthInfo Suite
  3. components has only something else -- SMART STU1
  4. components has something else and auth_type -- add the following to InputAuth.tsx on line 22:

input.options?.components?.push({ name: 'auth_type', default: 'symmetric', });

Selector should show Confidential Symmetric.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

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

Project coverage is 84.30%. Comparing base (84977e0) to head (1eec923).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
client/src/components/InputsModal/InputAccess.tsx 87.50% 1 Missing ⚠️
client/src/components/InputsModal/InputAuth.tsx 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #587   +/-   ##
=======================================
  Coverage   84.29%   84.30%           
=======================================
  Files         275      275           
  Lines       11668    11686   +18     
  Branches     1302     1307    +5     
=======================================
+ Hits         9836     9852   +16     
- Misses       1822     1824    +2     
  Partials       10       10           
Flag Coverage Δ
backend 92.62% <ø> (ø)
frontend 79.22% <90.90%> (+0.02%) ⬆️

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

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

const [authType, setAuthType] = React.useState<string>(
input.options?.components ? (input.options?.components[0].default as string) : 'public',
authComponent?.default ? (authComponent.default as string) : 'public',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this needs to check what the actual list options are and choose the first value in case public has been removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch -- updated

@AlyssaWang AlyssaWang merged commit 068ac08 into main Jan 10, 2025
10 checks passed
@AlyssaWang AlyssaWang deleted the FI-3643-auth-components branch January 10, 2025 18:43
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.

2 participants