Julie Ralph End to End Angular Testing with Protractor

AI Dev Craft · 41K views · 2014 · 18:47

Open on YouTube

Testing, debugging & developer toolsWeb developmenttalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering Protractor and Angular E2E testing questions, as an introduction to how Protractor works and how to use its tools.

Recommended by 4 people across 4 different months, 2014 to 2015.

What it is

A conference talk from ng-conf 2014 in which Julie Ralph of the Protractor team introduces end-to-end testing for Angular apps. It covers how Protractor works with Angular and includes a quick demo of the element explorer.

What people said

Recommends Andres D · 2014-01 · Stack Overflow · on “When angular does not load on initial page, how to select, click element with protractor's element explorer”

The element explorer is a tool that will help you to test protractor selectors while you are writing a test. Julie gave a presentation a couple of days ago and she gives a quick demo. Check this video: [this video]

Recommends Heikki · 2014-12 · Stack Overflow · on “How do you write a karma/jasmine integration test that passes values to the next test in sequence?”

Karma & Jasmine is a very bad fit to this sort of testing plan. The tests are designed to be atomic and executed in no particular order. You could execute the depended test in one large scenario Or write a ( setup and teardown [LINK] ) for the tests. Or implement a back-end helper function(s) to push the required state to the server. Overall, there is no one right solution to this problem => End to End Angular Testing [this video] I would recommend you to update to Protractor [LINK] from Karma/Jasmine, when running E2E tests, though it will not solve your current challenge.

Recommends alecxe · 2015-03 · Stack Overflow · on “Reading an updated input in a protractor test as a string”

getAttribute() as many other protractor methods returns a promise , you need to resolve it: element(by.id('group-sendgrid-hidden-input')).getAttribute('value').then(function (value) { console.log(value); }); Here are the relevant pages that should help to understand the concept of promises: Promises and the Control Flow [LINK] Protractor: How do promises work? [LINK] Asynchronous Testing with Protractor’s ControlFlow [LINK] Julie Ralph End to End Angular Testing with Protractor [this video] (great intro to protractor, in general)

Recommends diplosaurus · 2015-04 · Stack Overflow · on “How to get access to Angular object in a Protractor test”

Please see this video from AngularConf 2014 that shows Angular being accessed within Protractor to help run tests: [this video]

Cites Pedro Silva · 2015-05 · Stack Overflow · on “Are there any issues using Angular Material with Protractor for E2E testing?”

Well protractor is designed to test angular, so if you are using waitForAngular function and your website is angular you should not use that, you should do the following beforeEach test: browser.ignoreSynchronization = false; and you can do this to make your tests faster and probably help removing the timeout problem, on your protractor-conf.js file add this code: ... onPrepare: function() { var disableNgAnimate = function () { angular.module('disableNgAnimate', []).run(function($animate){ $animate.enabled(false); }); }, browser.addMockModule('disableNgAnimate', disableNgAnimate); }, ... and maybe you should check this video [this video] out.