1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

consume test fix

This commit is contained in:
Matthias Kretschmann 2019-07-12 13:57:33 +02:00
parent 93e6ba0af7
commit 288c630aa8
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -9,21 +9,18 @@ context('Consume', () => {
.should('have.length', 1)
})
beforeEach(() => {
cy.get('button[name="Download"]')
.first()
.as('button')
})
it('Download button is clickable when user is connected.', () => {
cy.get('@button').should('not.be.disabled')
cy.get('button[name="Download"]').should('not.be.disabled')
})
it('Consume asset and check if there is no error', () => {
// Click consume button
cy.get('@button').click()
cy.get('button[name="Download"]').click()
// Wait consume process to end
cy.get('@button', { timeout: 600000 }).should('contain', 'Get file')
cy.get('button[name="Download"]', { timeout: 600000 }).should(
'contain',
'Get file'
)
// check if there is no error
cy.get('article>div').should(
'not.contain',