Sha256: e9b1b2dd6f18489d13c96da4abd5f5bea5eb381daafa525238eb888b3dba4b85

Contents?: true

Size: 838 Bytes

Versions: 4

Compression:

Stored size: 838 Bytes

Contents

describe('Rails Other examples', function() {
  it('cypress eval', function() {
    cy.app('clean') // have a look at e2e/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

4 entries across 4 versions & 1 rubygems

Version Path
cypress-on-rails-1.17.0 lib/generators/cypress_on_rails/templates/spec/cypress/e2e/rails_examples/other.cy.js
cypress-on-rails-1.16.0 lib/generators/cypress_on_rails/templates/spec/cypress/e2e/rails_examples/other.cy.js
cypress-on-rails-1.15.1 lib/generators/cypress_on_rails/templates/spec/cypress/e2e/rails_examples/other.cy.js
cypress-on-rails-1.15.0 lib/generators/cypress_on_rails/templates/spec/cypress/e2e/rails_examples/other.cy.js