Intercooler.js Test Suite

This is the test suite for the Intercooler.js library. Simply loading this page in a browser will run all the tests

New tests should follow the existing test templates, using the intercoolerTest() helper and mockjax for mocking out AJAX requests.

Run With data-* style attributes


Test Results

Intercooler.js

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/135.0.0.0 Safari/537.36 Prerender (+https://github.com/prerender/prerender)

Tests completed in 121 milliseconds.
0 assertions of 4 passed, 4 failed.

  1. global failure (1, 0, 1)Rerun1 ms
    1. Uncaught TypeError: $ is not a function@ 0 ms
      Source:
      https://intercoolerjs.org/release/intercooler-1.2.3.js:33
  2. global failure (1, 0, 1)Rerun0 ms
    1. Uncaught ReferenceError: Intercooler is not defined@ 0 ms
      Source:
      https://intercoolerjs.org/release/zepto_unit-tests-1.2.3.html?testId=7ba5ce58&use-data-attr=true:138
  3. IC attributes are set on elementsRerun
    1. Script evaluationRerun
      1. Javascript API TestRerun
        1. Simple UpdateRerun
          1. Dependency update w/ POSTRerun
            1. Dependency update w/ PUTRerun
              1. Dependency update w/ PATCHRerun
                1. Dependency update w/ DELETERerun
                  1. ic-get-from testRerun
                    1. DELETE with removalRerun
                      1. Dependency on updated superpathRerun
                        1. Dependency on updated subpathRerun
                          1. partial path elements do not indicate a dependencyRerun
                            1. query string and hash arguments are stripped for dependency checksRerun
                              1. empty path elements are discarded for isDependentRerun
                                1. Explicit dependency worksRerun
                                  1. Comma separated deps workRerun
                                    1. Prepend works properlyRerun
                                      1. Append works properlyRerun
                                        1. Eval header worksRerun
                                          1. Form submission worksRerun
                                            1. Form submission with submit button worksRerun
                                              1. Form submission works on direct form submissionRerun
                                                1. LeadDyno.refresh() with element worksRerun
                                                  1. LeadDyno.refresh() with path worksRerun
                                                    1. Test indicator as classRerun
                                                      1. Test indicator as an attributeRerun
                                                        1. Test indicator as an attribute on a parentRerun
                                                          1. Target attribute worksRerun
                                                            1. Target attribute works with appendRerun
                                                              1. Target attribute works with prependRerun
                                                                1. ic-limit-children works with prependRerun
                                                                  1. ic-limit-children works with append and targetRerun
                                                                    1. ic-trigger-on worksRerun
                                                                      1. ic-verb worksRerun
                                                                        1. ic-style-src updates styleRerun
                                                                          1. ic-attr-src updates attrRerun
                                                                            1. Log event happens properlyRerun
                                                                              1. IC-Trigger HeaderRerun
                                                                                1. IC-Trigger Header With Single ArgRerun
                                                                                  1. IC-Trigger Header With Array ArgsRerun
                                                                                    1. IC-Trigger with JSON objectsRerun
                                                                                      1. No double-wiring of events after a refreshRerun
                                                                                        1. Children are wired in properlyRerun
                                                                                          1. Scripts are evaluated onceRerun
                                                                                            1. ic-on-beforeSend is invoked (1, 0, 1)Rerun116 ms
                                                                                              1. failed@ 102 ms
                                                                                                Expected:
                                                                                                1
                                                                                                Result:
                                                                                                0
                                                                                                Diff:
                                                                                                1 0 
                                                                                                Source:
                                                                                                    at https://code.jquery.com/qunit/qunit-1.16.0.js:1951:13
                                                                                            2. ic-on-beforeSend is invoked on parentRerun
                                                                                              1. global failure (1, 0, 1)Rerun0 ms
                                                                                                1. Uncaught ReferenceError: Intercooler is not defined@ 0 ms
                                                                                                  Source:
                                                                                                  https://intercoolerjs.org/release/zepto_unit-tests-1.2.3.html?testId=7ba5ce58&use-data-attr=true:1134
                                                                                              2. ic-target with a closest expression worksRerun
                                                                                                1. ic-target with a find expression worksRerun
                                                                                                  1. ic-trigger with a delay clause fires after delayRerun
                                                                                                    1. ic-trigger with a delay does not cause multiple calls to issueRerun
                                                                                                      1. trigger during request on element is caught and deferredRerun
                                                                                                        1. only one deferred trigger is firedRerun
                                                                                                          1. Child trigger worksRerun
                                                                                                            1. Current URL is presentRerun
                                                                                                              1. Basic history support worksRerun
                                                                                                                1. Get from with target worksRerun
                                                                                                                  1. Basic partial response selector works properlyRerun
                                                                                                                    1. Partial response selector works properly with append fromRerun
                                                                                                                      1. Partial response selector works properly with prepend fromRerun
                                                                                                                        1. ic-include works with JSON contentRerun
                                                                                                                          1. Issue #44 complete event should fire on click with external ic-targetRerun
                                                                                                                            1. Issue #44 complete event should fire on click with self-replacing ic-targetRerun
                                                                                                                              1. Test ic-ignore class causes elements within it to be ignoredRerun
                                                                                                                                1. Test remove-afterRerun
                                                                                                                                  1. Test ic-add-classRerun
                                                                                                                                    1. Test ic-remove-classRerun
                                                                                                                                      1. Run initialization sets up pushstateRerun
                                                                                                                                        1. Test replaceOrAddMethodRerun
                                                                                                                                          1. Test ic-actionRerun
                                                                                                                                            1. Test beforeAjaxSend.ic can modify ajax setupRerun
                                                                                                                                              1. If testing w/ data, assert there are data-* attributesRerun
                                                                                                                                                1. Anchors do not navigate if overridden by intercoolerRerun
                                                                                                                                                  1. Anchors do not navigate if overridden by intercooler Rerun
                                                                                                                                                    1. Local vars set testRerun
                                                                                                                                                      1. Local vars include testRerun
                                                                                                                                                        1. Autofocus worksRerun
                                                                                                                                                          1. trigger-from attribute worksRerun
                                                                                                                                                            1. Button value is included in requestRerun
                                                                                                                                                              1. Submit input value is included in requestRerun
                                                                                                                                                                1. No value included for button after loss of focusRerun
                                                                                                                                                                  1. No value included for button after selectRerun
                                                                                                                                                                    1. Regression form submissionRerun
                                                                                                                                                                      1. Button does not submit a value if there is noneRerun
                                                                                                                                                                        1. ic-action-target attribute worksRerun
                                                                                                                                                                          1. Server Sent Event Source WorksRerun
                                                                                                                                                                            1. Server Sent Event Source Works w/ AppendRerun
                                                                                                                                                                              1. Server Sent Event Source Works w/ PrependRerun
                                                                                                                                                                                1. Server Sent Event Source Works As A TriggerRerun
                                                                                                                                                                                  1. Server Sent Events Sources are closed when element is swapped outRerun
                                                                                                                                                                                    1. Server Sent Event trigger handles missing ic-sse-src elementRerun
                                                                                                                                                                                      1. test event source with credentials set to trueRerun
                                                                                                                                                                                        1. test event source with credentials set to falseRerun
                                                                                                                                                                                          1. test event source without credentials explicitly setRerun
                                                                                                                                                                                            1. replace-target anchor regression testRerun
                                                                                                                                                                                              1. Include form values on GET if the form is the source of the requestRerun
                                                                                                                                                                                                1. Fix IDs in swapped content if ic-fix-ids is specifiedRerun
                                                                                                                                                                                                  1. JSON can be properly transformed into HTML Rerun
                                                                                                                                                                                                    1. ic-before-trigger can cancel action Rerun
                                                                                                                                                                                                      1. ic-trigger-on once keyword worksRerun
                                                                                                                                                                                                        1. ic-on-success can cancel swapRerun
                                                                                                                                                                                                          1. ic-use-transition should work when using ic-push-urlRerun
                                                                                                                                                                                                            1. Test global indicator works as well as a local indicatorRerun
                                                                                                                                                                                                              1. Test switch class works on parentRerun
                                                                                                                                                                                                                1. Test switch class works on deep parentRerun
                                                                                                                                                                                                                  1. test ic-enhance works on basic linkRerun
                                                                                                                                                                                                                    1. test ic-enhance does not monkey with external linksRerun
                                                                                                                                                                                                                      1. test ic-enhance does not monkey with local anchor linksRerun
                                                                                                                                                                                                                        1. test ic-enhance works on formRerun
                                                                                                                                                                                                                          1. test multiple events triggerRerun
                                                                                                                                                                                                                            1. getLocalURL works properlyRerun

                                                                                                                                                                                                                              Test HTML



                                                                                                                                                                                                                              Javascript API Test
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              loading...
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              loading...
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              Foo Foo Foo Text
                                                                                                                                                                                                                              Foo
                                                                                                                                                                                                                              0
                                                                                                                                                                                                                              0
                                                                                                                                                                                                                              0
                                                                                                                                                                                                                              0
                                                                                                                                                                                                                              History Test Get From
                                                                                                                                                                                                                              click me! (self targeted)
                                                                                                                                                                                                                              click me! (external target)
                                                                                                                                                                                                                              Bar
                                                                                                                                                                                                                              Before
                                                                                                                                                                                                                              Before Before
                                                                                                                                                                                                                              Local Var Set Local Var Include
                                                                                                                                                                                                                              Autofocus
                                                                                                                                                                                                                                Cancel
                                                                                                                                                                                                                              foo
                                                                                                                                                                                                                              foo
                                                                                                                                                                                                                                      Foo
                                                                                                                                                                                                                                      bar bar bar
                                                                                                                                                                                                                                      bar
                                                                                                                                                                                                                                      bar