Sha256: bd347a9487cd9af552c1a51434d1232b71f86ac7f0d86e701f508e79897c5329

Contents?: true

Size: 842 Bytes

Versions: 23

Compression:

Stored size: 842 Bytes

Contents

describe('Rails Other examples', function() {
  it('cypress eval', function() {
    cy.app('clean') // have a look at cypress/app_commands/clean.rb
    cy.appEval("Post.create(title: 'Hello Eval')")

    cy.visit('/')
    cy.get('table').find('tbody').should(($tbody) => {
      expect($tbody).not.to.contain('Multi Command')
      expect($tbody).to.contain('Hello Eval')
    })
  })

  it('runs multiple commands', function() {
    cy.appCommands([{ name: 'clean' },
                    { name: 'scenarios/basic' },
                    { name: 'eval', options: "Post.create(title: 'Multi Command')" }])
    cy.visit('/')

    cy.get('table').find('tbody').should(($tbody) => {
      expect($tbody).not.to.contain('Hello Eval')
      expect($tbody).to.contain('Multi Command')
      expect($tbody).to.contain('I am a Postman')
    })
  })
})

Version data entries

23 entries across 23 versions & 1 rubygems

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