Using acceptance testing
Acceptance tests generally help test workflows and emulate user interactions. In this recipe, we'll look at creating a few simple acceptance tests.
How to do it...
- In a new application, create a new component called
book-shelf
and a new acceptance test calledadd-book-test.js
:$ ember g component book-shelf $ ember g acceptance-test add-book
This will create the code necessary for the
book-shelf
component and theadd-book
acceptance test. Keep in mind that an integration test will also be generated for thebook-shelf
component. We will not be updating the integration test in this example. - Update the component file with a new
books
array and new action:// app/components/book-shelf.js import Ember from 'ember'; export default ...
Get Ember.js Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.