import React from "react"; import { within, userEvent } from "@storybook/testing-library"; import { styled, theme } from "../theme"; import { VisuallyHidden } from "./visually-hidden"; import type { Meta, StoryObj } from "@storybook/react"; const meta: Meta = { title: "VisuallyHidden", component: VisuallyHidden, }; export default meta; type Story = StoryObj; const Disclaimer = styled("div", { color: "$primary", }); export const Default: Story = { render: (args, context) => ( <> This story is used to test the visually hidden component. Hello, World! ), }; Default.play = async ({ canvasElement }) => { const canvas = within(canvasElement); await userEvent.tab(); await userEvent.click(canvas.getByTestId("light-skip-link")); };