File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/compass-e2e-tests/tests Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,13 @@ describe('MongoDB Assistant', function () {
183183
184184 mockAssistantServer . clearRequests ( ) ;
185185 await clearChat ( browser ) ;
186+
187+ // Close the drawer if open to provide a clean environment for the next test
188+ const drawerCloseButton = browser . $ ( Selectors . AssistantDrawerCloseButton ) ;
189+ if ( await drawerCloseButton . isDisplayed ( ) ) {
190+ await browser . clickVisible ( drawerCloseButton ) ;
191+ await drawerCloseButton . waitForDisplayed ( { reverse : true } ) ;
192+ }
186193 } ) ;
187194
188195 describe ( 'drawer visibility' , function ( ) {
@@ -323,6 +330,9 @@ describe('MongoDB Assistant', function () {
323330 describe ( 'after opt-in' , function ( ) {
324331 before ( async function ( ) {
325332 await setAIOptIn ( true ) ;
333+ } ) ;
334+
335+ beforeEach ( async function ( ) {
326336 await openAssistantDrawer ( browser ) ;
327337 } ) ;
328338
You can’t perform that action at this time.
0 commit comments