Skip to content

Commit

Permalink
fix: share-link cypress test
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <[email protected]>
  • Loading branch information
elzody committed Apr 22, 2024
1 parent 71e520f commit 2250420
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cypress/e2e/share-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,18 @@ describe('Public sharing of office documents', function() {
cy.spy(win, 'postMessage').as('postMessage')
},
})

cy.waitForCollabora()
cy.get('@postMessage', { timeout: 20000 }).should(spy => {
const calls = spy.getCalls()
const findMatchingCall = calls.find(call => call.args[0].indexOf('"MessageId":"App_LoadingStatus"') !== -1)
if (!findMatchingCall) {
return expect(findMatchingCall).to.not.be.undefined
}
const object = JSON.parse(findMatchingCall.args[0])
expect(object.Values).to.have.property('Status', 'Initialized')
})

cy.get('@loleafletframe').within(() => {
cy.get('#closebutton').click()
})
Expand Down

0 comments on commit 2250420

Please sign in to comment.