Interesting because even though Protractor has been around since before the Angular CLI, the Angular schematics to this day don't use Protractor. Instead they spin up the ridiculous Karma/Jasmine tests for each new component. Using Protractor has always been a choice whereas Karma/Jasmine were defaults.
But Karma/Jasmine solutions are ridiculous in my opinion. The Angular Testing Library is plug replaceable with Karma/Jasmine and a much better product.
Still Cypress reaches deep enough into our applications that it's now my preferred and only "real" test framework, I still use Angular-Testing lib, but don't spend much time on each test.
👨🏫 Co-Founder of This is Learning, Organizer of AarhusJS
✍️ Writer, Speaker, FOSS Maintainer 📗 Author
🏆 Microsoft MVP 🌟 GitHub Star
🌊 Nx Champion 🦸 Angular Hero of Education
The end-to-end test suite generated when creating an Angular application project with Angular CLI is using Protractor.
Protractor has the benefit of hooking into NgZone. Cypress sometimes has issues with waiting for an element to appear. You end up having to put random timeouts into your tests to wait for Angular to stabilize. Sometimes it works, but it's a flaky test waiting to fail.
Protractor is able to support legacy browsers like Internet Explorer and Edge Legacy.
Interesting because even though Protractor has been around since before the Angular CLI, the Angular schematics to this day don't use Protractor. Instead they spin up the ridiculous Karma/Jasmine tests for each new component. Using Protractor has always been a choice whereas Karma/Jasmine were defaults.
But Karma/Jasmine solutions are ridiculous in my opinion. The Angular Testing Library is plug replaceable with Karma/Jasmine and a much better product.
Still Cypress reaches deep enough into our applications that it's now my preferred and only "real" test framework, I still use Angular-Testing lib, but don't spend much time on each test.
The end-to-end test suite generated when creating an Angular application project with Angular CLI is using Protractor.
Protractor has the benefit of hooking into NgZone. Cypress sometimes has issues with waiting for an element to appear. You end up having to put random timeouts into your tests to wait for Angular to stabilize. Sometimes it works, but it's a flaky test waiting to fail.
Protractor is able to support legacy browsers like Internet Explorer and Edge Legacy.
Thanks for the reminder Lars, yes Angular sees Protractor as E2E and not unit test.