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 <jus@bitgrid.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
juliusknorr committed Jan 8, 2025
1 parent 73e89f5 commit c8b4bf5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4,794 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')
})
})
Loading

0 comments on commit c8b4bf5

Please sign in to comment.