import React from "react"; import type { Meta, StoryObj } from "@storybook/react"; import { createKcPageStory } from "../KcPageStory"; const { KcPageStory } = createKcPageStory({ pageId: "login-oauth2-device-verify-user-code.ftl" }); const meta = { title: "login/login-oauth2-device-verify-user-code.ftl", component: KcPageStory } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => }; /** * WithErrorMessage: * - Purpose: Tests when there is an error with the OAuth2 device user code entry. * - Scenario: The component renders with an error message displayed to the user. * - Key Aspect: Ensures the error message is properly shown when the user enters an invalid code. */ export const WithErrorMessage: Story = { render: () => ( ) }; /** * WithEmptyInputField: * - Purpose: Tests when the user code field is left empty. * - Scenario: The component renders the form, and the user tries to submit without entering any code. * - Key Aspect: Ensures the form displays validation errors when the field is left empty. */ export const WithEmptyInputField: Story = { render: () => ( ) };