Sha256: 475941e22ab79fadf15bb6beaace877ca6cf1244a5bec78c7813a4006a9cd432

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 Bytes

Contents

describe('Rails using scenarios examples', function() {
  beforeEach(() => {
    cy.app('clean') // have a look at cypress/app_commands/clean.rb
  })

  it('setup basic scenario', function() {
    cy.appScenario('basic')
    cy.visit('/')
    cy.get('table').find('tbody').should(($tbody) => {
      // clean should of removed these from other tests
      expect($tbody).not.to.contain('Good bye Mars')
      expect($tbody).not.to.contain('Hello World')

      expect($tbody).to.contain('I am a Postman')
    })
  })

  // uncomment these if you want to see what happens
  // it('example of missing scenario failure', function() {
  //   cy.appScenario('missing')
  // })
  //
  // it('example of missing app failure', function() {
  //   cy.app('run_me')
  // })
})

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cypress-on-rails-1.1.1 lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_scenarios_spec.js
cypress-on-rails-1.1.0 lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_scenarios_spec.js