File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/compass-e2e-tests/tests Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,13 @@ describe('MongoDB Assistant', function () {
175175 ) ;
176176 throw err ;
177177 }
178+
179+ // Close the drawer if open to provide a clean environment for the next test
180+ const drawerCloseButton = browser . $ ( Selectors . AssistantDrawerCloseButton ) ;
181+ if ( await drawerCloseButton . isDisplayed ( ) ) {
182+ await browser . clickVisible ( drawerCloseButton ) ;
183+ await drawerCloseButton . waitForDisplayed ( { reverse : true } ) ;
184+ }
178185 } ) ;
179186
180187 describe ( 'drawer visibility' , function ( ) {
@@ -318,6 +325,10 @@ describe('MongoDB Assistant', function () {
318325 }
319326 } ) ;
320327
328+ beforeEach ( async function ( ) {
329+ await openAssistantDrawer ( browser ) ;
330+ } ) ;
331+
321332 describe ( 'clear chat button' , function ( ) {
322333 it ( 'appears only after a message is sent' , async function ( ) {
323334 const clearChatButton = browser . $ ( Selectors . AssistantClearChatButton ) ;
You can’t perform that action at this time.
0 commit comments