Skip to content

Commit

Permalink
fix(test): adjust tests for stable27
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <[email protected]>
  • Loading branch information
elzody committed May 8, 2024
1 parent f0bc577 commit 979deb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
21 changes: 6 additions & 15 deletions cypress/e2e/open.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ describe('Open existing office files', function() {
})
cy.verifyOpen(filename)

cy.get('#app-sidebar-vue')
.should('be.visible')
cy.get('.app-sidebar-header__maintitle')
.should('be.visible')
.should('contain.text', filename)
// FIXME: wait for sidebar tab content
// FIXME: validate sharing tab
cy.screenshot('share-sidebar_' + filename)
Expand All @@ -92,11 +87,7 @@ describe('Open existing office files', function() {
cy.get('button.icon-nextcloud-sidebar').click()
})

cy.get('#app-sidebar-vue')
.should('be.visible')
cy.get('.app-sidebar-header__maintitle')
.should('be.visible')
.should('contain.text', filename)
cy.verifyOpen(filename)
// FIXME: wait for sidebar tab content
// FIXME: validate sharing tab
cy.screenshot('share-sidebar_' + filename)
Expand Down Expand Up @@ -128,7 +119,7 @@ describe('Open PDF with richdocuments', () => {
// Verify that clicking on the file uses the files PDF viewer
// and NOT richdocuments
it('Open PDF with files PDF viewer', () => {
cy.get('[data-cy-files-list-row-name="document.pdf"]').click()
cy.get('tr[data-file="document.pdf"]').click()
cy.waitForViewer()

// Verify Collabora is not being used
Expand All @@ -146,11 +137,11 @@ describe('Open PDF with richdocuments', () => {
// Verify that using the file action 'Edit with Nextcloud Office'
// opens the file using richdocuments
it('Open PDF with richdocuments', () => {
cy.get('[data-cy-files-list-row-name="document.pdf"]').as('pdf')
cy.get('@pdf').find('.action-items').as('actions')
cy.get('tr[data-file="document.pdf"]').as('pdf')
cy.get('@pdf').find('.fileactions').as('actions')

cy.get('@actions').find('.action-item__menutoggle').click()
cy.get('.action-button__longtext').contains('Edit with Nextcloud Office').click()
cy.get('@actions').find('a[data-action="menu"]').click()
cy.get('a.menuitem').contains('Open with Nextcloud Office').click()

// Wait for Collabora to open
cy.waitForViewer()
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Cypress.Commands.add('closeDocument', () => {
Cypress.Commands.add('verifyOpen', (filename) => {
cy.get('#app-sidebar-vue')
.should('be.visible')
cy.get('.app-sidebar-header__mainname')
cy.get('.app-sidebar-header__maintitle')
.should('be.visible')
.should('contain.text', filename)
})
Expand Down

0 comments on commit 979deb4

Please sign in to comment.