Merge pull request #831 from wnmzzzz/patch-1

Add Story for AppInitiatedAction to UpdatePassword
This commit is contained in:
Joseph Garrone 2025-04-09 16:29:02 +02:00 committed by GitHub
commit d767080dfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,3 +62,22 @@ export const WithPasswordConfirmError: Story = {
/> />
) )
}; };
/**
* WithAppInitiatedAction:
* - Purpose: Tests when the update password action was triggered by an app.
* - Scenario: Simulates the case where the user presses a 'change password' button in an app and is redirected to Keycloak to change it.
* - Key Aspect: Ensures the 'Cancel' button is shown correctly, which displays only when the action is app initiated.
*/
export const WithAppInitiatedAction: Story = {
render: () => (
<KcPageStory
kcContext={{
url: {
loginAction: "/mock-login-action"
},
isAppInitiatedAction: true
}}
/>
)
};