This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browser.wait(function() { | |
var deferred = protractor.promise.defer(); | |
element(by.id('some-element')).isPresent() | |
.then(function (isPresent) { | |
deferred.fulfill(!isPresent); | |
}); | |
return deferred.promise; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var connect = require('gulp-connect'); | |
var cors = function (req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Allow-Headers', '*'); | |
next(); | |
}; | |
gulp.task('server:test', function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define gulp before we start | |
var gulp = require('gulp'); | |
// Define Sass and the autoprefixer | |
var sass = require('gulp-sass'); | |
var prefix = require('gulp-autoprefixer'); | |
// This is an object which defines paths for the styles. | |
// Can add paths for javascript or images for example | |
// The folder, files to look for and destination are all required for sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (ng) { | |
"use strict"; | |
function MyController($scope) { | |
// Use Controller As syntax | |
// https://github.com/johnpapa/angular-styleguide#style-y032 | |
var vm = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ------------------ The Life-Cycle of a Composite Component ------------------ | |
* | |
* - constructor: Initialization of state. The instance is now retained. | |
* - componentWillMount | |
* - render | |
* - [children's constructors] | |
* - [children's componentWillMount and render] | |
* - [children's componentDidMount] | |
* - componentDidMount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function traverse(x, level) { | |
if (isArray(x)) { | |
traverseArray(x, level); | |
} else if ((typeof x === 'object') && (x !== null)) { | |
traverseObject(x, level); | |
} else { | |
console.log(level + x); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @TODO figure out why web security isn't working | |
*/ | |
open = function (url, options) { | |
var uri = 'http://localhost:' + CONFIG.PORT + '/tms.html', | |
tempDir = 'C:/temp-chrome-eng'; | |
var args = [ | |
'--user-data-dir=' + tempDir, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Prompt Task | |
* WIP/ not integrated | |
*/ | |
gulp.task('prompt', function () { | |
return gulp.src('') | |
.pipe( | |
$.prompt.prompt( | |
[{ | |
type: 'input', |