Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
fix(test): restore casper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaringe committed Mar 8, 2017
1 parent c656aba commit ca9c384
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ suir.stories.js
styleguide
backstop_data/*
!backstop_data/bitmaps_reference
!backstop_data/casper_scripts
16 changes: 16 additions & 0 deletions backstop_data/casper_scripts/onBefore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = function (casper, scenario, vp) {
// This script runs before your app loads. Edit here to log-in, load cookies or set other states required for your test.
console.log('onBefore.js has run for ' + vp.name + '.');
};

// // EXAMPLE: LOGIN BEFORE RUNNING TESTS
// module.exports = function(casper, scenario, vp) {
// casper.thenOpen(scenario.url, function(){
// if (this.exists('form#user-login-form')) {
// this.fill('form#loginForm',{
// 'username': 'test',
// 'password': 'changeme'
// }, true);
// }
// });
// };
6 changes: 6 additions & 0 deletions backstop_data/casper_scripts/onReady.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function (casper, scenario, vp) {
casper.evaluate(function () {
// Your web-app is now loaded. Edit here to simulate user interacions or other state changes.
});
console.log('onReady.js has run for: ', vp.name);
};

0 comments on commit ca9c384

Please sign in to comment.