Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Angular 6 for Enterprise-Ready Web Applications

You're reading from   Angular 6 for Enterprise-Ready Web Applications Deliver production-ready and cloud-scale Angular web apps

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781786462909
Length 512 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Doguhan Uluca Doguhan Uluca
Author Profile Icon Doguhan Uluca
Doguhan Uluca
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Setting Up Your Development Environment FREE CHAPTER 2. Create a Local Weather Web Application 3. Prepare Angular App for Production Release 4. Staying Up to Date with Angular Updates 5. Enhance Angular App with Angular Material 6. Reactive Forms and Component Interaction 7. Create a Router-First Line-of-Business App 8. Continuous Integration and API Design 9. Design Authentication and Authorization 10. Angular App Design and Recipes 11. Highly-Available Cloud Infrastructure on AWS 12. Google Analytics and Advanced Cloud Ops 13. Other Books You May Enjoy

Updating unit tests

In order to keep your unit tests running, you will need to import MaterialModule to any component's spec file that uses Angular material:

*.component.spec.ts
...
beforeEach(
async(() => {
TestBed.configureTestingModule({
...
imports: [..., MaterialModule, NoopAnimationsModule],
}).compileComponents()
})
)

You will also need to update any test, including e2e tests, that search for a particular HTML element.

For example, since the app's title, LocalCast Weather, is not in an h1 tag anymore, you must update the spec file to look for it in a span element:

src/app/app.component.spec.ts
expect(compiled.querySelector('span').textContent).toContain('LocalCast Weather')

Similarly, in e2e tests, you will need to update your page object function to retrieve the text from the correct location:

e2e/app.po.ts...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image