Open RobertLowe opened 4 years ago
This doesn't seem to work:
describe('Something', () => { before(() => { cy.task('fixtures:user').then(data => { return cy.wrap(data).as('userData') }); }); it('should get user data', () => { cy.get('@userData').then(userData => { // stuff }) }) })
This does:
describe('Something', () => { it('should get user data', () => { cy.task('fixtures:user').then(data => { return cy.wrap(data).as('userData') }); cy.get('@userData').then(userData => { // stuff }) }) })
When using: cypress run --browser chrome --spec=./cypress/integration/example.js --env grep="should get user data"
cypress run --browser chrome --spec=./cypress/integration/example.js --env grep="should get user data"
Which is odd because if I throw inside the before, I can see that the before is actually run.
before
Any ideas?
It produces: CypressError: cy.get() could not find a registered alias for: '@userData'
CypressError: cy.get() could not find a registered alias for: '@userData'
This doesn't seem to work:
This does:
When using:
cypress run --browser chrome --spec=./cypress/integration/example.js --env grep="should get user data"
Which is odd because if I throw inside the
before
, I can see that the before is actually run.Any ideas?
It produces:
CypressError: cy.get() could not find a registered alias for: '@userData'