storybooks second release
This commit is contained in:
@ -16,3 +16,47 @@ type Story = StoryObj<typeof meta>;
|
||||
export const Default: Story = {
|
||||
render: () => <KcPageStory />
|
||||
};
|
||||
|
||||
/**
|
||||
* WithRetryAvailable:
|
||||
* - Purpose: Tests when the user is allowed to retry WebAuthn registration after a failure.
|
||||
* - Scenario: The component renders the form with a retry option.
|
||||
* - Key Aspect: Ensures the retry functionality is available and the form allows the user to retry.
|
||||
*/
|
||||
export const WithRetryAvailable: Story = {
|
||||
render: () => (
|
||||
<KcPageStory
|
||||
kcContext={{
|
||||
url: {
|
||||
loginAction: "/mock-login-action"
|
||||
},
|
||||
isSetRetry: true,
|
||||
isAppInitiatedAction: false
|
||||
}}
|
||||
/>
|
||||
)
|
||||
};
|
||||
|
||||
/**
|
||||
* WithErrorDuringRegistration:
|
||||
* - Purpose: Tests when an error occurs during WebAuthn registration.
|
||||
* - Scenario: The component displays an error message related to WebAuthn registration failure.
|
||||
* - Key Aspect: Ensures the error message is displayed correctly, informing the user of the registration failure.
|
||||
*/
|
||||
export const WithErrorDuringRegistration: Story = {
|
||||
render: () => (
|
||||
<KcPageStory
|
||||
kcContext={{
|
||||
url: {
|
||||
loginAction: "/mock-login-action"
|
||||
},
|
||||
isSetRetry: false,
|
||||
isAppInitiatedAction: false,
|
||||
message: {
|
||||
summary: "An error occurred during WebAuthn registration. Please try again.",
|
||||
type: "error"
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)
|
||||
};
|
||||
|
Reference in New Issue
Block a user