File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
packages/compass-e2e-tests/tests Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ describe('MongoDB Assistant', function () {
275275 } ) ;
276276
277277 it ( 'should display opt-in modal for explain plan entry point' , async function ( ) {
278- await useExplainPlanEntryPoint ( browser ) ;
278+ await useExplainPlanEntryPoint ( browser , { waitForMessages : false } ) ;
279279
280280 await browser . waitForOpenModal ( Selectors . AIOptInModal ) ;
281281
@@ -284,7 +284,9 @@ describe('MongoDB Assistant', function () {
284284 reverse : true ,
285285 } ) ;
286286
287- expect ( await getDisplayedMessages ( browser ) ) . to . deep . equal ( [ ] ) ;
287+ expect (
288+ await browser . $ ( Selectors . AssistantChatMessages ) . isDisplayed ( )
289+ ) . equals ( false ) ;
288290 } ) ;
289291 } ) ;
290292 } ) ;
@@ -602,7 +604,10 @@ async function waitForMessages(
602604 }
603605}
604606
605- async function useExplainPlanEntryPoint ( browser : CompassBrowser ) {
607+ async function useExplainPlanEntryPoint (
608+ browser : CompassBrowser ,
609+ { waitForMessages = true } = { }
610+ ) {
606611 await browser . clickVisible ( Selectors . AggregationExplainButton ) ;
607612
608613 await browser . clickVisible ( Selectors . ExplainPlanInterpretButton ) ;
@@ -611,5 +616,7 @@ async function useExplainPlanEntryPoint(browser: CompassBrowser) {
611616 reverse : true ,
612617 } ) ;
613618
614- await browser . $ ( Selectors . AssistantChatMessages ) . waitForDisplayed ( ) ;
619+ if ( waitForMessages ) {
620+ await browser . $ ( Selectors . AssistantChatMessages ) . waitForDisplayed ( ) ;
621+ }
615622}
You can’t perform that action at this time.
0 commit comments