storybooks second release

This commit is contained in:
Nima Shkouhfar
2024-10-19 17:24:29 -04:00
parent c9d7fc1b6e
commit 0cf8caa53b
20 changed files with 1015 additions and 13 deletions

View File

@ -16,3 +16,28 @@ type Story = StoryObj<typeof meta>;
export const Default: Story = {
render: () => <KcPageStory />
};
/**
* WithoutUserEnabled:
* - Purpose: Tests when the user is not enabled to log in via x509.
* - Scenario: The component renders the certificate details but does not provide the option to log in or cancel.
* - Key Aspect: Ensures that the login buttons are not displayed when the user is not enabled.
*/
export const WithoutUserEnabled: Story = {
render: () => (
<KcPageStory
kcContext={{
url: {
loginAction: "/mock-login-action"
},
x509: {
formData: {
subjectDN: "CN=John Doe, OU=Example Org, O=Example Inc, C=US",
username: "johndoe",
isUserEnabled: false // User not enabled for login
}
}
}}
/>
)
};