Skip to content

Commit

Permalink
Fix UI bug where test label was the contents of double quotes from te…
Browse files Browse the repository at this point in the history
…st title (#2646)

- Fixes #1157 

Would love any feedback on if/where to add tests, `runner_spec.coffee` didn't seem appropriate but might be a good place in the server?
  • Loading branch information
lilaconlee authored and chrisbreiding committed Oct 29, 2018
1 parent 3055648 commit d35e529
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/driver/src/cypress/runner.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ create = (specWindow, mocha, Cypress, cy) ->
test.wallClockStartedAt ?= wallClockStartedAt

## if this isnt a hook, then the name is 'test'
hookName = getHookName(runnable) or "test"
hookName = if runnable.type is "hook" then getHookName(runnable) else "test"

## if we haven't yet fired this event for this test
## that means that we need to reset the previous state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Cypress.on "test:after:run", (test) ->
pending.push(test)

describe "src/cypress/runner", ->
it 'handles "double quotes" in test name', (done) ->
cy.once "log:added", (log) ->
expect(log.hookName).to.equal("test")
done()
cy.wrap({})

context "pending tests", ->
it "is not pending", ->

Expand Down

0 comments on commit d35e529

Please sign in to comment.