Skip to content

Instantly share code, notes, and snippets.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run-script', 'watch' ]
2 info using npm@1.4.9
3 info using node@v0.10.28
4 verbose node symlink /usr/bin/node
5 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
6 info prewatch MojoTech@
7 info watch MojoTech@
8 verbose unsafe-perm in lifecycle true
9 info MojoTech@ Failed to exec watch script
window.site = window.site || {};
;(function(){
var lineofCode = site.NewLine('Super Secret Stuff');
var feature = new site.Views.FeatureView({
model: lineofCode
});
feature.render();
})()
fill: () ->
if( arguments.lenth > 1 )
el = @find(argument[0])
el.clear().then ->
el.sendKeys(value)
else
@find().then ->
el.sendKeys(arguments[0])
getSpecifications = (path, options) ->
obj = {}
fs.readFile(path,
'utf8',
(err, data)->
throw err if(err)
obj = JSON.parse(data)
)
@When /^I click on the "([^"]*)" child of "([^"]*)" I should read "([^"]*)"$/, (index, rootSelector, expected) ->
new @widgets.List({
root: rootSelector
})
.at(index - 1).then (item) ->
item.click()
new @Widget({
root: '#onSubmit'
})
.read().should.eventually.eql(expected)
module.exports = ->
convertToExecOptions: (objArry, cb) ->
execOptions =
_.map objArry, (val) ->
k = _.keys(val)[0]
"#{k}=#{val[k]}"
cb(execOptions);
generateOptions: (minimist, config, cb) ->
module.exports = function(){
this.Given(/^I visit TODOMVC$/,function(){
this.driver.get('http://todomvc.com/architecture-examples/backbone/')
});
this.When(/^I enter "([^"]*)"$/, function(value){
new this.Widget({
root: "#new-todo"
}).sendKeys(value,Driver.Key.ENTER);
});