Skip to content

Commit

Permalink
fix another flaky tests, seems .should doesn't retry when chained off…
Browse files Browse the repository at this point in the history
… of .then 🤔'
  • Loading branch information
kuceb committed Jan 25, 2019
1 parent 32c0d75 commit 623c4f0
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1915,13 +1915,13 @@ describe "src/cy/commands/xhr", ->
xhr.foo = "bar"
resolve(xhr)
xhr.send()
.should (xhr) ->
## ensure this is set to prevent accidental
## race conditions down the road if something
## goes wrong
expect(xhr.foo).to.eq("bar")
expect(xhr.aborted).not.to.be.true
expect(log.get("state")).to.eq("passed")
cy.wrap(null).should ->
## ensure this is set to prevent accidental
## race conditions down the road if something
## goes wrong
expect(xhr.foo).to.eq("bar")
expect(xhr.aborted).not.to.be.true
expect(log.get("state")).to.eq("passed")

context "Cypress.on(window:unload)", ->
it "aborts all open XHR's", ->
Expand Down

0 comments on commit 623c4f0

Please sign in to comment.