File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ type Story = StoryObj<typeof ResponsiveTableSampleType>;
120120export 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
You can’t perform that action at this time.
0 commit comments