0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-12 03:59:16 +00:00
nextcloud_server/cypress/e2e/files_sharing/public-share/rename-files.cy.ts
Ferdinand Thiessen 4a90d5328c
test: Add end-to-end tests for new public share Vue UI
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-06 03:38:48 +02:00

32 lines
922 B
TypeScript

/*!
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getRowForFile, haveValidity, triggerActionForFile } from '../../files/FilesUtils.ts'
import { getShareUrl, setupPublicShare } from './setup-public-share.ts'
describe('files_sharing: Public share - renaming files', { testIsolation: true }, () => {
beforeEach(() => {
setupPublicShare()
.then(() => cy.logout())
.then(() => cy.visit(getShareUrl()))
})
it('can rename a file', () => {
// All are visible by default
getRowForFile('foo.txt').should('be.visible')
triggerActionForFile('foo.txt', 'rename')
getRowForFile('foo.txt')
.findByRole('textbox', { name: 'Filename' })
.should('be.visible')
.type('{selectAll}other.txt')
.should(haveValidity(''))
.type('{enter}')
// See it is renamed
getRowForFile('other.txt').should('be.visible')
})
})