basic-view.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. describe('basic view rendering', function() {
  2. beforeEach(function() {
  3. affix('#cal');
  4. });
  5. describe('when isRTL is false', function() {
  6. beforeEach(function() {
  7. $('#cal').fullCalendar({
  8. defaultView: 'month',
  9. isRTL: false
  10. });
  11. });
  12. it('should have have days ordered sun to sat', function() {
  13. var fc = $('#cal').find('.fc-day-header');
  14. expect(fc[0]).toHaveClass('fc-sun');
  15. expect(fc[1]).toHaveClass('fc-mon');
  16. expect(fc[2]).toHaveClass('fc-tue');
  17. expect(fc[3]).toHaveClass('fc-wed');
  18. expect(fc[4]).toHaveClass('fc-thu');
  19. expect(fc[5]).toHaveClass('fc-fri');
  20. expect(fc[6]).toHaveClass('fc-sat');
  21. });
  22. });
  23. describe('when isRTL is true', function() {
  24. beforeEach(function() {
  25. $('#cal').fullCalendar({
  26. defaultView: 'month',
  27. isRTL: true
  28. });
  29. });
  30. it('should have have days ordered sat to sun', function() {
  31. var fc = $('#cal').find('.fc-day-header');
  32. expect(fc[0]).toHaveClass('fc-sat');
  33. expect(fc[1]).toHaveClass('fc-fri');
  34. expect(fc[2]).toHaveClass('fc-thu');
  35. expect(fc[3]).toHaveClass('fc-wed');
  36. expect(fc[4]).toHaveClass('fc-tue');
  37. expect(fc[5]).toHaveClass('fc-mon');
  38. expect(fc[6]).toHaveClass('fc-sun');
  39. });
  40. });
  41. });