One of the nice features of testing with Intern and Leadfoot is the ease of authoring functional tests to mimic end-user behavior. The API for retrieving relevant DOM nodes is relatively straightforward, usually with a single line of code needed to get a reference to the relevant node.
When we started writing tests for Dijit, we realized that it was often a fair amount of boilerplate to get references to specific widget instances, attach points within those widgets, and property values of widgets. One of the advantages of Intern is you can integrate this boilerplate into a helper. So, we set out to create a simple Intern helper utility to make these operations as efficient to author as normal functional tests.
I had the pleasure of attending Connect-JS in Atlanta this past weekend and had a great time speaking, attending talks and meeting some very talented people. Connect-JS totes itself as being a low-cost, community conference that brings in recognized experts from around the world. They did a great job this year and I’m glad I had the opportunity to be there!
Recently, we had the opportunity to assist BuyWinR, a company based in Brisbane, Australia. In this case, we went from initial inquiry to solution in less than 48 hours. To provide insight into how a typical support issue might be solved, the founder of BuyWinR has allowed us to share this story.
SitePen is a huge supporter of TypeScript. It allows our developers to write using modern standards support for ES6 and some ES7 features while still targeting ES5 browsers. It also includes a type system that adds to our code’s integrity and makes it easier to write good software.
So you’ve had a chance to try out Intern Recorder, our new Chrome DevTools extension for recording functional tests, and now you want to efficiently work these tests into your workflow? This post will guide you through these steps and provide helpful advice for improving the tests you record.
The goal with Intern Recorder is to reduce the tedium of creating functional tests by 80-90%, but to make tests work flawlessly, you still have some steps to follow to perfect them. Intern Recorder is very useful for getting started when creating functional tests, but the test code should ultimately be fine-tuned by hand and maintained and updated manually. It may take multiple runs with the Recorder to get the sequence of actions just right, but once you have it, plan to discontinue using Recorder for ongoing updates to the test as you will now have code you can continue to improve.
Nearly every sufficiently large web application looks for a mechanism to efficiently synchronize or bind data between the Model and the View. There are many large scale application frameworks and approaches focused on this, whether the binding is one-directional like React, or follows other approaches such as those seen with AmpersandJS, Angular, Aurelia, Backbone, Ember, Knockout, Mayhem, or many others listed on ToDoMVC.
Simple Model-View synchronization
Many of our customers use Dojo and Dijit, because it’s a comprehensive toolkit for building web applications that work today, and while it does not intend to be an MV* framework, it already includes a lightweight approach to getters and setters.
While a more recent advancement allows us use the HTML5 file API to retrieve contents from files, this approach is not universally supported in web browsers as yet. Instead, we will access data from user-uploaded CSV files using the following steps:
- Upload a file to the server
- Retrieve the file from the server
- Load the data into an easy-to-use format