basic-view.js 1.1 KB

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