Skip to content

Commit b97a685

Browse files
committed
test(share): Ensure file list row is visible
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent 95e49e2 commit b97a685

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cypress/e2e/filesUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ export function moveFile (fileName: string, dirName: string) {
116116
})
117117
}
118118

119+
export function getFileListRow(filename: string) {
120+
return cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${CSS.escape(filename)}"]`)
121+
}
122+
119123
export function toggleMenuAction(fileName: string) {
120124
cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${CSS.escape(fileName)}"] [data-cy-files-list-row-actions]`)
121125
.should('be.visible')

cypress/e2e/sidebar.cy.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import { createFolder, navigateToFolder, moveFile, renameFile } from './filesUtils'
6+
import { createFolder, navigateToFolder, moveFile, renameFile, getFileListRow } from './filesUtils'
77
import { addComment, addTag, addToFavorites, createPublicShare, randHash, removeFromFavorites, showActivityTab } from './sidebarUtils'
88

99
describe('Check activity listing in the sidebar', { testIsolation: true }, () => {
@@ -32,8 +32,9 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () =>
3232

3333
it('Has share activity', () => {
3434
createPublicShare('welcome.txt')
35-
cy.get('body').contains('Link share created').should('exist')
36-
cy.get('.toast-close').click({ multiple: true })
35+
cy.visit('/apps/files')
36+
getFileListRow('welcome.txt').should('be.visible')
37+
3738
showActivityTab('welcome.txt')
3839
cy.get('.activity-entry').first().should('contains.text', 'Shared as public link')
3940
})

0 commit comments

Comments
 (0)