Skip to content

Commit

Permalink
fixup! fix: New attempt to reload file list
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Aug 18, 2023
1 parent 768c762 commit 52013d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/attachments.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,14 @@ describe('Test all attachment insertion methods', () => {

it('[share] check everything behaves correctly on the share target user side', () => {
// check the file list
cy.get('test.md')
cy.getFile('test.md')
.should('contain', 'test.md')
cy.get('github.png')
cy.getFile('github.png')
.should('not.exist')
cy.showHiddenFiles()

// check the attachment folder is not there
cy.get('test.md')
cy.getFile('test.md')
.should('exist')
.should('have.attr', 'data-cy-files-list-row-fileid')
.then((documentId) => {
Expand Down
11 changes: 5 additions & 6 deletions cypress/e2e/workspace.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('Workspace', function() {
cy.uploadFile('test.md', 'text/markdown', `${currentFolder}/README.md`)
cy.createFolder(`${currentFolder}/subdirectory`)
cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.getFile('README.md').should('contain', 'README.md')
cy.getFile('README.md')
cy.get('#rich-workspace .ProseMirror')
.should('contain', 'Hello world')
cy.openFolder('subdirectory')
Expand All @@ -56,7 +56,7 @@ describe('Workspace', function() {
it('Hides the workspace when switching to another view', function() {
cy.uploadFile('test.md', 'text/markdown', `${currentFolder}/README.md`)
cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.getFile('README.md').should('contain', 'README.md')
cy.getFile('README.md')
cy.get('#rich-workspace .ProseMirror')
.should('contain', 'Hello world')
cy.get('a[href*="/apps/files/recent"]')
Expand Down Expand Up @@ -121,7 +121,7 @@ describe('Workspace', function() {
it('takes README.md into account', function() {
cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/README.md`)
cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.getFile('README.md').should('contain', 'README.md')
cy.getFile('README.md')
cy.get('#rich-workspace .ProseMirror')
.should('contain', 'Hello world')
})
Expand Down Expand Up @@ -238,7 +238,7 @@ describe('Workspace', function() {
cy.modifyUser(user, 'language', 'de_DE')
cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/Anleitung.md`)
cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.getFile('Anleitung.md').should('contain', 'Anleitung.md')
cy.getFile('Anleitung.md')
cy.get('#rich-workspace .ProseMirror')
.should('contain', 'Hello world')
})
Expand All @@ -247,7 +247,7 @@ describe('Workspace', function() {
cy.modifyUser(user, 'language', 'fr')
cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/Anleitung.md`)
cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.getFile('Anleitung.md').should('contain', 'Anleitung.md')
cy.getFile('Anleitung.md')
})
})

Expand Down Expand Up @@ -291,7 +291,6 @@ describe('Workspace', function() {
})

const openSidebar = filename => {
cy.getFile(filename).should('contain', filename)
cy.getFile(filename).find('.files-list__row-mtime').click()
cy.get('.app-sidebar-header').should('contain', filename)
}
Expand Down
4 changes: 1 addition & 3 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ Cypress.Commands.add('propfindFolder', (path, depth = 0) => {
})

Cypress.Commands.add('reloadFileList', () => {
return cy.get('.breadcrumb__crumbs .vue-crumb a')
.last()
.click({ force: true })
return cy.reload()
})

Cypress.Commands.add('openFolder', (name) => {
Expand Down

0 comments on commit 52013d6

Please sign in to comment.