diff --git a/cypress/e2e/addContent/addTweet.cy.ts b/cypress/e2e/addContent/addTweet.cy.ts index db24f684d..dc0c5222f 100644 --- a/cypress/e2e/addContent/addTweet.cy.ts +++ b/cypress/e2e/addContent/addTweet.cy.ts @@ -12,11 +12,11 @@ describe('Add Tweet Content', () => { cy.get('#addContent').should('exist') cy.get('[id="cy-youtube-channel-id"]').type('https://twitter.com/ijbguy/status/1771096005162729663') cy.get('[data-testid="add-content-btn"]').click() - cy.get('[data-testid="skip-location-btn"').click() + cy.get('[data-testid="skip-location-btn"]').click() cy.get('[data-testid="check-icon"]').click() cy.wait('@addTweet').then((interception) => { - //check we get a 402 response code, when trying to add content for the first time + // Check we get a 402 response code when trying to add content for the first time expect(interception.response.statusCode).to.eq(402) }) @@ -25,7 +25,12 @@ describe('Add Tweet Content', () => { url: 'http://localhost:8444/api/add_node*', }).as('addTweet2') - cy.wait('@addTweet2') // This is because add source is currently skipped, + cy.get('[data-testid="add-content-btn"]').click() + + cy.wait('@addTweet2').then((interception) => { + // Check we get a successful response code + expect(interception.response.statusCode).to.eq(200) + }) cy.get('.Toastify__toast-body').should('have.text', 'Content Added')