-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46918 from nextcloud/fix/recent-view
fix(files): Correctly create Nodes from WebDAV result in "recent"-view
- Loading branch information
Showing
7 changed files
with
64 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
import type { User } from '@nextcloud/cypress' | ||
import { getRowForFile, triggerActionForFile } from './FilesUtils' | ||
|
||
describe('files: Recent view', { testIsolation: true }, () => { | ||
let user: User | ||
|
||
beforeEach(() => cy.createRandomUser().then(($user) => { | ||
user = $user | ||
|
||
cy.uploadContent(user, new Blob([]), 'text/plain', '/file.txt') | ||
cy.login(user) | ||
})) | ||
|
||
it('see the recently created file in the recent view', () => { | ||
cy.visit('/apps/files/recent') | ||
// All are visible by default | ||
getRowForFile('file.txt').should('be.visible') | ||
}) | ||
|
||
/** | ||
* Regression test: There was a bug that the files were correctly loaded but with invalid source | ||
* so the delete action failed. | ||
*/ | ||
it('can delete a file in the recent view', () => { | ||
cy.intercept('DELETE', '**/remote.php/dav/files/**').as('deleteFile') | ||
|
||
cy.visit('/apps/files/recent') | ||
// See the row | ||
getRowForFile('file.txt').should('be.visible') | ||
// delete the file | ||
triggerActionForFile('file.txt', 'delete') | ||
cy.wait('@deleteFile') | ||
// See it is not visible anymore | ||
getRowForFile('file.txt').should('not.exist') | ||
// also not existing in default view after reload | ||
cy.visit('/apps/files') | ||
getRowForFile('file.txt').should('not.exist') | ||
}) | ||
}) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.