every step of the way we doubted our choices: were we making the wrong decision with a given library choice? “ Jesse Pollak, “Choosing Ember over React in 2016”
{ let rentalObj = Ember.Object.create({ image: 'quarto-no-centro.jpg', title: 'Quarto no Centro de Floripa' }); this.render(hbs`{{rental-listing rental=rentalObj}}`); assert.equal(this.$('.image.wide').length, 0, 'initially rendered small’); this.$('.image').click(); assert.equal(this.$('.image.wide').length, 1, 'rendered wide after click'); this.$('.image').click(); assert.equal(this.$('.image.wide').length, 0, 'rendered small after second click'); });
list rentals: should link to about page ok 2 PhantomJS 2.1 - JSHint | acceptance/list-rentals-test.js: should pass jshint ... ok 9 PhantomJS 2.1 - Integration | Component | rental listing: should toggle wide class on click ... 1..19 # tests 19 # pass 19 # skip 0 # fail 0 # ok