Skip to content

Instantly share code, notes, and snippets.

@sjtipton
sjtipton / deb12con-notes.md
Created December 14, 2013 20:35
Notes from inaugural DE Developer Conference December 13, 2013 Dominion Enterprises Survey: http://de12bcon.herokuapp.com/survey
DIM Wins;
DIM Losses;
DIM Ties;
=IF(((Wins + Losses + Ties) == 0), VALUE(0), ((Wins + (0.5 * Ties))/(Wins + Losses + Ties)))
@sjtipton
sjtipton / SeleniumTestExampleDependentOnNgClick.cs
Created February 22, 2016 14:19
C# Selenium test dependent on Angular ngClick event
/* Helper class */
public sealed class ElementInteractionHelper
{
private readonly IJavaScriptExecutor _executor;
private const string NgClick = "arguments[0].click();";
public ElementInteractionHelper() { }
public ElementInteractionHelper(InternetExplorerDriver driver)
@sjtipton
sjtipton / angular-controller-testing-with-service-dependency.spec.js
Created May 25, 2016 19:57
When testing an Angular controller that has an injected service dependency, you will want to test the success/error callback handling, rather than re-testing the service (e.g. by hooking into $httpBackend functions)
describe('MyCtrl', function () {
var ctrl, scope, mockToaster, mockLog, mockMySvc, invokeController;
// Initialize a bare-bones behavior function for each tested service function
var mockMySvcSomeFunctionBehavior = function () {};
beforeEach(inject(function ($controller, $rootScope) {
mockMySvc = {
someFunction: function (success, error) {
mockMySvcSomeFunctionBehavior(success, error);
> phantomjs-prebuilt@2.1.16 install D:\code\MyProjects\POC\VueWebpackPOC\node_modules\phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Download already available at C:\Users\tiptonsj\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing D:\code\MyProjects\POC\VueWebpackPOC\node_modules\phantomjs-prebuilt\lib\phantom
Copying extracted folder C:\Users\tiptonsj\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip-extract-1528397777270\phantomjs-2.1.1-windows -> D:\code\MyProjects\POC\VueWebpackPOC\node_modules\phantomjs-prebuilt\lib\phantom
Writing location.js file