From 288c630aa8c13836344c3c53f66b993e2c66d4bc Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 12 Jul 2019 13:57:33 +0200 Subject: [PATCH] consume test fix --- cypress/integration/consume.spec.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/cypress/integration/consume.spec.js b/cypress/integration/consume.spec.js index 73c1424..95bd8b7 100644 --- a/cypress/integration/consume.spec.js +++ b/cypress/integration/consume.spec.js @@ -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',