Skip to content

Commit

Permalink
chore: more types
Browse files Browse the repository at this point in the history
Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>
  • Loading branch information
iamnewton committed Nov 12, 2024
1 parent 6f170fe commit 2f7dd2c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/bootstrap/page/inbox/box/box.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,20 @@ export const EditTask: Story = {
parameters: {
...Default.parameters,
},
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
play: async ({
canvasElement,
}: {
canvasElement: HTMLTextAreaElement | HTMLInputElement;
}) => {
const canvas = within(canvasElement);
const getTask = (id: string) =>
canvas.findByRole("listitem", { name: id });

const itemToEdit = await getTask("task-5");
const taskInput = await findByRole(itemToEdit, "textbox");
await userEvent.type(taskInput, " and disabled state");
await expect(taskInput.value).toBe(
const inputElement = taskInput as HTMLInputElement;
await userEvent.type(inputElement, " and disabled state");
await expect(inputElement.value).toBe(
"Fix bug in input error state and disabled state"
);
},
Expand Down

0 comments on commit 2f7dd2c

Please sign in to comment.