Skip to content

Commit

Permalink
(BSR)[PRO] test: only intercept one offerers/new
Browse files Browse the repository at this point in the history
(BSR)[PRO] test: timeout back to default 30secs
  • Loading branch information
scolson-pass committed Sep 4, 2024
1 parent 691ce43 commit 83accee
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ When('I fill activity form without target audience', () => {
})

When('I validate the registration', () => {
cy.intercept({ method: 'POST', url: '/offerers/new' }).as('createOfferer')
cy.wait(2000) // @todo: delete this when random failures fixed
cy.intercept({ method: 'POST', url: '/offerers/new', times: 1 }).as(
'createOfferer'
)
cy.findByText('Valider et créer ma structure').click()
cy.wait('@createOfferer').its('response.statusCode').should('eq', 201)
})

When('I add a new offerer', () => {
Expand Down Expand Up @@ -164,9 +167,6 @@ Then('the attachment is in progress', () => {
})

Then('the offerer is created', () => {
cy.wait('@createOfferer', { timeout: 60000 })
.its('response.statusCode')
.should('eq', 201)
cy.findAllByTestId('global-notification-success').should(
'contain',
'Votre structure a bien été créée'
Expand Down

0 comments on commit 83accee

Please sign in to comment.