Skip to content

Commit

Permalink
decaffeinate reporter specs (#3765)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane authored Mar 21, 2019
1 parent 487da2b commit f347314
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 29 deletions.
8 changes: 8 additions & 0 deletions packages/reporter/cypress/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": [
"cypress"
],
"env": {
"cypress/globals": true
}
}
29 changes: 0 additions & 29 deletions packages/reporter/cypress/integration/controls_spec.coffee

This file was deleted.

41 changes: 41 additions & 0 deletions packages/reporter/cypress/integration/controls_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const { EventEmitter } = require('events')

describe('controls', function () {
beforeEach(function () {
cy.fixture('runnables').as('runnables')

this.runner = new EventEmitter()

cy.visit('cypress/support/index.html').then((win) => {
win.render({
runner: this.runner,
specPath: '/foo/bar',
})
})

cy.get('.reporter').then(() => {
this.runner.emit('runnables:ready', this.runnables)

this.runner.emit('reporter:start', {})
})
})

describe('responsive design', function () {
describe('>= 400px wide', () => {
it('shows \'Tests\'', () => {
cy.get('.focus-tests span').should('be.visible')
})
}
)

describe('< 400px wide', function () {
beforeEach(() => {
cy.viewport(399, 450)
})

it('hides \'Tests\'', () => {
cy.get('.focus-tests span').should('not.be.visible')
})
})
})
})

0 comments on commit f347314

Please sign in to comment.