Skip to content

Commit 19aeb55

Browse files
committed
Fix failing stories
Signed-off-by: hemahg <hhg@redhat.com>
1 parent 8411bec commit 19aeb55

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/components/Table/ResponsiveTable.stories.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ type Story = StoryObj<typeof ResponsiveTableSampleType>;
120120
export const Example: Story = {
121121
play: async ({ canvasElement, args }) => {
122122
const canvas = within(canvasElement);
123+
await canvas.findByText(sampleData[0][0]);
123124

124125
sampleData
125126
.flatMap((row) => row.slice(0, -1))
@@ -195,7 +196,7 @@ export const NoResults: Story = {
195196
const canvas = within(canvasElement);
196197

197198
await expect(
198-
canvas.getByText(
199+
await canvas.findByText(
199200
"Empty state to show when the data is filtered but has no results",
200201
),
201202
).toBeInTheDocument();
@@ -206,9 +207,10 @@ export const CustomActionTestId: Story = {
206207
args: {
207208
hasCustomActionTestId: true,
208209
},
209-
play: async ({ canvasElement, args }) => {
210+
play: async ({ canvasElement }) => {
210211
const canvas = within(canvasElement);
211-
await expect(canvas.queryAllByTestId("my-action-row-0")).toHaveLength(1);
212+
const cell = await canvas.findByTestId("my-action-row-0");
213+
expect(cell).toBeInTheDocument();
212214
},
213215
};
214216

0 commit comments

Comments
 (0)