Skip to content

Commit

Permalink
fix: New attempt to reload file list
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 18, 2023
1 parent e81b315 commit 768c762
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 1 addition & 7 deletions cypress/e2e/nodes/Mentions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
7 changes: 5 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`
Expand Down

0 comments on commit 768c762

Please sign in to comment.