File tree Expand file tree Collapse file tree 1 file changed +29
-3
lines changed
packages/compass-explain-plan/src/components Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,43 @@ describe('ExplainPlanModal', function () {
6262 } ) ;
6363
6464 it ( 'should show "Interpret for me" button when AI assistant is enabled' , function ( ) {
65- render ( { status : 'ready' } , { preferences : { enableAIAssistant : true } } ) ;
65+ render (
66+ {
67+ status : 'ready' ,
68+ explainPlan : {
69+ namespace : 'test' ,
70+ usedIndexes : [ ] ,
71+ } ,
72+ } ,
73+ { preferences : { enableAIAssistant : true } }
74+ ) ;
6675 expect ( screen . getByTestId ( 'interpret-for-me-button' ) ) . to . exist ;
6776 } ) ;
6877
6978 it ( 'should not show "Interpret for me" button when AI assistant is disabled' , function ( ) {
70- render ( { status : 'ready' } , { preferences : { enableAIAssistant : false } } ) ;
79+ render (
80+ {
81+ status : 'ready' ,
82+ explainPlan : {
83+ namespace : 'test' ,
84+ usedIndexes : [ ] ,
85+ } ,
86+ } ,
87+ { preferences : { enableAIAssistant : false } }
88+ ) ;
7189 expect ( screen . queryByTestId ( 'interpret-for-me-button' ) ) . to . not . exist ;
7290 } ) ;
7391
7492 it ( 'should disable the "Interpret for me" button when the status is not ready' , function ( ) {
75- render ( { status : 'loading' } , { preferences : { enableAIAssistant : true } } ) ;
93+ render (
94+ {
95+ status : 'loading' ,
96+ explainPlan : {
97+ usedIndexes : [ ] ,
98+ } ,
99+ } ,
100+ { preferences : { enableAIAssistant : true } }
101+ ) ;
76102 expect ( screen . getByTestId ( 'interpret-for-me-button' ) ) . to . have . attr (
77103 'aria-disabled' ,
78104 'true'
You can’t perform that action at this time.
0 commit comments