Skip to content

Commit a8ad5b6

Browse files
Claudejuliusknorr
andcommitted
Fix closebutton clicks and improve wait conditions across all test files
Co-authored-by: juliusknorr <3404133+juliusknorr@users.noreply.github.com>
1 parent 07952f4 commit a8ad5b6

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

cypress/e2e/integration.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ describe('Nextcloud integration', function() {
7575
.should('be.visible')
7676

7777
cy.get('button[aria-label="File"]').click()
78-
cy.get('button[aria-label="Save As"]')
79-
.should('be.visible', { timeout: 10_000 })
78+
cy.get('button[aria-label="Save As"]', { timeout: 10_000 })
79+
.should('be.visible')
8080
.click()
8181

82-
cy.get('#saveas-entries > div')
82+
cy.get('#saveas-entries > div', { timeout: 10_000 })
8383
.contains('Rich Text (.rtf)')
8484
.should('be.visible')
8585
.click()
8686
})
8787

88-
cy.get('.saveas-dialog').should('be.visible')
88+
cy.get('.saveas-dialog', { timeout: 10_000 }).should('be.visible')
8989
cy.get('.saveas-dialog input[type=text]')
9090
.should('be.visible')
9191
.should('have.value', `/${exportFilename}`)
@@ -96,9 +96,9 @@ describe('Nextcloud integration', function() {
9696
cy.waitForPostMessage('Action_Save_Resp', { success: true, fileName: exportFilename })
9797

9898
cy.get('@loleafletframe').within(() => {
99-
cy.get('#closebutton').click()
100-
cy.waitForViewerClose()
99+
cy.get('#closebutton', { timeout: 10000 }).should('be.visible').click()
101100
})
101+
cy.waitForViewerClose()
102102

103103
cy.openFile(exportFilename)
104104
})

cypress/e2e/share-federated.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ describe('Federated sharing of office documents', function() {
3434
cy.openFile(filename)
3535
cy.waitForViewer()
3636
cy.waitForCollabora(true, true).within(() => {
37-
cy.get('#closebutton').click()
38-
cy.waitForViewerClose()
37+
cy.get('#closebutton', { timeout: 10000 }).should('be.visible').click()
3938
})
39+
cy.waitForViewerClose()
4040
})
4141

4242
it.skip('Open a remotely shared file as a link', function() {
@@ -80,9 +80,9 @@ describe('Federated sharing of office documents', function() {
8080
cy.openFile(filename)
8181
cy.waitForViewer()
8282
cy.waitForCollabora(true, true).within(() => {
83-
cy.get('#closebutton').click()
84-
cy.waitForViewerClose()
83+
cy.get('#closebutton', { timeout: 10000 }).should('be.visible').click()
8584
})
85+
cy.waitForViewerClose()
8686
})
8787
})
8888
})

cypress/e2e/share-internal.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ describe('File sharing of office documents', function() {
3737

3838
// Validate closing
3939
cy.get('@loleafletframe').within(() => {
40-
cy.get('#closebutton').click()
41-
cy.waitForViewerClose()
40+
cy.get('#closebutton', { timeout: 10000 }).should('be.visible').click()
4241
})
42+
cy.waitForViewerClose()
4343
})
4444

4545
it('Open a shared file as readonly', function() {
@@ -60,8 +60,8 @@ describe('File sharing of office documents', function() {
6060

6161
// Validate closing
6262
cy.get('@loleafletframe').within(() => {
63-
cy.get('#closebutton').click()
64-
cy.waitForViewerClose()
63+
cy.get('#closebutton', { timeout: 10000 }).should('be.visible').click()
6564
})
65+
cy.waitForViewerClose()
6666
})
6767
})

cypress/e2e/share-link.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function waitForCollabora() {
145145
cy.waitForPostMessage('App_LoadingStatus', { Status: 'Document_Loaded' })
146146

147147
cy.get('@loleafletframe').within(() => {
148-
cy.get('#closebutton').click()
149-
cy.waitForViewerClose()
148+
cy.get('#closebutton', { timeout: 10000 }).should('be.visible').click()
150149
})
150+
cy.waitForViewerClose()
151151
}

0 commit comments

Comments
 (0)