<commit_before>import Nightmare from 'nightmare';
require('mocha-generators').install();

// Get rid of a warning.
process.setMaxListeners(0);

// Utils
const innerHTML = (selector) => document.querySelector(selector).innerHTML;
const innerText = (selector) => innerHTML(selector).trim();

describe('Start Page', function() {
  this.timeout(15000);

  const hostname = process.env.CLIENT_ADDR || 'http://localhost';
  const base = hostname + ":3001";

  let nightmare;

  beforeEach(function() {
    nightmare = Nightmare();
  });

  afterEach(function * () {
    yield nightmare.end();
  });

  it("should have a title", function * () {
    const title = yield nightmare.goto(base).title();
    expect(title).to.equal('Mesos UI');
  });
});
<commit_msg>Add e2e test check for #app children (rendered by React)<commit_after>import Nightmare from 'nightmare';
require('mocha-generators').install();

// Get rid of a warning.
process.setMaxListeners(0);

// Utils
const innerHTML = (selector) => document.querySelector(selector).innerHTML;
const innerText = (selector) => innerHTML(selector).trim();

describe('Start Page', function() {
  this.timeout(15000);

  const hostname = process.env.CLIENT_ADDR || 'http://localhost';
  const base = hostname + ":3001";

  let nightmare;

  beforeEach(function() {
    nightmare = Nightmare();
  });

  afterEach(function * () {
    yield nightmare.end();
  });

  it("should have a title", function * () {
    const title = yield nightmare.goto(base).title();
    expect(title).to.equal('Mesos UI');
  });

  it("#app should have children", function * () {
    const hasChildren = yield nightmare.goto(base)
      .evaluate(() => {
        return document.getElementById('app').children.length ? true : false;
      })
    expect(hasChildren).to.be.true;
  });
});

{'fraction_non_alphanumeric': 0.16611295681063123, 'fraction_numerical': 0.011627906976744186, 'mean_word_length': 4.075842696629214, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, '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': '895319', 'n_tokens_mistral': 557, 'n_tokens_neox': 536, 'n_words': 126}