blog.ng-book.com
Evaluating Angular Expressions in Protractor Tests « ng-book.com – blog
http://blog.ng-book.com/evaluating-angular-expressions-in-protractor-tests
Evaluating Angular Expressions in Protractor Tests. This post is part of a ten-part series on how to write better Protractor tests. You can find the rest of the series here. As you know, in Angular different elements are bound to different. In Protractor, you can actually ask for the evaluated value of an expression within the context of a particular element. Say we had a place in our javascript where we’d specified:. Controller('MyController', function($scope) { $scope.bar = "Nate"; }).
blog.ng-book.com
Executing Raw Javascript in Protractor « ng-book.com – blog
http://blog.ng-book.com/executing-raw-javascript-in-protractor
Executing Raw Javascript in Protractor. This post is part of a ten-part series on how to write better Protractor tests. You can find the rest of the series here. Last time we talked about how you can inject Angular modules for HTTP mocking. But what if you simply want to execute arbitrary javascript? Executing sync javascript in Protractor is pretty straightforward:. You can also pass a regular function to Protractor:. Notice here that our function has a return value. Returns a promise, which we can call.
fullstackreact.com
Fullstack React: Fullstack React Articles
https://www.fullstackreact.com/articles
30 Days of React. Using jscodeshift with react-codemod to update createClass components to ES6 classes. A couple weeks ago, we discussed the difference between two React component styles, React.createClass and ES6 classes. Use Property Initializers for Cleaner React Components. In our previous post on Babel plugins and presets, we mentioned that there was one particular experimental JavaScript feature that is. The Chrome Warning for Babel Script Tags, Explained. React Daily UI - 007 Reactagram. This post...
blog.ng-book.com
Adding New Angular Modules to Protractor Tests « ng-book.com – blog
http://blog.ng-book.com/adding-new-angular-modules-to-protractor-tests
Adding New Angular Modules to Protractor Tests. This post is part of a ten-part series on how to write better Protractor tests. You can find the rest of the series here. For a reminder, here’s a diagram about how Protractor works:. Our Protractor test runs as javascript in Node.js on our “laptop” but our Angular app runs in our browser. But what if we want to run code in our browser, but only when we’re running our Protractor tests? Do something on run here. Create a new value. As much as we want our E2E...
blog.ng-book.com
Accessing Angular’s $injector from within Protractor « ng-book.com – blog
http://blog.ng-book.com/accessing-angulars-injector-from-within-protractor
Accessing Angular’s $injector from within Protractor. Here’s an uber hacky tip that purists will complain about: you can actually access angular’s. Your Protractor test if you’re determined to. But a little warning, this is a bit hacky. Why would we even need the injector in the first place? Here’s how you can access Angular’s. In your Protractor test. Somewhere in your app, set Angular’s. Run(function($injector, $window) { $window.$injector = $injector; });. In your tests with the following:. In my angu...
blog.ng-book.com
How to Mock HTTP Requests in Protractor « ng-book.com – blog
http://blog.ng-book.com/how-to-mock-http-requests-in-protractor
How to Mock HTTP Requests in Protractor. This post is part of a ten-part series on how to write better Protractor tests. You can find the rest of the series here. Last time we talked about how to add Angular Modules to your Protractor tests. One of the main reasons you’d want to add a module during test time is for HTTP mocking. Of course, if you can avoid it, you want your Protractor app to test against a real server. The idea is that our tests. We can mock some or all of our HTTP requests. We can mock ...
blog.ng-book.com
Taking Screenshots with Protractor « ng-book.com – blog
http://blog.ng-book.com/taking-screenshots-with-protractor
Taking Screenshots with Protractor. This post is part of a ten-part series on how to write better Protractor tests. You can find the rest of the series here. Protractor provides the ability to take a screenshot via the. Function. After you’ve taken a screenshot, though, you probably want to save it. The easiest way is to create a helper function that will save it for you like so:. At the top of the test spec:. Abstract writing screen shot to a file. Learn Protractor in a few hours with our online course.
blog.ng-book.com
Interactive Protractor REPL with elementExplorer « ng-book.com – blog
http://blog.ng-book.com/interactive-protractor-repl-with-elementexplorer
Interactive Protractor REPL with elementExplorer. This post is part of a ten-part series on how to write better Protractor tests. You can find the rest of the series here. One of the most painful parts of Protractor can be figuring out the right selector for locating an element. New versions of Protractor support the. Option, which give us a REPL where we can control a running browser, interactively from the command line! It should drop you in to a repl where you can try this:. Protractor is a one of the...
fullstackreact.com
Fullstack React: 30 Days of React
https://www.fullstackreact.com/30-days-of-react
30 Days of React. Interested in Learning React but having trouble getting started? We'll teach you how it all works -. Over the next 30 days, we'll walk through everything you need to know to work with React. From the very beginning. Through testing and deployment. Of our first app. Download the free 300 page PDF. Today, we're starting out at the beginning. Let's look at what React is and what makes it tick. We'll discuss why we want to use it. Driving Components Through Data. No application is complete ...