Skip to content

Commit c469007

Browse files
committed
test(cypress): fix Has share activity race condition
Skip the re-navigation to /apps/files after createPublicShare. The share is already recorded server-side (cy.wait('@createshare')) and the sidebar is closed, so showActivityTab can be called directly. Re-navigating caused NC to async-load the share badge on the file row, which triggered a Vue re-render that closed the Actions menu before the details entry could be clicked — failing even with a 10s timeout. AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anna Larch <anna@nextcloud.com>
1 parent 333572c commit c469007

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

cypress/e2e/sidebar.cy.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,9 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () =>
3838

3939
it('Has share activity', () => {
4040
createPublicShare('welcome.txt')
41-
cy.intercept('PROPFIND', /\/remote\.php\/dav\/files\//).as('loadFiles')
42-
cy.visit('/apps/files')
43-
// Wait for the file list PROPFIND to complete — share types are returned as
44-
// WebDAV properties in this response, so the row is stable once it resolves.
45-
cy.wait('@loadFiles')
46-
getFileListRow('welcome.txt').should('be.visible')
47-
41+
// No re-navigation needed — createPublicShare already waits for the share API
42+
// and closes the sidebar, so the activity is recorded and the page is stable.
43+
// Re-navigating triggers an async share-badge update that closes the Actions menu.
4844
showActivityTab('welcome.txt')
4945
cy.get('.activity-entry').first().should('contains.text', 'Shared as public link')
5046
})

0 commit comments

Comments
 (0)