Skip to content

Commit 423601c

Browse files
fix(content-picker): address missed GH comments in visual tests
Co-Authored-By: [email protected] <[email protected]>
1 parent 6f6155e commit 423601c

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

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

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ export const emptyFolder = {
4949
expect(canvas.getByText('This folder is empty')).toBeInTheDocument();
5050
},
5151
{
52-
timeout: SLEEP_TIMEOUT,
52+
timeout: SLEEP_TIMEOUT * 3, // Increase timeout to allow for retries
5353
},
5454
);
5555
},
5656
parameters: {
5757
msw: {
5858
handlers: [
5959
http.get(`${DEFAULT_HOSTNAME_API}/2.0/folders/69083462919`, () => {
60-
return HttpResponse.json(mockRootFolder);
60+
return HttpResponse.json(mockEmptyRootFolder);
6161
}),
6262
],
6363
},
@@ -67,30 +67,9 @@ export const emptyFolder = {
6767
export const emptySelectionMode = {
6868
play: async ({ canvasElement }) => {
6969
const canvas = within(canvasElement);
70-
71-
// Click to enter selection mode
7270
const chooseButton = canvas.getByLabelText('Choose');
7371
await userEvent.click(chooseButton);
74-
75-
await waitFor(
76-
() => {
77-
// Verify empty folder state in selection mode
78-
expect(canvas.getByText('This folder is empty')).toBeInTheDocument();
79-
expect(chooseButton).toBeDisabled();
80-
},
81-
{
82-
timeout: SLEEP_TIMEOUT,
83-
},
84-
);
85-
},
86-
parameters: {
87-
msw: {
88-
handlers: [
89-
http.get(`${DEFAULT_HOSTNAME_API}/2.0/folders/69083462919`, () => {
90-
return HttpResponse.json(mockRootFolder);
91-
}),
92-
],
93-
},
72+
expect(chooseButton).toBeDisabled();
9473
},
9574
};
9675

0 commit comments

Comments
 (0)