Skip to content

Commit

Permalink
Merge pull request HuddleEng#155 from spinlock99/master
Browse files Browse the repository at this point in the history
Remove integrated wait to enable active state capture.
  • Loading branch information
James Cryer committed Apr 27, 2016
2 parents 4593c06 + a78e3a2 commit d84d5a6
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions phantomcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,22 +663,17 @@ function _onComplete( tests, noOfFails, noOfErrors ) {
}

function waitAndHideToCapture( target, fileName, hideSelector, timeToWait ) {
var srcPath = _fileNameGetter( _src, fileName );
var resultPath = srcPath.replace( _src, _results );

casper.wait( timeToWait || 250, function () {
if ( hideSelector || _hideElements ) {
casper.evaluate( setVisibilityToHidden, {
s1: _hideElements,
s2: hideSelector
} );
}

var srcPath = _fileNameGetter( _src, fileName );
var resultPath = srcPath.replace( _src, _results );

if ( hideSelector || _hideElements ) {
casper.evaluate( setVisibilityToHidden, {
s1: _hideElements,
s2: hideSelector
} );
}

capture( srcPath, resultPath, target );

} ); // give a bit of time for all the images appear
capture( srcPath, resultPath, target );
}

function setVisibilityToHidden( s1, s2 ) {
Expand Down

0 comments on commit d84d5a6

Please sign in to comment.