File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed
src/elements/content-picker/stories/tests Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff 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 = {
6767export 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
You can’t perform that action at this time.
0 commit comments