Skip to content

Instantly share code, notes, and snippets.

Matt Edelman grawk

Block or report user

Report or block grawk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gradtype.json
[{"ts":16.559,"k":"I"},{"ts":16.65,"k":" "},{"ts":16.778,"k":"s"},{"ts":16.907,"k":"u"},{"ts":17.026,"k":"p"},{"ts":17.178,"k":"p"},{"ts":17.33,"k":"o"},{"ts":17.386000000000003,"k":"s"},{"ts":17.442,"k":"e"},{"ts":17.506,"k":" "},{"ts":17.618,"k":"o"},{"ts":17.698,"k":"n"},{"ts":17.803,"k":"e"},{"ts":17.898,"k":" "},{"ts":17.979000000000003,"k":"m"},{"ts":18.155,"k":"u"},{"ts":18.21,"k":"s"},{"ts":18.266,"k":"t"},{"ts":18.331000000000003,"k":" "},{"ts":18.467,"k":"b"},{"ts":18.595,"k":"e"},{"ts":18.69,"k":" "},{"ts":18.779,"k":"s"},{"ts":18.843,"k":"e"},{"ts":18.914,"k":"r"},{"ts":19.035,"k":"i"},{"ts":19.107000000000003,"k":"o"},{"ts":19.162,"k":"u"},{"ts":19.235000000000003,"k":"s"},{"ts":19.338,"k":" "},{"ts":19.467,"k":"s"},{"ts":19.523,"k":"o"},{"ts":19.603,"k":"m"},{"ts":19.706000000000003,"k":"e"},{"ts":19.826,"k":"t"},{"ts":19.922,"k":"i"},{"ts":20.003,"k":"m"},{"ts":20.051,"k":"e"},{"ts":20.114,"k":"s"},{"ts":20.194,"k":"."},{"ts":21.219,"k":"G"},{"ts":21.419,"k":"o"},{"ts":21.907,"k":"o"},{"ts":22.
@grawk
grawk / nemo-firefox-profile.md
Created Jun 7, 2017
Nemo using firefox profile
View nemo-firefox-profile.md

Using the selenium-webdriver/firefox module to set firefox profile in nemo

Use the "builders" version of the driver configuration:

  "driver": {
    "builders": {
      "forBrowser": ["firefox"],
      "setFirefoxOptions": ["require:./firefoxProfile"]
    }
View nextTick.js
var queue = [];
for (var i = 0; i < 10; i++) {
queue.push(function () {
process.nextTick(function () {
console.log(Date.now());
(queue.length > 0) ? queue.shift()() : null;
});
});
}
queue.shift()();
@grawk
grawk / nemo-setup-util.js
Last active Oct 14, 2016
sample nemo-view/mocha setup routine
View nemo-setup-util.js
'use strict';
var Nemo = require('nemo');
module.exports.nemoSetup = function (before, after, addUserFlag) {
before(function (done) {
this.nemo = Nemo(function (err) {
if (err) {
done(err);
@grawk
grawk / drivextest.js
Created Mar 16, 2015
illustrate waitForElementVisible test
View drivextest.js
describe("@waitForElementVisible@ method", function() {
it("should be visible", function () {
assert.ok(nemo.drivex.waitForElementVisible);
});
it("should return true when an element is visible", function(done) {
nemo.driver.get(nemo.props.targetBaseUrl + '/waits');
nemo.drivex.waitForElementVisible({'locator': 'body', 'type': 'tagName'}, 5000, "couldn't find body tag").then(function(found) {
assert.equal(found, true);
done();
});
@grawk
grawk / lusca-express4-example.js
Created Aug 15, 2014
krakenjs/lusca express4 example app
View lusca-express4-example.js
'use strict';
var express = require('express'),
cookieParser = require('cookie-parser'),
session = require('cookie-session'),
bodyParser = require('body-parser'),
errorHandler = require('errorhandler'),
lusca = require('./index'),
h = ['<html><head><title>views</title></head><body><h1>', '</h1><form method="POST" action="/"><input type="hidden" name="_csrf" value="', '"/><input type="submit" value="Submit"/></form></body></html>'],
@grawk
grawk / kraken-examples-routes.md
Last active Aug 29, 2015
discussion of kraken-examples routes
View kraken-examples-routes.md

is this what you think routes/index.js should look like:

'use strict';

var IndexModel = require('../models/index');
var setLocale = require('./setLocale');

module.exports = function (router) {
    router.get('/', indexRoute);
@grawk
grawk / moq-nemo-preso.md
Last active Aug 29, 2015
Masters Of Quality Nemo Presentation Outline
View moq-nemo-preso.md

MOQ Nemo Preso outline

  1. generate a new kraken-js based express app
  2. start and display the app
  3. generate a nemo test suite for the app
  4. run on different browsers, and on devices (via saucelabs)
  5. install a new plugin using generator
  6. add new functionality to app, then add a new view and spec to test it
View addcard-moq.spec.js
/*global describe:true, it:true, before:true, after:true */
'use strict';
var nemoFactory = require('nemo-mocha-factory'),
plugins = require('../config/nemo-plugins'),
setup = {
"view": ['addcard']
};
describe('Nemo @addcardSuite@', function() {
View kraken-nemo-moq.html
<html>
<head>
<title>Login, add card, add bank account</title>
<style>
.visible {
display:block;
}
.hidden {
display:none;
}
You can’t perform that action at this time.