Guest User

Untitled

a guest
May 24th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. describe 'when a page with the file load health check initially loads'
  2.  
  3. it 'should have the health check area not visible'
  4. $('#HealthCheckArea').should.not.be_visible
  5. end
  6.  
  7. it 'should have the green light already loaded'
  8. $('#HealthCheckArea').children('img').attr('src').should.include 'green_light.png'
  9. end
  10. end
  11.  
  12.  
  13. describe 'when checking the health of the currently selected trade date'
  14.  
  15. before_each
  16. //reset to initial state
  17. $('#HealthCheckArea').children('img').attr('src','../Images/green_light.png')
  18. .addClass('hidden');
  19. end
  20.  
  21. describe 'and all files have loaded for the given date'
  22. mock_request().and_return('{ tradeDateIsValid : true }', 'application/json')
  23.  
  24. $(document).fileLoadHealthCheck({
  25. datePicker: '#ExportDate',
  26. notificationArea: '#HealthCheckArea'
  27. });
  28.  
  29. it 'should display the green light'
  30. $('#HealthCheckArea').children('img').attr('src').should.include 'green_light.png'
  31. end
  32.  
  33. it 'should make the health check area visible'
  34. $('#HealthCheckArea').should.be_visible
  35. end
  36. end
  37.  
  38. describe 'and all files have not loaded for the given date'
  39. mock_request().and_return('{ tradeDateIsValid : false }', 'application/json')
  40.  
  41. $(document).fileLoadHealthCheck({
  42. datePicker: '#ExportDate',
  43. notificationArea: '#HealthCheckArea'
  44. });
  45.  
  46. it 'should display the red light'
  47. $('#HealthCheckArea').children('img').attr('src').should.include 'red_light.png'
  48. end
  49.  
  50. it 'should make the health check area visible'
  51. $('#HealthCheckArea').should.be_visible
  52. end
  53.  
  54. it 'should warn the user that the given date is incomplete'
  55. $('#jqibox')[0].should.not.be_null
  56. $('#jqibox')[0].should.be_visible
  57. end
  58.  
  59. end
  60. end
Add Comment
Please, Sign In to add comment