Skip to content
Prev Previous commit
Next Next commit
fix(cypress): Prevent file being locked on rename
Signed-off-by: Marcel Müller <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
SystemKeeper authored and artonge committed May 22, 2025
commit c13cc6f76d4698d834ae25b5cea827501e36d3b7
5 changes: 5 additions & 0 deletions cypress/e2e/filesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ export const triggerActionForFile = (filename: string, actionId: string) => {
}

export function renameFile(fileName: string, newName: string) {
// The file must exist and the preview loaded as it locks the file
getRowForFile(fileName)
.should('be.visible')
.find('.files-list__row-icon-preview--loaded')
.should('exist')

triggerActionForFile(fileName, 'rename')

// intercept the move so we can wait for it
Expand Down