Comparing version 1.4.6 to 1.4.7
{ | ||
"name": "lc2", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"description": "browser automation library", | ||
@@ -12,3 +12,3 @@ "main": "src/index.js", | ||
"engines": { | ||
"node": ">=4.x" | ||
"node": ">=4.x" | ||
}, | ||
@@ -51,4 +51,5 @@ "repository": { | ||
"oc-trigger": "^1.1.1", | ||
"randexp": "^0.4.2", | ||
"sizzle": "^2.3.0" | ||
} | ||
} |
@@ -8,3 +8,8 @@ var $ = require('lc2-selector')(require('sizzle')); | ||
var CALL = require('../instructionType').CALL; | ||
var randexp = require('randexp').randexp; | ||
function randString(regexp) { | ||
return randexp(regexp); | ||
} | ||
function countDOM(cssPath) { | ||
@@ -56,2 +61,3 @@ return $(cssPath, getDocument()).length; | ||
var DOM = $(cssPath, getDocument())[0]; | ||
console.log(DOM) | ||
if (!DOM) { | ||
@@ -61,3 +67,3 @@ return false; | ||
return !(DOM.offsetHeight === 0 && DOM.offsetWidth === 0); | ||
return !(DOM.offsetHeight * DOM.offsetWidth === 0); | ||
} | ||
@@ -162,2 +168,4 @@ | ||
this.$$log.fillData(this.$$currentLoop + 1); | ||
if ((this.$$currentLoop += 1) >= this.$$getConfig('times')) { | ||
@@ -177,3 +185,4 @@ this.$$exitCase(); | ||
return expFn(this.$$vars, getStyle, getAttr, | ||
countDOM, getInnerHTML, isVisible, match); | ||
countDOM, getInnerHTML, isVisible, | ||
match, randString); | ||
} | ||
@@ -180,0 +189,0 @@ return expFn; |
@@ -8,3 +8,3 @@ var $CP = require('./case').$CP; | ||
$CP.exportLog = function (type) { | ||
return this.$$log['export2' + type](); | ||
return this.$$log.export2json(); | ||
}; | ||
@@ -11,0 +11,0 @@ |
@@ -7,3 +7,3 @@ var instructionType = require('../instructionType'); | ||
var fn = settings.fn; | ||
var Collector = require('../../lib/collector'); | ||
var Collector = require('./collector'); | ||
var IF = require('./instruction'); | ||
@@ -10,0 +10,0 @@ var parse = require('../parser/index').parse; |
@@ -9,3 +9,2 @@ var parser = require('./parser/index'); | ||
require('./class/case_P'); | ||
require('../lib/ranexp'); | ||
require('./instructions'); | ||
@@ -12,0 +11,0 @@ |
@@ -44,3 +44,3 @@ // walk a javascript style tree and transform it into a function | ||
return '(/' + val.pattern + '/' + val.flags + ').gen()'; | ||
return 'gen(/' + val.pattern + '/' + val.flags + ')'; | ||
} | ||
@@ -129,3 +129,3 @@ // regular regular expression is fine... | ||
return new Function('$,o,d,c,t,v,m', 'return ' + string + ';'); | ||
return new Function('$,o,d,c,t,v,m,gen', 'return ' + string + ';'); | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325435
4
28
7694
+ Addedrandexp@^0.4.2
+ Addeddrange@1.1.1(transitive)
+ Addedrandexp@0.4.9(transitive)
+ Addedret@0.2.2(transitive)