fix: extract the param row constant and cover the manager bridge (#2018)
Copilot round 3 (both findings suppressed; both valid). - The a11y fix in the previous commit added `align="flex-start"` to the row's `Group`, giving it two static layout props and so tripping the .withProps() rule in AGENTS.md — which applies to a single-use element too. Extracted as `AuthorizationParamRow`. (The sibling `KeyValueRows` Group carries one static prop and stays inline, correctly.) - Added OAuthManager coverage for the config→provider bridge. The point is sharp: the provider test proves the merge and the runner test proves the options object, but nothing crossed the seam in `createOAuthProvider`, so deleting the `authorizationParams:` line left the feature dead with every test green. Verified by doing exactly that — both new cases now fail with `expected null to be 'corp-idp'` — then restoring it. The second case also pins the reserved-key drop through the manager path. Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
55734f3776
commit
f36278538e
1 changed files with 56 additions and 2 deletions
|
|
@ -202,6 +202,13 @@ const FieldDescription = Text.withProps({
|
|||
c: "dimmed",
|
||||
});
|
||||
|
||||
// `align="flex-start"` keeps the key/value/remove controls top-aligned when the
|
||||
// key input grows an error message, so the row doesn't jump as it appears.
|
||||
const AuthorizationParamRow = Group.withProps({
|
||||
grow: true,
|
||||
align: "flex-start",
|
||||
});
|
||||
|
||||
const ClearStoredOAuthButton = Button.withProps({
|
||||
variant: "light",
|
||||
color: "red",
|
||||
|
|
@ -288,7 +295,7 @@ function AuthorizationParamRows({
|
|||
{params.map((param, index) => {
|
||||
const rowLabel = param.key.trim() || `row ${index + 1}`;
|
||||
return (
|
||||
<Group key={index} grow align="flex-start">
|
||||
<AuthorizationParamRow key={index}>
|
||||
<ClearableTextInput
|
||||
aria-label={`Authorization parameter name, ${rowLabel}`}
|
||||
placeholder="Parameter (e.g. kc_idp_hint)"
|
||||
|
|
@ -324,7 +331,7 @@ function AuthorizationParamRows({
|
|||
>
|
||||
X
|
||||
</RemoveIcon>
|
||||
</Group>
|
||||
</AuthorizationParamRow>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
|
|
|
|||
Loading…
Reference in a new issue