Skip to content

Commit

Permalink
fix: Close viewer if we navigate back in browser history
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Knorr <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
  • Loading branch information
juliusknorr authored and nextcloud-command committed Jan 8, 2025
1 parent c1507af commit f299638
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 30 deletions.
29 changes: 29 additions & 0 deletions cypress/e2e/navigation.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

describe('Browser navigation', function() {
before(function() {
// Init user
cy.createRandomUser().then(user => {
// Upload test files
cy.uploadFile(user, 'image.png', 'image/png', '/image1.png')

// Visit nextcloud
cy.login(user)
cy.visit('/apps/files')
})
})
after(function() {
cy.logout()
})

it('Navigating back to the files overview', function() {
cy.getFile('image1.png', { timeout: 10000 })
cy.openFile('image1.png')
cy.get('body > .viewer').should('be.visible')
cy.go('back')
cy.get('body > .viewer').should('not.exist')
})
})
4 changes: 2 additions & 2 deletions js/vendor.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ version: 0.7.5
license: MIT

@floating-ui/core
version: 0.3.1
version: 1.6.8
license: MIT

@floating-ui/dom
version: 0.1.10
version: 1.6.11
license: MIT

@floating-ui/utils
Expand Down
Loading

0 comments on commit f299638

Please sign in to comment.