Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
tmp: use legacy selectors to open files in shares
Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Aug 27, 2023
commit 96523ebd31787c4941ce6ae2a14fcc088b91ea6d
2 changes: 1 addition & 1 deletion cypress/e2e/share.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('Open test.md in viewer', function() {
return cy.visit(`/s/${token}`)
})
.then(() => {
cy.openFile('test.md')
cy.openFileInShare('test.md')
cy.getModal().getContent().should('be.visible')
cy.getModal().getContent().should('contain', 'Hello world')
cy.getModal().getContent().find('h2').should('contain', 'Hello world')
Expand Down
6 changes: 6 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ Cypress.Commands.add('openFile', (fileName, params = {}) => {
cy.get(`[data-cy-files-list] tr[data-cy-files-list-row-name="${fileName}"] a[data-cy-files-list-row-name-link]`).click(params)
})

Cypress.Commands.add('openFileInShare', fileName => {
cy.get(`.files-fileList tr[data-file="${CSS.escape(fileName)}"] a.name`).click()
// eslint-disable-next-line
cy.wait(250)
})

Cypress.Commands.add('closeFile', (fileName, params = {}) => {
cy.intercept({ method: 'POST', url: '**/apps/text/session/close' })
.as('close')
Expand Down