@@ -155,8 +155,11 @@ export class Workspace {
155155 }
156156
157157 async fillSequenceContent ( content : string ) : Promise < void > {
158- await this . sequenceEditor . click ( ) ;
159- await this . sequenceEditor . fill ( content ) ;
158+ // Target the contenteditable host (.cm-content) rather than a line div (.cm-activeLine):
159+ // CodeMirror remounts when navigating between files, and a line div can briefly resolve
160+ // before its contenteditable ancestor is ready, making fill() throw "not editable".
161+ await this . sequenceEditorContent . click ( ) ;
162+ await this . sequenceEditorContent . fill ( content ) ;
160163 }
161164
162165 private async fillSequenceName ( name : string , path ?: string ) : Promise < void > {
@@ -222,7 +225,14 @@ export class Workspace {
222225 }
223226 const moreActionsButton = row . getByLabel ( 'More actions' ) ;
224227 await hoverRowAndWaitForButton ( this . page , row , moreActionsButton ) ;
225- await moreActionsButton . click ( ) ;
228+ // Open the menu via a DOM click event instead of a synthesized pointer click. The button
229+ // sits at the row's right edge under AG Grid's invisible vertical scrollbar overlay and
230+ // is only revealed on hover, so a real click is fragile: its actionability scroll summons
231+ // the overlay (which intercepts the click) and moves the row off the cursor (hiding the
232+ // button, so the click retries forever). The handler positions the menu from the button's
233+ // own getBoundingClientRect (event.currentTarget), so dispatching 'click' opens the menu
234+ // correctly without depending on pointer coordinates, scroll position, or hover.
235+ await moreActionsButton . dispatchEvent ( 'click' ) ;
226236 await this . workspaceFileContextMenu . waitFor ( { state : 'visible' } ) ;
227237 }
228238
0 commit comments