dateAlignment.js 719 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { expectActiveRange } from './ViewDateUtils'
  2. /*
  3. SEE ALSO: next/prev
  4. */
  5. describe('dateAlignment', function() {
  6. pushOptions({
  7. defaultView: 'agenda',
  8. dateAlignment: 'week',
  9. defaultDate: '2017-06-15'
  10. })
  11. describe('when 3 day duration', function() {
  12. pushOptions({
  13. duration: { days: 3 }
  14. })
  15. it('aligns with the week', function() {
  16. initCalendar()
  17. expectActiveRange('2017-06-11', '2017-06-14')
  18. })
  19. })
  20. describe('when 5 day count', function() {
  21. pushOptions({
  22. dayCount: 5,
  23. weekends: false
  24. })
  25. it('aligns with first visible day of the week', function() {
  26. initCalendar()
  27. expectActiveRange('2017-06-12', '2017-06-17')
  28. })
  29. })
  30. })