Skip to content

Commit

Permalink
fix broken interaction test to work with split themes add playAll
Browse files Browse the repository at this point in the history
  • Loading branch information
weeksling committed Aug 22, 2023
1 parent 47eb7d8 commit c12e168
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/screens/LinkProject/LinkProject.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { findByTestId } from "@storybook/testing-library";
import { graphql } from "msw";
import React from "react";

import { Build, ProjectQueryQuery, SelectProjectsQueryQuery } from "../../gql/graphql";
import { ProjectQueryQuery, SelectProjectsQueryQuery } from "../../gql/graphql";
import { storyWrapper } from "../../utils/graphQLClient";
import { playAll } from "../../utils/playAll";
import { withFigmaDesign } from "../../utils/withFigmaDesign";
import { LinkedProject } from "./LinkedProject";
import { LinkProject } from "./LinkProject";
Expand Down Expand Up @@ -229,14 +230,14 @@ export const SelectProjectManyProjects: Story = {
"https://www.figma.com/file/GFEbCgCVDtbZhngULbw2gP/Visual-testing-in-Storybook?type=design&node-id=508-317038&mode=design&t=P9IPi8sOGNpjCeNs-4"
),
},
play: async ({ canvasElement }) => {
play: playAll(async ({ canvasElement }) => {
const rightDiv = await findByTestId(canvasElement, "right-list");
const leftDiv = await findByTestId(canvasElement, "left-list");

// scroll to the bottom of each div
await rightDiv.scroll({ top: rightDiv.scrollHeight });
await leftDiv.scroll({ top: leftDiv.scrollHeight });
},
}),
};
export const Linked: Story = {
render: () => (
Expand Down

0 comments on commit c12e168

Please sign in to comment.