AngularJS Testing Cookbook : eliminate volatile code by taking control and understanding how to test AngularJS applications /

Saved in:
Bibliographic Details
Author / Creator:Bailey, Simon, author.
Imprint:Birmingham, UK : Packt Publishing, 2015.
Description:1 online resource (1 volume) : illustrations.
Language:English
Series:Quick answers to common problems
Quick answers to common problems.
Subject:
Format: E-Resource Book
URL for this record:http://pi.lib.uchicago.edu/1001/cat/bib/11907446
Hidden Bibliographic Details
ISBN:9781783983759
1783983752
9781783983742
1783983744
Notes:Includes index.
Online resource; title from cover page (Safari, viewed April 14, 2015).
Summary:Annotation This book is intended for developers who have an understanding of the basic principles behind both AngularJS and test-driven development. You, as a developer, are interested in eliminating the fear related to either introducing tests to an existing codebase or starting out testing on a fresh AngularJS application. If you're a team leader or part of a QA team with the responsibility of ensuring full test coverage of an application, then this book is ideal for you to comprehend the full testing scope required by your developers. Whether you're new to or are well versed with AngularJS, this book will guarantee a complete understanding of your application code and help reduce the cost of bugs.
Other form:Print version: Bailey, Simon. AngularJS Testing Cookbook : eliminate volatile code by taking control and understanding how to test AngularJS applications. Birmingham, England : Packt Publishing, ©2015 ix, 157 pages 9781783983742
Table of Contents:
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Setup and Configuration; Introduction; Creating a basic AngularJS application; Running a simple test using Jasmine; Installing Protractor; Running a simple test using Protractor; Installing Karma; Running tests using Karma; Installing Testem; Running tests using Testem; Automating test runners using Grunt; Automating test runners using Gulp; Chapter 2: Getting Started with Testing and AngularJS; Introduction; Loading a module; Writing a test spec; Debugging AngularJS code
  • Mocking injected instances using an objectMocking injected instances using spies; Chapter 3: How to Test Navigation and Routing; Introduction; Getting started with testing using ngRoute; Testing route parameters with ngRoute; Getting started with testing using ui-router; Testing the transitioning state with ui-router; Testing URL parameters with ui-router; Testing page loading using Protractor; Testing navigation using Protractor; Testing redirection using Protractor; Chapter 4: Testing Controllers; Introduction; Setting up for testing a controller
  • Testing the initial state of a scope objectTesting the initial state of a scope object with Protractor; Testing interactive scope changes with Protractor; Testing navigation scope changes with Protractor; Chapter 5: Testing User Interaction and Directives; Introduction; Starting with testing directives; Setting up templateUrl; Searching elements using selectors; Accessing basic HTML content; Accessing repeater content; Scope changes based on user input; Scope changes based on DOM events; Class changes based on window properties; Directive changes on interaction using Protractor
  • Chapter 6: Using Spies to Test EventsIntroduction; Testing event dispatches; Testing the handling of dispatched events; Testing the handling of external events; Testing the handling of callbacks; Testing events using Protractor; Chapter 7: Testing Filters; Introduction; Testing a filter that formats a number as text; Testing a filter that formats seconds to a time string; Using Protractor to test filter changes based on input; Using Protractor to test filter changes based on events; Chapter 8: Service and Factory Testing with Mocks and Spies; Introduction
  • Getting started with testing a serviceTesting HTTP GET requests using httpBackend; Testing HTTP POST requests using httpBackend; Using spies to test HTTP GET requests; Using spies to test HTTP POST requests; Testing service data using mock helpers; Testing rejected http promises; Testing constants; Using Protractor to test HTTP requests; Chapter 9: A Brief Look at Testing Animations; Introduction; Synchronous testing of animations; Testing animations with ngAnimateMock; Asynchronous testing of animations; Index