Week 5, day 7

This day has not gone according to plan. I expected to be done with the backend to support the frontend but I've had major issues getting the right information to display at the right time.
It has definitely been a solid learning experience in getting Jquery to work and how to test properly in Jasmine. I think I spent about half the day trying to get Jasmine to properly test my front-end. It turns out it's becaue you have to load SpecRunner.html from localhost and not the file request.

My buttons on the index.html:

<button id="btn0" type="button" class="btn btn-default" title="No pins knocked down" style="display: inline;">0</button>

etc... down to id="btn10"

And how I test for their presence in Jasmine-Jquery:

it('has buttons to enter pins scored', function(){
  for (var i = 0; i <= 10; i ++){
    expect('#btn' + i).toContain(i);
  };
});

I think I've broken and fixed code more times on this project than any other and it's annoying and enlightening me in equal quantities!

Tests that I'm passing so far:

Bowling scoresheet

  rejects
    an illegal score

  knows the cumulative score for
    two non-spare/non-strike rolls
    a strike and a spare
    an unremarkable game
    a perfect game
    a gutter game
    an example game

  knows the running score tally for
    two non-spare/non-strike rolls
    a strike and a spare
    a game of all fours
    a perfect game
    a gutter game
    an example game
Interface
  has welcome message
  has buttons to enter pins scored
Written on April 19, 2015