refactor: enforce frontend view model boundaries
This commit is contained in:
@@ -34,13 +34,16 @@ const meta = {
|
||||
} satisfies Meta<ButtonStoryArguments>;
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<ButtonStoryArguments>;
|
||||
|
||||
export const Primary: Story = {
|
||||
name: "Основное действие",
|
||||
play: async ({ args, canvasElement }) => {
|
||||
const button = within(canvasElement).getByRole("button", {
|
||||
name: typeof args.children === "string" ? args.children : undefined,
|
||||
});
|
||||
|
||||
button.focus();
|
||||
await expect(button).toHaveFocus();
|
||||
await userEvent.keyboard("{Enter}");
|
||||
|
||||
Reference in New Issue
Block a user