Angular 2 – Testing

Rick HerrmannWriting tests has been something I’ve been a proponent of for many years.  My testing experience started with C# and then continued on the front end with javascript and Angular 1.  So when I started learning Angular 2, I naturally wanted to see what the testing story was.

The front-end testing I’ve done in the past has always had some friction with respect to getting the tools setup properly.  Mostly I have used Jasmine as the testing framework, which is pretty self contained – but to get a node test server setup properly there are a variety of other npm modules and karma configuration settings to deal with.  I previously wrote about how the angular-cli makes it easy to get an Angular 2 project setup, and this includes getting the test tools setup as well.  So instead of dealing with configuration settings, you can quickly get to just writing tests.

Continue reading “Angular 2 – Testing”

Uploading multiple attachments in SharePoint with one Input

misc3_bgI ran into the problem of not being able to upload an indefinite number of attachments to a SharePoint list item.  Using a file input could only upload file per input and I needed to allow the user to upload as many as they wanted.  I ended up following this blog post.

To select multiple files in one file input, the JavaScript plugin jquery.multifile.js is needed.  With this plugin, all you need to do to select multiple files is include multiple=”multiple” and class=”multi” on the file input.  When you choose a file it shows up below the input like this:

Continue reading “Uploading multiple attachments in SharePoint with one Input”