Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useEffect } from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';

import { ManagerContext } from 'storybook/manager-api';
import { within } from 'storybook/test';
import { expect, waitFor, within } from 'storybook/test';

import { LayoutProvider, useLayout } from '../../layout/LayoutProvider.tsx';
import { MobileAbout } from './MobileAbout.tsx';
Expand Down Expand Up @@ -55,7 +55,15 @@ export default meta;

type Story = StoryObj<typeof meta>;

export const Default: Story = {};
export const Default: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await waitFor(() => expect(canvas.getByRole('link', { name: 'GitHub' })).toBeVisible());
await expect(canvas.getByRole('link', { name: 'Documentation' })).toBeVisible();
await expect(canvas.getByRole('link', { name: 'Chromatic' })).toBeVisible();
await expect(canvas.getByRole('link', { name: 'Storybook Community' })).toBeVisible();
},
};
export const Dark: Story = {
globals: { sb_theme: 'dark' },
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const MobileAbout: FC = () => {
<GithubIcon />
</ActionList.Icon>
<ActionList.Text>
<span>Github</span>
<span>GitHub</span>
</ActionList.Text>
<ActionList.Icon>
<ShareAltIcon />
Expand Down Expand Up @@ -100,6 +100,7 @@ export const MobileAbout: FC = () => {
and the{' '}
<Link
href="https://github.com/storybookjs/storybook/graphs/contributors"
target="_blank"
rel="noopener noreferrer"
>
Storybook Community
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const AboutFocusTrapped: Story = {
await waitFor(() => expect(backButton).toHaveFocus());

await userEvent.tab();
await expect(screen.getByRole('link', { name: 'Github' })).toHaveFocus();
await expect(screen.getByRole('link', { name: 'GitHub' })).toHaveFocus();
await userEvent.tab();
await expect(screen.getByRole('link', { name: 'Documentation' })).toHaveFocus();
// The package manager tabs are a single stop with a roving tabindex.
Expand Down
Loading