Skip to content

Commit

Permalink
Add a missing file.
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Feb 17, 2016
1 parent c6cab56 commit 7ed8761
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions casper/createRowIfNotExists.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';
module.exports = function(casper) {
var logger = require('./logger')(casper);
return function(state) {
// If we don't know the row, we must create it.
if (!state.hasRow) {
logger('Trying to insert a new row');
casper.evaluate(function() {
$('th button').click();
});
}
else {
logger('Have row in current screen');
}
};
};

0 comments on commit 7ed8761

Please sign in to comment.