Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
AngularJS Testing Cookbook
Table of Contents
AngularJS Testing Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Setup and Configuration
Introduction
Creating a basic AngularJS application
Getting ready
How to do it…
How it works…
See also
Running a simple test using Jasmine
Getting ready
How to do it…
How it works…
There's more…
See also
Installing Protractor
Getting ready
How to do it…
There's more…
See also
Running a simple test using Protractor
Getting ready
How to do it…
How it works…
There's more…
See also
Installing Karma
Getting ready
How to do it…
There's more…
See also
Running tests using Karma
Getting ready
How to do it…
How it works…
There's more…
See also
Installing Testem
Getting ready
How to do it…
See also
Running tests using Testem
Getting ready
How to do it…
How it works…
There's more…
See also
Automating test runners using Grunt
Getting ready
How to do it…
How it works…
See also
Automating test runners using Gulp
Getting ready
How to do it…
How it works…
See also
2. Getting Started with Testing and AngularJS
Introduction
Loading a module
Getting ready
How to do it…
There's more…
Writing a test spec
Getting ready
How to do it…
How it works…
There's more…
Debugging AngularJS code
Getting ready
How to do it…
See also
Mocking injected instances using an object
Getting ready
How to do it…
How it works…
See also
Mocking injected instances using spies
Getting ready
How to do it…
How it works…
See also
3. How to Test Navigation and Routing
Introduction
Getting started with testing using ngRoute
Getting ready
How to do it…
How it works…
There's more…
See also
Testing route parameters with ngRoute
Getting ready
How to do it…
How it works…
See also
Getting started with testing using ui-router
Getting ready
How to do it…
How it works…
There's more…
See also
Testing the transitioning state with ui-router
Getting ready
How to do it…
How it works…
See also
Testing URL parameters with ui-router
Getting ready
How to do it…
How it works…
See also
Testing page loading using Protractor
Getting ready
How to do it…
How it works…
There's more…
See also
Testing navigation using Protractor
Getting ready
How to do it…
How it works…
There's more…
See also
Testing redirection using Protractor
Getting ready
How to do it…
How it works…
See also
4. Testing Controllers
Introduction
Setting up for testing a controller
Getting ready
How to do it…
How it works…
See also
Testing the initial state of a scope object
Getting ready
How to do it…
How it works…
See also
Testing the initial state of a scope object with Protractor
Getting ready
How to do it…
How it works…
See also
Testing interactive scope changes with Protractor
Getting ready
How to do it…
How it works…
See also
Testing navigation scope changes with Protractor
Getting ready
How to do it…
How it works…
See also
5. Testing User Interaction and Directives
Introduction
Starting with testing directives
Getting ready
How to do it…
How it works…
There's more…
See also
Setting up templateUrl
Getting ready
How to do it…
How it works…
See also
Searching elements using selectors
Getting ready
How to do it…
How it works…
There's more…
See also
Accessing basic HTML content
Getting ready
How to do it…
How it works…
There's more…
See also
Accessing repeater content
Getting ready
How to do it…
How it works…
See also
Scope changes based on user input
Getting ready
How to do it…
How it works…
See also
Scope changes based on DOM events
Getting ready
How to do it…
How it works…
There's more…
See also
Class changes based on window properties
Getting ready
How to do it…
How it works…
There's more…
See also
Directive changes on interaction using Protractor
Getting ready
How to do it…
How it works…
See also
6. Using Spies to Test Events
Introduction
Testing event dispatches
Getting ready…
How to do it…
How it works…
There's more…
See also…
Testing the handling of dispatched events
Getting ready…
How to do it…
How it works…
There's more…
See also…
Testing the handling of external events
Getting ready…
How to do it…
How it works…
See also…
Testing the handling of callbacks
Getting ready…
How to do it…
How it works…
Testing events using Protractor
Getting ready…
How to do it…
How it works…
See also…
7. Testing Filters
Introduction
Testing a filter that formats a number as text
Getting ready
How to do it…
How it works…
See also
Testing a filter that formats seconds to a time string
Getting ready
How to do it…
How it works…
There's more…
See also
Using Protractor to test filter changes based on input
Getting ready
How to do it…
How it works…
See also
Using Protractor to test filter changes based on events
Getting ready
How to do it…
How it works…
See also
8. Service and Factory Testing with Mocks and Spies
Introduction
Getting started with testing a service
Getting ready
How to do it…
How it works…
See also
Testing HTTP GET requests using $httpBackend
Getting ready
How to do it…
How it works…
See also
Testing HTTP POST requests using $httpBackend
Getting ready
How to do it…
How it works…
See also
Using spies to test HTTP GET requests
Getting ready
How to do it…
How it works…
There's more…
See also
Using spies to test HTTP POST requests
Getting ready
How to do it…
How it works…
There's more…
See also
Testing service data using mock helpers
Getting ready
How to do it…
How it works…
See also
Testing rejected $http promises
Getting ready
How to do it…
How it works…
There's more…
See also
Testing constants
Getting ready
How to do it…
How it works…
There's more…
See also
Using Protractor to test HTTP requests
Getting ready
How to do it…
How it works…
See also
9. A Brief Look at Testing Animations
Introduction
Synchronous testing of animations
Getting ready
How to do it…
How it works…
There's more…
See also
Testing animations with ngAnimateMock
Getting ready
How to do it…
How it works…
See also
Asynchronous testing of animations
Getting ready
How to do it…
How it works…
See also
Index
← Prev
Back
Next →
← Prev
Back
Next →