Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe 'when a page with the file load health check initially loads'
- it 'should have the health check area not visible'
- $('#HealthCheckArea').should.not.be_visible
- end
- it 'should have the green light already loaded'
- $('#HealthCheckArea').children('img').attr('src').should.include 'green_light.png'
- end
- end
- describe 'when checking the health of the currently selected trade date'
- before_each
- //reset to initial state
- $('#HealthCheckArea').children('img').attr('src','../Images/green_light.png')
- .addClass('hidden');
- end
- describe 'and all files have loaded for the given date'
- mock_request().and_return('{ tradeDateIsValid : true }', 'application/json')
- $(document).fileLoadHealthCheck({
- datePicker: '#ExportDate',
- notificationArea: '#HealthCheckArea'
- });
- it 'should display the green light'
- $('#HealthCheckArea').children('img').attr('src').should.include 'green_light.png'
- end
- it 'should make the health check area visible'
- $('#HealthCheckArea').should.be_visible
- end
- end
- describe 'and all files have not loaded for the given date'
- mock_request().and_return('{ tradeDateIsValid : false }', 'application/json')
- $(document).fileLoadHealthCheck({
- datePicker: '#ExportDate',
- notificationArea: '#HealthCheckArea'
- });
- it 'should display the red light'
- $('#HealthCheckArea').children('img').attr('src').should.include 'red_light.png'
- end
- it 'should make the health check area visible'
- $('#HealthCheckArea').should.be_visible
- end
- it 'should warn the user that the given date is incomplete'
- $('#jqibox')[0].should.not.be_null
- $('#jqibox')[0].should.be_visible
- end
- end
- end
Add Comment
Please, Sign In to add comment