Skip to content

Instantly share code, notes, and snippets.

@kostajh
Created December 16, 2013 15:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kostajh/7988375 to your computer and use it in GitHub Desktop.
Save kostajh/7988375 to your computer and use it in GitHub Desktop.
var uri = casper.cli.get('uri');
var link = 'http://' + uri;
var alias = casper.cli.get('alias');
var drush = 'http://localhost:8888/' + alias + ' ';
var repo_dir = casper.cli.get('repo');
casper.test.begin('Setup methods for test suite', function suite(test) {
// Begin setUp().
casper.start(drush + 'core-status --format=json', function() {
this.test.assertTextExists('Successful', 'Bootstrapped to Drush Runserver');
// Online Help: Cancel/create test accounts.
this.open(drush + 'user-cancel testOnlineHelpSchoolAdmin --delete-content');
this.open(drush + 'user-cancel testOnlineHelpAdmin --delete-content');
this.open(drush + 'user-create testOnlineHelpSchoolAdmin --password=test');
this.open(drush + 'user-add-role "School Administrator" --name=testOnlineHelpSchoolAdmin');
this.open(drush + 'user-create testOnlineHelpAdmin --password=test');
this.open(drush + 'user-add-role "Administrator" --name=testOnlineHelpAdmin');
// etc etc.
this.test.comment('Done with setUp methods.');
});
// end setUp().
casper.run(function() {
this.test.done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment