Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cypress/e2e/filesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ export function toggleMenuAction(filename: string, action: 'details'|'favorite'|
.find('[data-cy-files-list-row-actions]')
.findByRole('button', { name: 'Actions' })
.should('be.visible')
.click()
.click({ force: true })

cy.get(`[data-cy-files-list-row-action="${CSS.escape(action)}"]`)
cy.get(`[data-cy-files-list-row-action="${CSS.escape(action)}"]`, { timeout: 10000 })
.should('be.visible')
.findByRole('menuitem')
.click()
.click({ force: true })
}
4 changes: 4 additions & 0 deletions cypress/e2e/settings.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ describe('Check that user\'s settings survive a reload', () => {
})

it('Form survive a reload', () => {
cy.intercept({ method: 'POST', url: '**/activity/settings' }).as('apiCall')

cy.get("#app-content input[type='checkbox']").uncheck({ force: true })
cy.get("#app-content input[type='checkbox']").should('not.be.checked')
cy.wait('@apiCall')

cy.reload()

Expand All @@ -34,6 +37,7 @@ describe('Check that user\'s settings survive a reload', () => {
cy.get('#calendar_notification').check({ force: true })
cy.get('#personal_settings_email').check({ force: true })
cy.get('#personal_settings_notification').check({ force: true })
cy.wait('@apiCall')
cy.reload()

cy.get('#file_changed_email').should('not.be.checked')
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/sidebar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () =>

it('Has share activity', () => {
createPublicShare('welcome.txt')
cy.visit('/apps/files')
getFileListRow('welcome.txt').should('be.visible')

// No re-navigation needed — createPublicShare already waits for the share API
// and closes the sidebar, so the activity is recorded and the page is stable.
// Re-navigating triggers an async share-badge update that closes the Actions menu.
showActivityTab('welcome.txt')
cy.get('.activity-entry').first().should('contains.text', 'Shared as public link')
})
Expand Down
11 changes: 6 additions & 5 deletions cypress/e2e/sidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { toggleMenuAction, triggerActionForFile } from './filesUtils.ts'
import { getRowForFile, toggleMenuAction, triggerActionForFile } from './filesUtils.ts'

function showSidebarForFile(fileName: string) {
toggleMenuAction(fileName, 'details')
Expand Down Expand Up @@ -60,8 +60,6 @@ export function toggleFavorite(fileName: string) {
* @param fileName Name of the file to share
*/
export function createPublicShare(fileName: string) {
cy.intercept('POST', '/ocs/v2.php/apps/files_sharing/api/v1/shares').as('createPublicShare')

showSidebarForFile(fileName)
cy.get('#app-sidebar-vue')
.findByRole('tab', { name: 'Sharing' })
Expand All @@ -77,8 +75,6 @@ export function createPublicShare(fileName: string) {

cy.wait('@createShare')
closeSidebar()

cy.wait('@createPublicShare')
}

/**
Expand All @@ -88,6 +84,11 @@ export function createPublicShare(fileName: string) {
* @param newTag - The new tag
*/
export function addTag(fileName: string, newTag: string) {
getRowForFile(fileName)
.should('be.visible')
.find('.files-list__row-icon-preview--loaded')
.should('exist')

triggerActionForFile(fileName, 'systemtags:bulk')

cy.intercept('POST', '/remote.php/dav/systemtags').as('createTag')
Expand Down
Loading