Finding the rest of the Notes application components

With the previous view and router tests completed, we are now finished with the application and test code that we will present in this book for the localStorage-based Notes application. There are, however, a few more parts of the Notes application that we simply do not have room to discuss within the confines of this book.

Fortunately, each of the components (as well as their relevant test files) are available as part of the downloadable code samples for this book. The remaining parts of the Notes application that you can find in the samples are as follows:

  • App.Views.NotesFilter (notes/app/js/app/views/notes-filter.js): This view controls the filter input box and the visibility of the note rows in the displayed list of notes. The test file for this view can be found at notes/test/js/spec/views/notes-filter.spec.js.
  • App.Views.Notes (notes/app/js/app/views/notes.js): The App.Views.Notes view contains the App.Views.NotesItem and App.Views.NotesFilter views and is responsible for getting note data from the collection and for rendering a full list of notes. The corresponding test file is located at notes/test/js/spec/views/notes.spec.js.
  • App.Routers.Router (notes/app/js/app/routers/router.js): This is the full implementation of the Backbone.js router for Notes. Its test file is available at notes/test/js/spec/routers/router.spec.js.
  • app (notes/app/js/app/app.js): The app object controls the overall Notes application. It instantiates all of the top-level application components; for example, the App.Views.Notes view, the App.Routers.Router router, and the App.Collections.Notes collection. It also kicks off an initial collection fetch to import existing notes data. We do not include specs for this file, as creating and starting an actual application is usually encompassed within the scope of full integration testing—an approach we mentioned in Chapter 2, Creating a Backbone.js Application Test Plan, which you are encouraged to learn outside of this book.
  • notes/test/test.html: This is the test driver page for all the Notes application test suites and specs. This page aggregates all of the Notes specs we have discussed in this book as well as the specs for omitted views, and the full router implementation.

These extra files apply the fundamental lessons we have learned throughout this book to different application code and scenarios. Thus, reviewing the remaining Notes application files will provide you with a much better picture of a full Backbone.js application and test infrastructure that follows the testing principles we suggest. All in all, we hope that the code samples will send home the topics we have covered in this book and possibly give you some ideas and next steps for your test development education.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.186.201