Skip to content

Commit

Permalink
add suite title to hook error in runner/cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kuceb committed Aug 10, 2020
1 parent 608fd72 commit 6988ef0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/runner/cypress/support/helpers.js
Expand Up @@ -327,14 +327,16 @@ const createHooks = (win, hooks = []) => {
if (fail) {
const numFailures = fail

return win[type](() => {
return win[type](function () {
const message = `${type} - ${this._runnable.parent.title || 'root'}`

if (agents) {
registerAgents(win)
}

if (_.isNumber(fail) && fail-- <= 0) {
debug(`hook pass after (${numFailures}) failures: ${type}`)
win.assert(true, type)
win.assert(true, message)

return
}
Expand All @@ -344,15 +346,15 @@ const createHooks = (win, hooks = []) => {
} else {
debug(`hook fail: ${type}`)

win.assert(false, type)
win.assert(false, message)

throw new Error(`hook failed: ${type}`)
}
})
}

return win[type](() => {
win.assert(true, type)
return win[type](function () {
win.assert(true, `${type} - ${this._runnable.parent.title || 'root'}`)
debug(`hook pass: ${type}`)
})
})
Expand Down

1 comment on commit 6988ef0

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6988ef0 Aug 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/linux-x64/circle-test-retries-6988ef039f0d3deb5e6e653a326fa562a3abe33a-417511/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/circle-test-retries-6988ef039f0d3deb5e6e653a326fa562a3abe33a-417494/cypress.tgz

Please sign in to comment.