upjs-rails 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/dist/up.js +138 -81
- data/dist/up.min.js +2 -2
- data/lib/assets/javascripts/up/boot.js.coffee +3 -0
- data/lib/assets/javascripts/up/browser.js.coffee +42 -26
- data/lib/assets/javascripts/up/flow.js.coffee +6 -4
- data/lib/assets/javascripts/up/history.js.coffee +1 -1
- data/lib/assets/javascripts/up/modal.js.coffee +4 -4
- data/lib/assets/javascripts/up/motion.js.coffee +6 -4
- data/lib/assets/javascripts/up/proxy.js.coffee +2 -1
- data/lib/assets/javascripts/up/util.js.coffee +61 -32
- data/lib/assets/javascripts/up.js.coffee +1 -10
- data/lib/upjs/rails/version.rb +1 -1
- data/spec_app/config/environments/development.rb +1 -1
- data/spec_app/spec/javascripts/helpers/reset_path.js.coffee +3 -2
- data/spec_app/spec/javascripts/up/flow_spec.js.coffee +1 -1
- data/spec_app/spec/javascripts/up/history_spec.js.coffee +53 -47
- data/spec_app/spec/javascripts/up/link_spec.js.coffee +1 -1
- data/spec_app/spec/javascripts/up/motion_spec.js.coffee +4 -4
- data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +18 -9
- data/spec_app/vendor/assets/bower_components/jasmine/.bower.json +43 -7
- data/spec_app/vendor/assets/bower_components/jasmine/CONTRIBUTING.md +26 -17
- data/spec_app/vendor/assets/bower_components/jasmine/README.md +27 -18
- data/spec_app/vendor/assets/bower_components/jasmine/RELEASE.md +15 -5
- data/spec_app/vendor/assets/bower_components/jasmine/bower.json +41 -0
- data/spec_app/vendor/assets/bower_components/jasmine/lib/console/console.js +27 -3
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/boot.js +10 -9
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/{src → lib/jasmine_examples}/Player.js +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/{src → lib/jasmine_examples}/Song.js +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/jasmine-html.js +76 -20
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/jasmine.css +15 -18
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/jasmine.js +1399 -694
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/json2.js +73 -62
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/node_boot.js +1 -1
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core.js +29 -31
- data/spec_app/vendor/assets/bower_components/jasmine/package.json +18 -7
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/.bower.json +11 -13
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/MIT.LICENSE +1 -1
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/README.markdown +198 -125
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/bower.json +9 -10
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/lib/mock-ajax.js +250 -59
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/package.json +9 -4
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/2.0.2.md +50 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/2.99.md +14 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.0.md +28 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.1.0.md +24 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.1.1.md +23 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.2.0.md +20 -0
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/.bower.json +4 -4
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/bower.json +1 -1
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/dist/jasmine-fixture.js +4 -4
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/dist/jasmine-fixture.min.js +2 -2
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/.bower.json +4 -4
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/Gruntfile.js +17 -1
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/{MIT.LICENSE → LICENSE} +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/README.md +14 -9
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/bower.json +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/lib/jasmine-jquery.js +35 -10
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/package.json +33 -24
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/spec/fixtures/fixture_with_checkbox_with_checked.html +6 -0
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/spec/suites/jasmine-jquery-spec.js +61 -1
- data/spec_app/vendor/assets/bower_components/jquery/.bower.json +5 -4
- data/spec_app/vendor/assets/bower_components/jquery/bower.json +2 -1
- data/spec_app/vendor/assets/bower_components/jquery/dist/jquery.js +9 -4
- data/spec_app/vendor/assets/bower_components/jquery/dist/jquery.min.js +4 -4
- data/spec_app/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -1
- data/spec_app/vendor/assets/bower_components/jquery/src/core.js +6 -1
- metadata +14 -175
- data/spec_app/vendor/assets/bower_components/jasmine/.gitignore +0 -24
- data/spec_app/vendor/assets/bower_components/jasmine/.gitmodules +0 -3
- data/spec_app/vendor/assets/bower_components/jasmine/.jshintrc +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/.npmignore +0 -21
- data/spec_app/vendor/assets/bower_components/jasmine/.rspec +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine/.travis.yml +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine/Gemfile +0 -12
- data/spec_app/vendor/assets/bower_components/jasmine/Gruntfile.js +0 -53
- data/spec_app/vendor/assets/bower_components/jasmine/Rakefile +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.0.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.1.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.2.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.3.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.3.1.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.1.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.2.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.3.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/compass.js +0 -10
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/compress.js +0 -66
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/concat.js +0 -61
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/jshint.js +0 -11
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/tasks/build_standalone.js +0 -31
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/tasks/version.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/templates/SpecRunner.html.jst +0 -26
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/templates/licenseBanner.js.jst +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/templates/version.rb.jst +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/images/__init__.py +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/jasmine-core.gemspec +0 -23
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/__init__.py +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/boot/boot.js +0 -120
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/boot/node_boot.js +0 -19
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/core.py +0 -60
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/spec/PlayerSpec.js +0 -60
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/spec/SpecHelper.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/spec/PlayerSpec.js +0 -58
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/spec/SpecHelper.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/src/Player.js +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/src/Song.js +0 -7
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/version.rb +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core.rb +0 -53
- data/spec_app/vendor/assets/bower_components/jasmine/release_notes/2.0.1.md +0 -70
- data/spec_app/vendor/assets/bower_components/jasmine/release_notes/2.0.2.md +0 -25
- data/spec_app/vendor/assets/bower_components/jasmine/release_notes/20.md +0 -179
- data/spec_app/vendor/assets/bower_components/jasmine/setup.py +0 -47
- data/spec_app/vendor/assets/bower_components/jasmine/spec/console/ConsoleReporterSpec.js +0 -239
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js +0 -46
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/CallTrackerSpec.js +0 -105
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ClockSpec.js +0 -445
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/DelayedFunctionSchedulerSpec.js +0 -246
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/EnvSpec.js +0 -85
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExceptionFormatterSpec.js +0 -63
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExceptionsSpec.js +0 -68
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExpectationResultSpec.js +0 -61
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExpectationSpec.js +0 -427
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/JsApiReporterSpec.js +0 -214
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/MockDateSpec.js +0 -199
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ObjectContainingSpec.js +0 -70
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/PrettyPrintSpec.js +0 -156
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/QueueRunnerSpec.js +0 -271
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ReportDispatcherSpec.js +0 -40
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SpecSpec.js +0 -260
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SpySpec.js +0 -67
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SpyStrategySpec.js +0 -111
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SuiteSpec.js +0 -216
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/TimerSpec.js +0 -31
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js +0 -28
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/integration/CustomMatchersSpec.js +0 -149
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/integration/EnvSpec.js +0 -506
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/integration/SpecRunningSpec.js +0 -306
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/matchersUtilSpec.js +0 -239
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeCloseToSpec.js +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeDefinedSpec.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeFalsySpec.js +0 -38
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeGreaterThanSpec.js +0 -20
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeLessThanSpec.js +0 -20
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeNaNSpec.js +0 -37
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeNullSpec.js +0 -17
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeSpec.js +0 -17
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeTruthySpec.js +0 -38
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeUndefinedSpec.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js +0 -26
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js +0 -28
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toHaveBeenCalledSpec.js +0 -47
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toHaveBeenCalledWithSpec.js +0 -66
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toMatchSpec.js +0 -34
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toThrowErrorSpec.js +0 -280
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toThrowSpec.js +0 -99
- data/spec_app/vendor/assets/bower_components/jasmine/spec/helpers/BrowserFlags.js +0 -23
- data/spec_app/vendor/assets/bower_components/jasmine/spec/helpers/defineJasmineUnderTest.js +0 -7
- data/spec_app/vendor/assets/bower_components/jasmine/spec/helpers/nodeDefineJasmineUnderTest.js +0 -33
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/HtmlReporterSpec.js +0 -616
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/HtmlSpecFilterSpec.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/MatchersHtmlSpec.js +0 -37
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/PrettyPrintHtmlSpec.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/QueryStringSpec.js +0 -43
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/ResultsNodeSpec.js +0 -62
- data/spec_app/vendor/assets/bower_components/jasmine/spec/javascripts/support/jasmine_selenium_runner.yml +0 -16
- data/spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js +0 -36
- data/spec_app/vendor/assets/bower_components/jasmine/spec/performance/performance_test.js +0 -10
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine-performance.json +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine-performance.yml +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine.json +0 -10
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine.yml +0 -25
- data/spec_app/vendor/assets/bower_components/jasmine/src/console/ConsoleReporter.js +0 -131
- data/spec_app/vendor/assets/bower_components/jasmine/src/console/requireConsole.js +0 -12
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Any.js +0 -36
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/CallTracker.js +0 -50
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Clock.js +0 -113
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/DelayedFunctionScheduler.js +0 -145
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Env.js +0 -341
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ExceptionFormatter.js +0 -29
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Expectation.js +0 -107
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ExpectationResult.js +0 -45
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/JsApiReporter.js +0 -73
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/MockDate.js +0 -81
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ObjectContaining.js +0 -34
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/PrettyPrinter.js +0 -137
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/QueueRunner.js +0 -92
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ReportDispatcher.js +0 -35
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Spec.js +0 -126
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/SpyStrategy.js +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Suite.js +0 -92
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Timer.js +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/base.js +0 -102
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/matchersUtil.js +0 -181
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/requireMatchers.js +0 -29
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBe.js +0 -13
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeCloseTo.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeDefined.js +0 -13
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeFalsy.js +0 -13
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeGreaterThan.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeLessThan.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeNaN.js +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeNull.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeTruthy.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeUndefined.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toContain.js +0 -16
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toEqual.js +0 -20
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js +0 -28
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalledWith.js +0 -33
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toMatch.js +0 -16
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toThrow.js +0 -46
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toThrowError.js +0 -156
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/requireCore.js +0 -39
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/requireInterface.js +0 -59
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/util.js +0 -44
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/HtmlReporter.js +0 -280
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/HtmlSpecFilter.js +0 -12
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/QueryString.js +0 -47
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/ResultsNode.js +0 -19
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/_HTMLReporter.scss +0 -355
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/jasmine.scss +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/requireHtml.js +0 -6
- data/spec_app/vendor/assets/bower_components/jasmine/src/templates/example_project_jasmine_tags.html.erb +0 -3
- data/spec_app/vendor/assets/bower_components/jasmine/src/templates/version.js.erb +0 -7
- data/spec_app/vendor/assets/bower_components/jasmine/src/templates/version.rb.erb +0 -6
- data/spec_app/vendor/assets/bower_components/jasmine/src/version.js +0 -3
- data/spec_app/vendor/assets/bower_components/jasmine/travis-core-script.sh +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/travis-docs-script.sh +0 -5
- data/spec_app/vendor/assets/bower_components/jasmine/travis-node-script.sh +0 -6
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/Gruntfile.js +0 -63
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/boot.js +0 -11
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/fakeRequest.js +0 -262
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/mockAjax.js +0 -45
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/paramParser.js +0 -56
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/requestStub.js +0 -42
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/requestTracker.js +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/requireAjax.js +0 -44
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/stubTracker.js +0 -24
@@ -1,616 +0,0 @@
|
|
1
|
-
describe("New HtmlReporter", function() {
|
2
|
-
// TODO: Figure out why this isn't rendering...
|
3
|
-
it("builds the initial DOM elements, including the title banner", function() {
|
4
|
-
var env = new j$.Env(),
|
5
|
-
container = document.createElement("div"),
|
6
|
-
getContainer = function() { return container; },
|
7
|
-
reporter = new j$.HtmlReporter({
|
8
|
-
env: env,
|
9
|
-
getContainer: getContainer,
|
10
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
11
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
12
|
-
});
|
13
|
-
reporter.initialize();
|
14
|
-
|
15
|
-
// Main top-level elements
|
16
|
-
expect(container.querySelector("div.jasmine_html-reporter")).toBeTruthy();
|
17
|
-
expect(container.querySelector("div.banner")).toBeTruthy();
|
18
|
-
expect(container.querySelector("div.alert")).toBeTruthy();
|
19
|
-
expect(container.querySelector("div.results")).toBeTruthy();
|
20
|
-
|
21
|
-
expect(container.querySelector("ul.symbol-summary")).toBeTruthy();
|
22
|
-
|
23
|
-
// title banner
|
24
|
-
var banner = container.querySelector(".banner");
|
25
|
-
|
26
|
-
var title = banner.querySelector("a.title");
|
27
|
-
expect(title.getAttribute('href')).toEqual('http://jasmine.github.io/');
|
28
|
-
expect(title.getAttribute('target')).toEqual('_blank');
|
29
|
-
|
30
|
-
var version = banner.querySelector(".version"),
|
31
|
-
versionText = 'textContent' in version ? version.textContent : version.innerText;
|
32
|
-
expect(versionText).toEqual(j$.version);
|
33
|
-
});
|
34
|
-
|
35
|
-
it("builds a single reporter even if initialized multiple times", function() {
|
36
|
-
var env = new j$.Env(),
|
37
|
-
container = document.createElement("div"),
|
38
|
-
getContainer = function() { return container; },
|
39
|
-
reporter = new j$.HtmlReporter({
|
40
|
-
env: env,
|
41
|
-
getContainer: getContainer,
|
42
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
43
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
44
|
-
});
|
45
|
-
reporter.initialize();
|
46
|
-
reporter.initialize();
|
47
|
-
reporter.initialize();
|
48
|
-
|
49
|
-
expect(container.querySelectorAll("div.jasmine_html-reporter").length).toEqual(1);
|
50
|
-
});
|
51
|
-
|
52
|
-
it("starts the timer when jasmine begins", function() {
|
53
|
-
var env = new jasmine.Env(),
|
54
|
-
startTimerSpy = jasmine.createSpy("start-timer-spy"),
|
55
|
-
reporter = new j$.HtmlReporter({
|
56
|
-
env: env,
|
57
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
58
|
-
timer: { start: startTimerSpy }
|
59
|
-
});
|
60
|
-
|
61
|
-
reporter.jasmineStarted({});
|
62
|
-
|
63
|
-
expect(startTimerSpy).toHaveBeenCalled();
|
64
|
-
});
|
65
|
-
|
66
|
-
describe("when a spec is done", function() {
|
67
|
-
it("logs errors to the console and prints a special symbol if it is an empty spec", function() {
|
68
|
-
if (!window.console) {
|
69
|
-
window.console = { error: function(){} };
|
70
|
-
}
|
71
|
-
|
72
|
-
var env = new j$.Env(),
|
73
|
-
container = document.createElement('div'),
|
74
|
-
getContainer = function() {return container;},
|
75
|
-
reporter = new j$.HtmlReporter({
|
76
|
-
env: env,
|
77
|
-
getContainer: getContainer,
|
78
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
79
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
80
|
-
});
|
81
|
-
|
82
|
-
spyOn(console, 'error');
|
83
|
-
|
84
|
-
reporter.initialize();
|
85
|
-
|
86
|
-
reporter.specDone({
|
87
|
-
status: "passed",
|
88
|
-
fullName: 'Some Name',
|
89
|
-
passedExpectations: [],
|
90
|
-
failedExpectations: []
|
91
|
-
});
|
92
|
-
expect(console.error).toHaveBeenCalledWith("Spec \'Some Name\' has no expectations.");
|
93
|
-
var specEl = container.querySelector('.symbol-summary li');
|
94
|
-
expect(specEl.getAttribute("class")).toEqual("empty");
|
95
|
-
});
|
96
|
-
|
97
|
-
it("reports the status symbol of a disabled spec", function() {
|
98
|
-
var env = new j$.Env(),
|
99
|
-
container = document.createElement("div"),
|
100
|
-
getContainer = function() { return container; },
|
101
|
-
reporter = new j$.HtmlReporter({
|
102
|
-
env: env,
|
103
|
-
getContainer: getContainer,
|
104
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
105
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
106
|
-
});
|
107
|
-
reporter.initialize();
|
108
|
-
|
109
|
-
reporter.specDone({id: 789, status: "disabled", fullName: "symbols should have titles", passedExpectations: [], failedExpectations: []});
|
110
|
-
|
111
|
-
var specEl = container.querySelector('.symbol-summary li');
|
112
|
-
expect(specEl.getAttribute("class")).toEqual("disabled");
|
113
|
-
expect(specEl.getAttribute("id")).toEqual("spec_789");
|
114
|
-
expect(specEl.getAttribute("title")).toEqual("symbols should have titles");
|
115
|
-
});
|
116
|
-
|
117
|
-
it("reports the status symbol of a pending spec", function() {
|
118
|
-
var env = new j$.Env(),
|
119
|
-
container = document.createElement("div"),
|
120
|
-
getContainer = function() { return container; },
|
121
|
-
reporter = new j$.HtmlReporter({
|
122
|
-
env: env,
|
123
|
-
getContainer: getContainer,
|
124
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
125
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
126
|
-
});
|
127
|
-
reporter.initialize();
|
128
|
-
|
129
|
-
reporter.specDone({id: 789, status: "pending", passedExpectations: [], failedExpectations: []});
|
130
|
-
|
131
|
-
var specEl = container.querySelector('.symbol-summary li');
|
132
|
-
expect(specEl.getAttribute("class")).toEqual("pending");
|
133
|
-
expect(specEl.getAttribute("id")).toEqual("spec_789");
|
134
|
-
});
|
135
|
-
|
136
|
-
it("reports the status symbol of a passing spec", function() {
|
137
|
-
var env = new j$.Env(),
|
138
|
-
container = document.createElement("div"),
|
139
|
-
getContainer = function() { return container; },
|
140
|
-
reporter = new j$.HtmlReporter({
|
141
|
-
env: env,
|
142
|
-
getContainer: getContainer,
|
143
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
144
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
145
|
-
});
|
146
|
-
reporter.initialize();
|
147
|
-
|
148
|
-
reporter.specDone({id: 123, status: "passed", passedExpectations: [{passed: true}], failedExpectations: []});
|
149
|
-
|
150
|
-
var statuses = container.querySelector(".symbol-summary");
|
151
|
-
var specEl = statuses.querySelector("li");
|
152
|
-
expect(specEl.getAttribute("class")).toEqual("passed");
|
153
|
-
expect(specEl.getAttribute("id")).toEqual("spec_123");
|
154
|
-
});
|
155
|
-
|
156
|
-
it("reports the status symbol of a failing spec", function() {
|
157
|
-
var env = new j$.Env(),
|
158
|
-
container = document.createElement("div"),
|
159
|
-
getContainer = function() { return container; },
|
160
|
-
reporter = new j$.HtmlReporter({
|
161
|
-
env: env,
|
162
|
-
getContainer: getContainer,
|
163
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
164
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
165
|
-
});
|
166
|
-
|
167
|
-
reporter.initialize();
|
168
|
-
|
169
|
-
reporter.specDone({
|
170
|
-
id: 345,
|
171
|
-
status: "failed",
|
172
|
-
failedExpectations: [],
|
173
|
-
passedExpectations: []
|
174
|
-
});
|
175
|
-
|
176
|
-
var specEl = container.querySelector(".symbol-summary li");
|
177
|
-
expect(specEl.getAttribute("class")).toEqual("failed");
|
178
|
-
expect(specEl.getAttribute("id")).toEqual("spec_345");
|
179
|
-
});
|
180
|
-
});
|
181
|
-
|
182
|
-
describe("when Jasmine is done", function() {
|
183
|
-
it("adds EMPTY to the link title of specs that have no expectations", function() {
|
184
|
-
if (!window.console) {
|
185
|
-
window.console = { error: function(){} };
|
186
|
-
}
|
187
|
-
var env = new j$.Env(),
|
188
|
-
container = document.createElement('div'),
|
189
|
-
getContainer = function() {return container;},
|
190
|
-
reporter = new j$.HtmlReporter({
|
191
|
-
env: env,
|
192
|
-
getContainer: getContainer,
|
193
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
194
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
195
|
-
});
|
196
|
-
|
197
|
-
spyOn(console, 'error');
|
198
|
-
|
199
|
-
reporter.initialize();
|
200
|
-
reporter.jasmineStarted({});
|
201
|
-
reporter.suiteStarted({id: 1});
|
202
|
-
reporter.specStarted({id: 1, status: 'passed', passedExpectations: [], failedExpectations: []});
|
203
|
-
reporter.specDone({
|
204
|
-
id: 1,
|
205
|
-
status: 'passed',
|
206
|
-
description: 'Spec Description',
|
207
|
-
passedExpectations: [],
|
208
|
-
failedExpectations: []
|
209
|
-
});
|
210
|
-
reporter.suiteDone({id: 1});
|
211
|
-
reporter.jasmineDone({});
|
212
|
-
|
213
|
-
var summary = container.querySelector('.summary');
|
214
|
-
var suite = summary.childNodes[0];
|
215
|
-
var specs = suite.childNodes[1];
|
216
|
-
var spec = specs.childNodes[0];
|
217
|
-
var specLink = spec.childNodes[0];
|
218
|
-
expect(specLink.innerHTML).toMatch(/SPEC HAS NO EXPECTATIONS/);
|
219
|
-
});
|
220
|
-
|
221
|
-
it("reports the run time", function() {
|
222
|
-
var env = new j$.Env(),
|
223
|
-
container = document.createElement("div"),
|
224
|
-
timer = jasmine.createSpyObj('timer', ['start', 'elapsed']),
|
225
|
-
getContainer = function() { return container; },
|
226
|
-
reporter = new j$.HtmlReporter({
|
227
|
-
env: env,
|
228
|
-
getContainer: getContainer,
|
229
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
230
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); },
|
231
|
-
timer: timer
|
232
|
-
});
|
233
|
-
|
234
|
-
reporter.initialize();
|
235
|
-
|
236
|
-
reporter.jasmineStarted({});
|
237
|
-
|
238
|
-
timer.elapsed.and.returnValue(100);
|
239
|
-
reporter.jasmineDone();
|
240
|
-
|
241
|
-
var duration = container.querySelector(".banner .duration");
|
242
|
-
expect(duration.innerHTML).toMatch(/finished in 0.1s/);
|
243
|
-
});
|
244
|
-
|
245
|
-
it("reports the suite and spec names with status", function() {
|
246
|
-
var env = new j$.Env(),
|
247
|
-
container = document.createElement("div"),
|
248
|
-
getContainer = function() { return container; },
|
249
|
-
reporter = new j$.HtmlReporter({
|
250
|
-
env: env,
|
251
|
-
getContainer: getContainer,
|
252
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
253
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
254
|
-
});
|
255
|
-
reporter.initialize();
|
256
|
-
|
257
|
-
reporter.jasmineStarted({});
|
258
|
-
reporter.suiteStarted({
|
259
|
-
id: 1,
|
260
|
-
description: "A Suite",
|
261
|
-
fullName: "A Suite"
|
262
|
-
});
|
263
|
-
|
264
|
-
var specResult = {
|
265
|
-
id: 123,
|
266
|
-
description: "with a spec",
|
267
|
-
fullName: "A Suite with a spec",
|
268
|
-
status: "passed",
|
269
|
-
failedExpectations: [],
|
270
|
-
passedExpectations: [{passed: true}]
|
271
|
-
};
|
272
|
-
reporter.specStarted(specResult);
|
273
|
-
reporter.specDone(specResult);
|
274
|
-
|
275
|
-
reporter.suiteStarted({
|
276
|
-
id: 2,
|
277
|
-
description: "inner suite",
|
278
|
-
fullName: "A Suite inner suite"
|
279
|
-
});
|
280
|
-
|
281
|
-
var specResult = {
|
282
|
-
id: 124,
|
283
|
-
description: "with another spec",
|
284
|
-
fullName: "A Suite inner suite with another spec",
|
285
|
-
status: "passed",
|
286
|
-
failedExpectations: [],
|
287
|
-
passedExpectations: [{passed: true}]
|
288
|
-
};
|
289
|
-
reporter.specStarted(specResult);
|
290
|
-
reporter.specDone(specResult);
|
291
|
-
|
292
|
-
reporter.suiteDone({id: 2});
|
293
|
-
|
294
|
-
specResult = {
|
295
|
-
id: 209,
|
296
|
-
description: "with a failing spec",
|
297
|
-
fullName: "A Suite inner with a failing spec",
|
298
|
-
status: "failed",
|
299
|
-
failedExpectations: [{}],
|
300
|
-
passedExpectations: []
|
301
|
-
};
|
302
|
-
reporter.specStarted(specResult);
|
303
|
-
reporter.specDone(specResult);
|
304
|
-
|
305
|
-
reporter.suiteDone({id: 1});
|
306
|
-
|
307
|
-
reporter.jasmineDone({});
|
308
|
-
var summary = container.querySelector(".summary");
|
309
|
-
|
310
|
-
expect(summary.childNodes.length).toEqual(1);
|
311
|
-
|
312
|
-
var outerSuite = summary.childNodes[0];
|
313
|
-
expect(outerSuite.childNodes.length).toEqual(4);
|
314
|
-
|
315
|
-
var classes = [];
|
316
|
-
for (var i = 0; i < outerSuite.childNodes.length; i++) {
|
317
|
-
var node = outerSuite.childNodes[i];
|
318
|
-
classes.push(node.getAttribute("class"));
|
319
|
-
}
|
320
|
-
expect(classes).toEqual(["suite-detail", "specs", "suite", "specs"]);
|
321
|
-
|
322
|
-
var suiteDetail = outerSuite.childNodes[0];
|
323
|
-
var suiteLink = suiteDetail.childNodes[0];
|
324
|
-
expect(suiteLink.innerHTML).toEqual("A Suite");
|
325
|
-
expect(suiteLink.getAttribute('href')).toEqual("?spec=A%20Suite");
|
326
|
-
|
327
|
-
var specs = outerSuite.childNodes[1];
|
328
|
-
var spec = specs.childNodes[0];
|
329
|
-
expect(spec.getAttribute("class")).toEqual("passed");
|
330
|
-
expect(spec.getAttribute("id")).toEqual("spec-123");
|
331
|
-
|
332
|
-
var specLink = spec.childNodes[0];
|
333
|
-
expect(specLink.innerHTML).toEqual("with a spec");
|
334
|
-
expect(specLink.getAttribute("href")).toEqual("?spec=A%20Suite%20with%20a%20spec");
|
335
|
-
// expect(specLink.getAttribute("title")).toEqual("A Suite with a spec");
|
336
|
-
});
|
337
|
-
|
338
|
-
describe("UI for raising/catching exceptions", function() {
|
339
|
-
it("should be unchecked if the env is catching", function() {
|
340
|
-
var env = new j$.Env(),
|
341
|
-
container = document.createElement("div"),
|
342
|
-
getContainer = function() {
|
343
|
-
return container;
|
344
|
-
},
|
345
|
-
reporter = new j$.HtmlReporter({
|
346
|
-
env: env,
|
347
|
-
getContainer: getContainer,
|
348
|
-
createElement: function() {
|
349
|
-
return document.createElement.apply(document, arguments);
|
350
|
-
},
|
351
|
-
createTextNode: function() {
|
352
|
-
return document.createTextNode.apply(document, arguments);
|
353
|
-
}
|
354
|
-
});
|
355
|
-
|
356
|
-
reporter.initialize();
|
357
|
-
reporter.jasmineDone({});
|
358
|
-
|
359
|
-
var raisingExceptionsUI = container.querySelector(".raise");
|
360
|
-
expect(raisingExceptionsUI.checked).toBe(false);
|
361
|
-
});
|
362
|
-
|
363
|
-
it("should be checked if the env is not catching", function() {
|
364
|
-
var env = new j$.Env(),
|
365
|
-
container = document.createElement("div"),
|
366
|
-
getContainer = function() {
|
367
|
-
return container;
|
368
|
-
},
|
369
|
-
reporter = new j$.HtmlReporter({
|
370
|
-
env: env,
|
371
|
-
getContainer: getContainer,
|
372
|
-
createElement: function() {
|
373
|
-
return document.createElement.apply(document, arguments);
|
374
|
-
},
|
375
|
-
createTextNode: function() {
|
376
|
-
return document.createTextNode.apply(document, arguments);
|
377
|
-
}
|
378
|
-
});
|
379
|
-
|
380
|
-
reporter.initialize();
|
381
|
-
env.catchExceptions(false);
|
382
|
-
reporter.jasmineDone({});
|
383
|
-
|
384
|
-
var raisingExceptionsUI = container.querySelector(".raise");
|
385
|
-
expect(raisingExceptionsUI.checked).toBe(true);
|
386
|
-
});
|
387
|
-
|
388
|
-
it("should affect the query param for catching exceptions", function() {
|
389
|
-
var env = new j$.Env(),
|
390
|
-
container = document.createElement("div"),
|
391
|
-
exceptionsClickHandler = jasmine.createSpy("raise exceptions checked"),
|
392
|
-
getContainer = function() {
|
393
|
-
return container;
|
394
|
-
},
|
395
|
-
reporter = new j$.HtmlReporter({
|
396
|
-
env: env,
|
397
|
-
getContainer: getContainer,
|
398
|
-
onRaiseExceptionsClick: exceptionsClickHandler,
|
399
|
-
createElement: function() {
|
400
|
-
return document.createElement.apply(document, arguments);
|
401
|
-
},
|
402
|
-
createTextNode: function() {
|
403
|
-
return document.createTextNode.apply(document, arguments);
|
404
|
-
}
|
405
|
-
});
|
406
|
-
|
407
|
-
reporter.initialize();
|
408
|
-
reporter.jasmineDone({});
|
409
|
-
|
410
|
-
var input = container.querySelector(".raise");
|
411
|
-
input.click();
|
412
|
-
expect(exceptionsClickHandler).toHaveBeenCalled();
|
413
|
-
});
|
414
|
-
});
|
415
|
-
|
416
|
-
it("shows a message if no specs are run", function(){
|
417
|
-
var env, container, reporter;
|
418
|
-
env = new j$.Env();
|
419
|
-
container = document.createElement("div");
|
420
|
-
var getContainer = function() { return container; },
|
421
|
-
reporter = new j$.HtmlReporter({
|
422
|
-
env: env,
|
423
|
-
getContainer: getContainer,
|
424
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
425
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
426
|
-
});
|
427
|
-
reporter.initialize();
|
428
|
-
|
429
|
-
reporter.jasmineStarted({});
|
430
|
-
reporter.jasmineDone({});
|
431
|
-
|
432
|
-
var alertBars = container.querySelectorAll(".alert .bar");
|
433
|
-
expect(alertBars[0].getAttribute('class')).toMatch(/skipped/);
|
434
|
-
expect(alertBars[0].innerHTML).toMatch(/No specs found/);
|
435
|
-
});
|
436
|
-
|
437
|
-
describe("and all specs pass", function() {
|
438
|
-
var env, container, reporter;
|
439
|
-
beforeEach(function() {
|
440
|
-
env = new j$.Env();
|
441
|
-
container = document.createElement("div");
|
442
|
-
var getContainer = function() { return container; },
|
443
|
-
reporter = new j$.HtmlReporter({
|
444
|
-
env: env,
|
445
|
-
getContainer: getContainer,
|
446
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
447
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
448
|
-
});
|
449
|
-
reporter.initialize();
|
450
|
-
|
451
|
-
reporter.jasmineStarted({ totalSpecsDefined: 2 });
|
452
|
-
reporter.specDone({
|
453
|
-
id: 123,
|
454
|
-
description: "with a spec",
|
455
|
-
fullName: "A Suite with a spec",
|
456
|
-
status: "passed",
|
457
|
-
passedExpectations: [{passed: true}],
|
458
|
-
failedExpectations: []
|
459
|
-
});
|
460
|
-
reporter.specDone({
|
461
|
-
id: 124,
|
462
|
-
description: "with another spec",
|
463
|
-
fullName: "A Suite inner suite with another spec",
|
464
|
-
status: "passed",
|
465
|
-
passedExpectations: [{passed: true}],
|
466
|
-
failedExpectations: []
|
467
|
-
});
|
468
|
-
reporter.jasmineDone({});
|
469
|
-
});
|
470
|
-
|
471
|
-
it("reports the specs counts", function() {
|
472
|
-
var alertBars = container.querySelectorAll(".alert .bar");
|
473
|
-
|
474
|
-
expect(alertBars.length).toEqual(1);
|
475
|
-
expect(alertBars[0].getAttribute('class')).toMatch(/passed/);
|
476
|
-
expect(alertBars[0].innerHTML).toMatch(/2 specs, 0 failures/);
|
477
|
-
});
|
478
|
-
|
479
|
-
it("reports no failure details", function() {
|
480
|
-
var specFailure = container.querySelector(".failures");
|
481
|
-
|
482
|
-
expect(specFailure.childNodes.length).toEqual(0);
|
483
|
-
});
|
484
|
-
|
485
|
-
it("reports no pending specs", function() {
|
486
|
-
var alertBar = container.querySelector(".alert .bar");
|
487
|
-
|
488
|
-
expect(alertBar.innerHTML).not.toMatch(/pending spec[s]/);
|
489
|
-
});
|
490
|
-
});
|
491
|
-
|
492
|
-
describe("and there are pending specs", function() {
|
493
|
-
var env, container, reporter;
|
494
|
-
beforeEach(function() {
|
495
|
-
env = new j$.Env();
|
496
|
-
container = document.createElement("div");
|
497
|
-
var getContainer = function() { return container; };
|
498
|
-
reporter = new j$.HtmlReporter({
|
499
|
-
env: env,
|
500
|
-
getContainer: getContainer,
|
501
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
502
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
503
|
-
});
|
504
|
-
reporter.initialize();
|
505
|
-
|
506
|
-
reporter.jasmineStarted({ totalSpecsDefined: 1 });
|
507
|
-
reporter.specDone({
|
508
|
-
id: 123,
|
509
|
-
description: "with a spec",
|
510
|
-
fullName: "A Suite with a spec",
|
511
|
-
status: "pending",
|
512
|
-
passedExpectations: [],
|
513
|
-
failedExpectations: []
|
514
|
-
});
|
515
|
-
reporter.jasmineDone({});
|
516
|
-
});
|
517
|
-
|
518
|
-
it("reports the pending specs count", function() {
|
519
|
-
var alertBar = container.querySelector(".alert .bar");
|
520
|
-
|
521
|
-
expect(alertBar.innerHTML).toMatch(/1 spec, 0 failures, 1 pending spec/);
|
522
|
-
});
|
523
|
-
|
524
|
-
it("reports no failure details", function() {
|
525
|
-
var specFailure = container.querySelector(".failures");
|
526
|
-
|
527
|
-
expect(specFailure.childNodes.length).toEqual(0);
|
528
|
-
});
|
529
|
-
});
|
530
|
-
|
531
|
-
describe("and some tests fail", function() {
|
532
|
-
var env, container, reporter;
|
533
|
-
|
534
|
-
beforeEach(function() {
|
535
|
-
env = new j$.Env();
|
536
|
-
container = document.createElement("div");
|
537
|
-
var getContainer = function() { return container; }
|
538
|
-
reporter = new j$.HtmlReporter({
|
539
|
-
env: env,
|
540
|
-
getContainer: getContainer,
|
541
|
-
createElement: function() { return document.createElement.apply(document, arguments); },
|
542
|
-
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
|
543
|
-
});
|
544
|
-
reporter.initialize();
|
545
|
-
|
546
|
-
reporter.jasmineStarted({ totalSpecsDefined: 1 });
|
547
|
-
|
548
|
-
var passingResult = {id: 123, status: "passed", passedExpectations: [{passed: true}], failedExpectations: []};
|
549
|
-
reporter.specStarted(passingResult);
|
550
|
-
reporter.specDone(passingResult);
|
551
|
-
|
552
|
-
var failingResult = {
|
553
|
-
id: 124,
|
554
|
-
status: "failed",
|
555
|
-
description: "a failing spec",
|
556
|
-
fullName: "a suite with a failing spec",
|
557
|
-
passedExpectations: [],
|
558
|
-
failedExpectations: [
|
559
|
-
{
|
560
|
-
message: "a failure message",
|
561
|
-
stack: "a stack trace"
|
562
|
-
}
|
563
|
-
]
|
564
|
-
};
|
565
|
-
reporter.specStarted(failingResult);
|
566
|
-
reporter.specDone(failingResult);
|
567
|
-
reporter.jasmineDone({});
|
568
|
-
});
|
569
|
-
|
570
|
-
it("reports the specs counts", function() {
|
571
|
-
var alertBar = container.querySelector(".alert .bar");
|
572
|
-
|
573
|
-
expect(alertBar.getAttribute('class')).toMatch(/failed/);
|
574
|
-
expect(alertBar.innerHTML).toMatch(/2 specs, 1 failure/);
|
575
|
-
});
|
576
|
-
|
577
|
-
it("reports failure messages and stack traces", function() {
|
578
|
-
var specFailures = container.querySelector(".failures");
|
579
|
-
|
580
|
-
var failure = specFailures.childNodes[0];
|
581
|
-
expect(failure.getAttribute("class")).toMatch(/failed/);
|
582
|
-
expect(failure.getAttribute("class")).toMatch(/spec-detail/);
|
583
|
-
|
584
|
-
var specDiv = failure.childNodes[0];
|
585
|
-
expect(specDiv.getAttribute("class")).toEqual("description");
|
586
|
-
|
587
|
-
var specLink = specDiv.childNodes[0];
|
588
|
-
expect(specLink.getAttribute("title")).toEqual("a suite with a failing spec");
|
589
|
-
expect(specLink.getAttribute("href")).toEqual("?spec=a%20suite%20with%20a%20failing%20spec");
|
590
|
-
|
591
|
-
var message = failure.childNodes[1].childNodes[0];
|
592
|
-
expect(message.getAttribute("class")).toEqual("result-message");
|
593
|
-
expect(message.innerHTML).toEqual("a failure message");
|
594
|
-
|
595
|
-
var stackTrace = failure.childNodes[1].childNodes[1];
|
596
|
-
expect(stackTrace.getAttribute("class")).toEqual("stack-trace");
|
597
|
-
expect(stackTrace.innerHTML).toEqual("a stack trace");
|
598
|
-
});
|
599
|
-
|
600
|
-
it("allows switching between failure details and the spec summary", function() {
|
601
|
-
var menuBar = container.querySelectorAll(".bar")[1];
|
602
|
-
|
603
|
-
expect(menuBar.getAttribute("class")).not.toMatch(/hidden/);
|
604
|
-
|
605
|
-
var link = menuBar.querySelector('a');
|
606
|
-
expect(link.innerHTML).toEqual("Failures");
|
607
|
-
expect(link.getAttribute("href")).toEqual("#");
|
608
|
-
});
|
609
|
-
|
610
|
-
it("sets the reporter to 'Failures List' mode", function() {
|
611
|
-
var reporterNode = container.querySelector(".jasmine_html-reporter");
|
612
|
-
expect(reporterNode.getAttribute("class")).toMatch("failure-list");
|
613
|
-
});
|
614
|
-
});
|
615
|
-
});
|
616
|
-
});
|
@@ -1,18 +0,0 @@
|
|
1
|
-
describe("j$.HtmlSpecFilter", function() {
|
2
|
-
|
3
|
-
it("should match when no string is provided", function() {
|
4
|
-
var specFilter = new j$.HtmlSpecFilter();
|
5
|
-
|
6
|
-
expect(specFilter.matches("foo")).toBe(true);
|
7
|
-
expect(specFilter.matches("*bar")).toBe(true);
|
8
|
-
});
|
9
|
-
|
10
|
-
it("should only match the provided string", function() {
|
11
|
-
var specFilter = new j$.HtmlSpecFilter({
|
12
|
-
filterString: function() { return "foo"; }
|
13
|
-
});
|
14
|
-
|
15
|
-
expect(specFilter.matches("foo")).toBe(true);
|
16
|
-
expect(specFilter.matches("bar")).toBe(false);
|
17
|
-
});
|
18
|
-
});
|
@@ -1,37 +0,0 @@
|
|
1
|
-
describe("MatchersSpec - HTML Dependent", function () {
|
2
|
-
var env, spec;
|
3
|
-
|
4
|
-
beforeEach(function() {
|
5
|
-
env = new j$.Env();
|
6
|
-
|
7
|
-
var suite = env.describe("suite", function() {
|
8
|
-
spec = env.it("spec", function() {
|
9
|
-
});
|
10
|
-
});
|
11
|
-
spyOn(spec, 'addExpectationResult');
|
12
|
-
|
13
|
-
addMatchers({
|
14
|
-
toPass: function() {
|
15
|
-
return lastResult().passed;
|
16
|
-
},
|
17
|
-
toFail: function() {
|
18
|
-
return !lastResult().passed;
|
19
|
-
}
|
20
|
-
});
|
21
|
-
});
|
22
|
-
|
23
|
-
function match(value) {
|
24
|
-
return spec.expect(value);
|
25
|
-
}
|
26
|
-
|
27
|
-
function lastResult() {
|
28
|
-
return spec.addExpectationResult.mostRecentCall.args[1];
|
29
|
-
}
|
30
|
-
|
31
|
-
xit("toEqual with DOM nodes", function() {
|
32
|
-
var nodeA = document.createElement('div');
|
33
|
-
var nodeB = document.createElement('div');
|
34
|
-
expect((match(nodeA).toEqual(nodeA))).toPass();
|
35
|
-
expect((match(nodeA).toEqual(nodeB))).toFail();
|
36
|
-
});
|
37
|
-
});
|
@@ -1,15 +0,0 @@
|
|
1
|
-
describe("j$.pp (HTML Dependent)", function () {
|
2
|
-
it("should stringify HTML nodes properly", function() {
|
3
|
-
var sampleNode = document.createElement('div');
|
4
|
-
sampleNode.innerHTML = 'foo<b>bar</b>';
|
5
|
-
expect(j$.pp(sampleNode)).toEqual("HTMLNode");
|
6
|
-
expect(j$.pp({foo: sampleNode})).toEqual("{ foo: HTMLNode }");
|
7
|
-
});
|
8
|
-
|
9
|
-
it("should print Firefox's wrapped native objects correctly", function() {
|
10
|
-
if(jasmine.getEnv().firefoxVersion) {
|
11
|
-
try { new CustomEvent(); } catch(e) { var err = e; };
|
12
|
-
expect(j$.pp(err)).toMatch(/Not enough arguments/);
|
13
|
-
}
|
14
|
-
});
|
15
|
-
});
|