Sha256: 9df5e0cac16fabe63dcbb0adc16de6d45f438f6d3523c35aeb54745789e4cd26
Contents?: true
Size: 929 Bytes
Versions: 23
Compression:
Stored size: 929 Bytes
Contents
describe('Rails using factory bot examples', function() { beforeEach(() => { cy.app('clean') // have a look at cypress/app_commands/clean.rb }) it('using single factory bot', function() { cy.appFactories([ ['create', 'post', {title: 'Good bye Mars'} ] ]) cy.visit('/') cy.get('table').find('tbody').should(($tbody) => { // clean should of removed these from other tests expect($tbody).not.to.contain('Hello World') expect($tbody).to.contain('Good bye Mars') }) }) it('using multiple factory bot', function() { cy.appFactories([ ['create_list', 'post', 10], ['create', 'post', {title: 'Hello World'} ] ]) cy.visit('/') cy.get('table').find('tbody').should(($tbody) => { // clean should of removed these from other tests expect($tbody).to.contain('Hello World') expect($tbody).not.to.contain('Good bye Mars') }) }) })
Version data entries
23 entries across 23 versions & 1 rubygems