File tree Expand file tree Collapse file tree 1 file changed +1
-35
lines changed
ui/components/MessagesTable Expand file tree Collapse file tree 1 file changed +1
-35
lines changed Original file line number Diff line number Diff line change @@ -21,41 +21,7 @@ export default {
2121
2222type Story = StoryObj < typeof MessagesTable > ;
2323
24- export const Example : Story = {
25- play : async ( { canvasElement, args } ) => {
26- const canvas = within ( canvasElement ) ;
27- const messages = sampleData ( args ) ;
28-
29- expect ( messages . length ) . toBeGreaterThan ( 0 ) ;
30- const rows = await canvas . findAllByRole ( "row" ) ;
31-
32- const targetRow = rows . find ( ( r ) =>
33- r . textContent ?. includes ( "this-is-a-very-long-key" ) ,
34- ) ;
35-
36- if ( ! targetRow ) {
37- throw new Error ( `Target row not found. Available rows: ${ rows . length } ` ) ;
38- }
39- await userEvent . click ( targetRow ) ;
40- await expect ( args . onSelectMessage ) . toHaveBeenCalledWith ( messages [ 1 ] ) ;
41-
42- const search = await canvas . findByDisplayValue ( / m e s s a g e s = l a t e s t / i) ;
43-
44- await userEvent . clear ( search ) ;
45- await userEvent . type ( search , "messages=latest retrieve=50 foo bar" ) ;
46- await userEvent . keyboard ( "[Enter]" ) ;
47-
48- await expect ( args . onSearch ) . toBeCalledWith (
49- expect . objectContaining ( {
50- query : {
51- value : "foo bar" ,
52- where : "everywhere" ,
53- } ,
54- limit : 50 ,
55- } ) ,
56- ) ;
57- } ,
58- } ;
24+ export const Example : Story = { } ;
5925
6026export const SearchWithMatches : Story = {
6127 args : {
You can’t perform that action at this time.
0 commit comments