<commit_before>var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
/*
   Chai as Promised is not compatible with PhantomJS!
   TODO polyfill for Function.prototype.bind for PhantomJS
 */
chai.use(chaiAsPromised);
var expect = chai.expect;
var port = process.env.port || 3000;

describe('home page acceptance test', function() {

  it('has title of React Starter', function(done) {
    var URL = 'http://localhost:' + port;
    var browser = this.browser;
    browser.get(URL)
      .then(function() {
      return browser.title();
    }).then(function(val){
      expect(val).to.equal('React Starter');
    }).then(done, done);
  });
});<commit_msg>find element by class name example<commit_after>/*
    This acceptance test is triggered by, and based on,
     gulp-selenium-mocha, which uses the wd code here:
    https://github.com/admc/wd
    Selenium / wd API here:
    https://github.com/admc/wd/blob/master/doc/api.md
 */
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
/*
   Chai as Promised is not compatible with PhantomJS!
   TODO polyfill for Function.prototype.bind for PhantomJS
 */
chai.use(chaiAsPromised);
var expect = chai.expect;
var port = process.env.port || 3000;
var URL = 'http://localhost:' + port;

describe('home page acceptance test', function() {

  it('has title of React Starter', function(done) {
    var browser = this.browser;
    browser.get(URL)
      .then(function() {
      return browser.title();
    }).then(function(val){
      expect(val).to.equal('React Starter');
    }).then(done, done);
  });

  it('has h1.hello with React Starter', function(done) {
    var browser = this.browser;
    browser.get(URL)
      .then(function() {
        console.log('here');
        return browser.elementByClassName('hello');
      }).then(function(val) {
        return val.text();
      }).then(function(val) {
        expect(val).to.equal('Hello React!');
      }).then(done, done);
  });
});
{'fraction_non_alphanumeric': 0.15446744068652196, 'fraction_numerical': 0.004543160020191822, 'mean_word_length': 3.3275109170305677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1856117', 'n_tokens_mistral': 645, 'n_tokens_neox': 629, 'n_words': 160}