Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

feat(ui): add retry icon in browser gui #30

Merged
merged 6 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
> [Please refer to this issue for updates about official cypress retry support](https://github.com/cypress-io/cypress/issues/1313)

![](docs/readme-screenshot.png)
![](2019-02-12-13-29-53.png)

### Installation

Expand Down
2 changes: 2 additions & 0 deletions cypress/tests/unit/main.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ describe('deeply nested', () => {
'AE 0',
'AA 0',
])

expect(cy.$$('.runnable-title:contains(T 2)', top.document).parent().children('i').length).eq(5)
})
})

Expand Down
12 changes: 12 additions & 0 deletions cypress/tests/unit/pretty-demo.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
describe('Some flaky suite', () => {
let counter = 0

beforeEach(() => {
Cypress.currentTest.retries(4)
})

it('should pass on 3rd attempt', () => {
counter++
expect(counter === 3, 'some flaky assertion').eq(true)
})
})
7 changes: 4 additions & 3 deletions cypress/tests/unit/retries-hidden.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

const { _ } = Cypress

Cypress.env('RETRIES_HIDDEN', true)

if (!top.alreadyRan) {
Cypress.env('RETRIES_HIDDEN', true)
top.alreadyRan = true
cy.$$('.restart', top.document).click()
}

expect(Cypress.env('RETRIES_HIDDEN')).ok

const failTwice = _.before(3, () => {
throw new Error('foo')
})
Expand All @@ -20,7 +21,7 @@ describe('suite', () => {

cy.wait(10).should(() => {
failTwice()
cy.wrap(cy.$$('.retry-0', top.document)).should('not.be.visible')
cy.wrap(cy.$$('.command.retry-0', top.document)).should('not.be.visible')
})

})
Expand Down
Binary file modified docs/readme-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading