AngularJS Testing Cookbook : eliminate volatile code by taking control and understanding how to test AngularJS applications /
Annotation
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
2015.
|
Colección: | Quick answers to common problems.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- 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