@@ -11,7 +11,7 @@ import test, { expect, Locator } from '@playwright/test';
1111import { HotKeys } from './hotKeys.js' ;
1212import { ContextMenu , MenuItemState } from './dialog-contextMenu.js' ;
1313import { ACTIVE_STATUS_ICON , DISCONNECTED_STATUS_ICON , IDLE_STATUS_ICON , SessionState } from './sessions.js' ;
14- import path from 'path' ;
14+ import { basename , relative } from 'path' ;
1515
1616const DEFAULT_TIMEOUT = 10000 ;
1717
@@ -182,7 +182,8 @@ export class PositronNotebooks extends Notebooks {
182182 * @param path - The path to the notebook to open.
183183 */
184184 async openNotebook ( path : string ) : Promise < void > {
185- await super . openNotebook ( path ) ;
185+ await this . quickaccess . openFileQuickAccessAndWait ( basename ( path ) , 1 ) ;
186+ await this . quickinput . selectQuickInputElement ( 0 ) ;
186187 await this . expectToBeVisible ( ) ;
187188 }
188189
@@ -796,8 +797,8 @@ export class PositronNotebooks extends Notebooks {
796797 // Logging the screenshot path for easier debugging
797798 const info = test . info ( ) ;
798799 const resolvedPath = info . snapshotPath ( screenshotName ) ;
799- const resolvedFile = path . basename ( resolvedPath ) ;
800- const repoRelativePath = path . relative ( process . cwd ( ) , resolvedPath ) . replace ( / \\ / g, '/' ) ;
800+ const resolvedFile = basename ( resolvedPath ) ;
801+ const repoRelativePath = relative ( process . cwd ( ) , resolvedPath ) . replace ( / \\ / g, '/' ) ;
801802 await info . attach ( `${ resolvedFile } .path.txt` , {
802803 body : Buffer . from ( repoRelativePath , 'utf8' ) ,
803804 contentType : 'text/plain' ,
0 commit comments