Skip to content

Commit 6e4c5a0

Browse files
fix(content-picker): update storybook meta and visibility tests
Co-Authored-By: [email protected] <[email protected]>
1 parent c7748cd commit 6e4c5a0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/elements/content-picker/stories/tests/ContentPicker-visual.stories.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,12 +515,11 @@ export const multiSelectWithKeyboard = {
515515
},
516516
);
517517

518-
// Wait for folder contents to load
518+
// Wait for folder contents to load and verify Audio.mp3 is visible
519519
await waitFor(() => {
520+
const audioRow = canvas.getByRole('row', { name: /Audio\.mp3/ });
521+
expect(audioRow).toBeVisible();
520522
expect(canvas.getByRole('button', { name: /Preview Test Folder/i })).toBeInTheDocument();
521-
const rows = canvas.getAllByRole('row');
522-
expect(rows.length).toBeGreaterThan(1);
523-
expect(rows[1]).toBeVisible();
524523
});
525524

526525
// Get the Audio.mp3 row and click its checkbox
@@ -719,7 +718,7 @@ export const searchFunctionality = {
719718
},
720719
};
721720

722-
export default {
721+
const meta = {
723722
title: 'Elements/ContentPicker/tests/visual',
724723
component: ContentPicker,
725724
args: {
@@ -746,3 +745,5 @@ export default {
746745
},
747746
},
748747
};
748+
749+
export default meta;

0 commit comments

Comments
 (0)