From 768c7627ed6620e917e06b65788c8b4b65d94653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 18 Aug 2023 13:42:49 +0200 Subject: [PATCH] fix: New attempt to reload file list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/e2e/nodes/Mentions.spec.js | 8 +------- cypress/support/commands.js | 7 +++++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cypress/e2e/nodes/Mentions.spec.js b/cypress/e2e/nodes/Mentions.spec.js index e732ea866b3..f62d4a6866b 100644 --- a/cypress/e2e/nodes/Mentions.spec.js +++ b/cypress/e2e/nodes/Mentions.spec.js @@ -7,16 +7,10 @@ const currentUser = user const fileName = 'empty.md' -const refresh = () => { - cy.get('.files-controls .crumb:not(.hidden) a') - .last() - .click({ force: true }) -} - const createFileWithMention = (target, userToMention) => { const content = `Hello @[${userToMention}](mention://user/${userToMention})` cy.createFile(target, content) - .then(refresh) + .then(() => cy.reloadFileList()) } describe('Test mentioning users', () => { diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 6f0c2f0b284..3fcf8c9e720 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -284,8 +284,11 @@ Cypress.Commands.add('propfindFolder', (path, depth = 0) => { }) }) -// FIXME: proper file list reload only once that is possible with the vue files app -Cypress.Commands.add('reloadFileList', () => cy.reload()) +Cypress.Commands.add('reloadFileList', () => { + return cy.get('.breadcrumb__crumbs .vue-crumb a') + .last() + .click({ force: true }) +}) Cypress.Commands.add('openFolder', (name) => { const url = `**/${encodeURI(name)}`