<commit_before>//casper file
//listener should:
//navigate to localhost:3000
//there should be a list of icons and a navbar
//the listener should click on one icon
//then go to another page, localhost:3000/stream/...

//NB: we'll need to edit out the hardcoded references to localhost
//probably with hardcoded referencest to our deployment server
//since that's part of what we're testing

casper.test.begin("Testing Radio from listener's perspective", 3, function suite(test) {
  casper.start('http://localhost:3000', function() {
    test.assertTitle("Silent Disco", 'application title is the one expected');
    test.assertEvalEquals(function() {
      return __utils__.findOne('h1').textContent;
    }, 'Listen', 'user lands at Listen page');
  });

  casper.then(function() {
    this.click('.penguin button');
  });

  casper.then(function() {
    this.wait(1000, function() {
      test.assertEvalEquals(function() {
        var navbarPossibs = [];
        var divs = Array.prototype.slice.call(document.querySelectorAll('div'));
        for (var i = 0; i < divs.length; i++) {
          //so at least I can get the element by reactId
          // if (divs[i].getAttribute('data-reactid') === '.0.0.0.1') {
          if (divs[i].style.left === '0px' && divs[i].style.width === '256px') {
            navbarPossibs.push(divs[i]);
          }
        }
        return navbarPossibs.length;
      }, 1, 'navbar appears on left side');
    });<commit_msg>changed touchTap event to Click event in Navbar component for testing<commit_after>//casper file
//listener should:
//navigate to localhost:3000
//there should be a list of icons and a navbar
//the listener should click on one icon
//then go to another page, localhost:3000/stream/...

//NB: we'll need to edit out the hardcoded references to localhost
//probably with hardcoded referencest to our deployment server
//since that's part of what we're testing

casper.test.begin("Testing Radio from listener's perspective", 3, function suite(test) {
  casper.start('http://localhost:3000', function() {
    test.assertTitle("Silent Disco", 'application title is the one expected');
    test.assertEvalEquals(function() {
      return __utils__.findOne('h1').textContent;
    }, 'Listen', 'user lands at Listen page');
  });


  casper.then(function() {
    this.wait(1000, function() {
      test.assertEvalEquals(function() {
        var navbarPossibs = [];
        var divs = Array.prototype.slice.call(document.querySelectorAll('div'));
        for (var i = 0; i < divs.length; i++) {
          if (divs[i].style.left === '0px' && divs[i].style.width === '256px') {
            navbarPossibs.push(divs[i]);
          }
        }
        return navbarPossibs.length;
    });
{'fraction_non_alphanumeric': 0.1397731430662276, 'fraction_numerical': 0.018660812294182216, 'mean_word_length': 3.1424242424242426, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '331936', 'n_tokens_mistral': 868, 'n_tokens_neox': 800, 'n_words': 246}