From 42c5900e1175f17ccb106ddeb267b0fef3a042d1 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 30 Oct 2024 13:37:18 +0100 Subject: test: Adjust Cypress setup to support mainline JS syntax TODO: Drop when we support Node 22. Signed-off-by: Ferdinand Thiessen --- cypress/e2e/files/files-renaming.cy.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cypress/e2e') diff --git a/cypress/e2e/files/files-renaming.cy.ts b/cypress/e2e/files/files-renaming.cy.ts index 6ba32989aa4..1bb2a530fe8 100644 --- a/cypress/e2e/files/files-renaming.cy.ts +++ b/cypress/e2e/files/files-renaming.cy.ts @@ -5,6 +5,7 @@ import type { User } from '@nextcloud/cypress' import { getRowForFile, renameFile, triggerActionForFile } from './FilesUtils' +import { assertNotExistOrNotVisible } from '../settings/usersUtils' const haveValidity = (validity: string | RegExp) => { if (typeof validity === 'string') { @@ -139,11 +140,15 @@ describe('files: Rename nodes', { testIsolation: true }, () => { getRowForFile('file.txt').should('be.visible') // Z so it is shown last renameFile('file.txt', 'zzz.txt') + // not visible any longer - getRowForFile('zzz.txt').should('not.be.visible') + getRowForFile('zzz.txt') + .should(assertNotExistOrNotVisible) + // scroll file list to bottom cy.get('[data-cy-files-list]').scrollTo('bottom') cy.screenshot() + // The file is no longer in rename state getRowForFile('zzz.txt') .should('be.visible') -- cgit v1.2.3