{"size": 935, "ext": "js", "max_stars_repo_path": "app/templates/_command.js", "max_stars_repo_name": "octoblu/generator-octoblu-sentinel", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/templates/_command.js", "max_issues_repo_name": "octoblu/generator-octoblu-sentinel", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/templates/_command.js", "max_forks_repo_name": "octoblu/generator-octoblu-sentinel", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.3333333333, "max_line_length": 103, "alphanum_fraction": 0.7048128342}
#!/usr/bin/env casperjs

var system  = require('system');
var helpers = require('./helpers');
var Casper  = require('casper');
var casper  = helpers.buildCasper(Casper);

var <%= constantPrefix %>_USERNAME = system.env.<%= constantPrefix %>_USERNAME;
var <%= constantPrefix %>_PASSWORD = system.env.<%= constantPrefix %>_PASSWORD;

if(!<%= constantPrefix %>_USERNAME || !<%= constantPrefix %>_PASSWORD)  {
  console.log('Missing required env: <%= constantPrefix %>_USERNAME or <%= constantPrefix %>_PASSWORD')
  this.exit(1)
}

helpers.thenWithErrors(casper, function(){
  return casper.click('.auth__button--social-button');
})

casper.waitForSelector("#login_form")

helpers.thenWithErrors(casper, function(){
  casper.fillLabels('#login_form', {
    'username': <%= constantPrefix %>_USERNAME,
    'password': <%= constantPrefix %>_PASSWORD
  })
  casper.click("#login")
})

helpers.assertOnOctobluDashboard(casper);

casper.run();
