mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(files): Use data-cy (data attribute) instead of cy-data
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
bac37b13ec
commit
7f3cc7502b
3 changed files with 8 additions and 8 deletions
|
|
@ -6,7 +6,7 @@
|
|||
<template>
|
||||
<NcAppSidebar v-if="file"
|
||||
ref="sidebar"
|
||||
cy-data-sidebar
|
||||
data-cy-sidebar
|
||||
v-bind="appSidebar"
|
||||
:force-menu="true"
|
||||
@close="close"
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ export const navigateToFolder = (dirPath: string) => {
|
|||
|
||||
export const closeSidebar = () => {
|
||||
// {force: true} as it might be hidden behind toasts
|
||||
cy.get('[cy-data-sidebar] .app-sidebar__close').click({ force: true })
|
||||
cy.get('[data-cy-sidebar] .app-sidebar__close').click({ force: true })
|
||||
}
|
||||
|
||||
export const clickOnBreadcrumbs = (label: string) => {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ describe('Files: Sidebar', { testIsolation: true }, () => {
|
|||
|
||||
triggerActionForFile('file', 'details')
|
||||
|
||||
cy.get('[cy-data-sidebar]').should('be.visible')
|
||||
cy.get('[data-cy-sidebar]').should('be.visible')
|
||||
})
|
||||
|
||||
it('changes the current fileid', () => {
|
||||
|
|
@ -35,7 +35,7 @@ describe('Files: Sidebar', { testIsolation: true }, () => {
|
|||
|
||||
triggerActionForFile('file', 'details')
|
||||
|
||||
cy.get('[cy-data-sidebar]').should('be.visible')
|
||||
cy.get('[data-cy-sidebar]').should('be.visible')
|
||||
cy.url().should('contain', `apps/files/files/${fileId}`)
|
||||
})
|
||||
|
||||
|
|
@ -46,10 +46,10 @@ describe('Files: Sidebar', { testIsolation: true }, () => {
|
|||
// open the sidebar
|
||||
triggerActionForFile('file', 'details')
|
||||
// validate it is open
|
||||
cy.get('[cy-data-sidebar]').should('be.visible')
|
||||
cy.get('[data-cy-sidebar]').should('be.visible')
|
||||
|
||||
triggerActionForFile('file', 'delete')
|
||||
cy.get('[cy-data-sidebar]').should('not.exist')
|
||||
cy.get('[data-cy-sidebar]').should('not.exist')
|
||||
})
|
||||
|
||||
it('changes the fileid on delete', () => {
|
||||
|
|
@ -65,11 +65,11 @@ describe('Files: Sidebar', { testIsolation: true }, () => {
|
|||
// open the sidebar
|
||||
triggerActionForFile('other', 'details')
|
||||
// validate it is open
|
||||
cy.get('[cy-data-sidebar]').should('be.visible')
|
||||
cy.get('[data-cy-sidebar]').should('be.visible')
|
||||
cy.url().should('contain', `apps/files/files/${otherFileId}`)
|
||||
|
||||
triggerActionForFile('other', 'delete')
|
||||
cy.get('[cy-data-sidebar]').should('not.exist')
|
||||
cy.get('[data-cy-sidebar]').should('not.exist')
|
||||
// Ensure the URL is changed
|
||||
cy.url().should('not.contain', `apps/files/files/${otherFileId}`)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue