- Large Scale Applications…
- Event Driven vs. jQuery and Plugins
- Get NPM and Dev Environment Setup
- React in a few lines of jQuery
- jQuery and DOM events
- Observer Pattern
- Build a simple Instagram API
var client = webdriverjs.remote({ | |
desiredCapabilities: { | |
browserName: browserName | |
}, | |
logLevel: 'silent' | |
}); | |
// Extensions to Webdriver | |
client.addCommand('loginAndPreview', function(callback) { |
var require = patchRequire(require); | |
var loginAndPreview = function(baseUrl, bundleLocation, test){ | |
casper.start('http://preview.mobify.com/', function suite() { | |
// Add a title comment so that you know what's happening and when | |
casper.test.comment('Lululemon - 2013 Refresh'); | |
// Log out what we are doing |
describe('lululemon', function(){ | |
this.timeout(99999999); | |
before(function(){ | |
client.init(); | |
}); | |
it('should login', function(done){ | |
client |
casper.test.begin('Home Page', function(test) { | |
loginAndPreview(baseUrl, bundleLocation, test); | |
casper.then(function() { | |
// Home body Class | |
test.assertExists('.x-home', 'Home body class'); | |
// Main content | |
test.assertExists('.x-main', 'Main content'); |
Feature: Google Demo | |
Scenario: Google home page | |
When I open http://google.com | |
and I should see #viewport |
type UUID = string; | |
interface BaseNode { | |
uuid: UUID; | |
path: string; // parent-uuid/uuid | |
type: "node" | "section" | "group" | "text"; | |
allowedChildren?: ContentNodes; // Optional because the actual instances of Nodes do not need this | |
children?: UUID[]; // not all Nodes have children | |
} |
import faker from 'faker'; | |
import { makes } from '../../../../test/makes'; | |
import { Listing } from '../../src/types'; | |
faker.seed(42); | |
export const createFakeListing = (attr?: any): Listing => { | |
const [make, model] = makes[faker.random.number(makes.length)]; |
/** | |
* Fetches a model from the State first, then the API. | |
* returns a tuple with the data from the API and an updater function that | |
* updates the server | |
*/ | |
export const useLens= ( | |
uuid: string | |
): [Response, SetResponse] => { | |
// This could be `useSelector` and `useDispatch` if we are using Redux | |
const [initialData, setData] = useRecoilState( |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |