jasmine-headless-webkit-firstbanco 0.9.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/CHANGELOG.md +89 -0
- data/Gemfile +30 -0
- data/Guardfile +41 -0
- data/README.md +44 -0
- data/Rakefile +65 -0
- data/bin/jasmine-headless-webkit +11 -0
- data/config/cucumber.yml +2 -0
- data/ext/jasmine-webkit-specrunner/Info.plist +22 -0
- data/ext/jasmine-webkit-specrunner/Makefile.dummy +5 -0
- data/ext/jasmine-webkit-specrunner/Page.cpp +15 -0
- data/ext/jasmine-webkit-specrunner/Page.h +20 -0
- data/ext/jasmine-webkit-specrunner/Runner.cpp +208 -0
- data/ext/jasmine-webkit-specrunner/Runner.h +73 -0
- data/ext/jasmine-webkit-specrunner/common.pri +8 -0
- data/ext/jasmine-webkit-specrunner/extconf.rb +10 -0
- data/ext/jasmine-webkit-specrunner/specrunner.cpp +79 -0
- data/ext/jasmine-webkit-specrunner/specrunner.pro +5 -0
- data/features/bin/failure.feature +7 -0
- data/features/bin/files.feature +7 -0
- data/features/bin/filtered_run/both_runs.feature +18 -0
- data/features/bin/filtered_run/no_full_run.feature +14 -0
- data/features/bin/help.feature +7 -0
- data/features/bin/quiet_messages.feature +8 -0
- data/features/bin/runner_out.feature +8 -0
- data/features/bin/spec_files_with_same_basename.feature +7 -0
- data/features/bin/success.feature +20 -0
- data/features/bin/success_with_js_error.feature +5 -0
- data/features/bin/tries_to_leave_page.feature +7 -0
- data/features/bin/try_to_click_a_button.feature +7 -0
- data/features/bin/two_files_from_src_files.feature +11 -0
- data/features/bin/with_coffeescript_error.feature +7 -0
- data/features/bin/with_console_log.feature +7 -0
- data/features/bin/with_server.feature +7 -0
- data/features/bin/with_window_prompt.feature +7 -0
- data/features/reporters.feature +24 -0
- data/features/runner.feature +34 -0
- data/features/steps/given/i_have_test_suite.rb +2 -0
- data/features/steps/given/no_existing_file.rb +4 -0
- data/features/steps/given/options/i_have_defaults.rb +4 -0
- data/features/steps/given/options/i_have_reporters.rb +10 -0
- data/features/steps/given/options/i_have_runner_options.rb +3 -0
- data/features/steps/then/bin/exit_status_should_be.rb +3 -0
- data/features/steps/then/bin/file_should_contain_runner.rb +4 -0
- data/features/steps/then/bin/following_files_loaded_in_order.rb +10 -0
- data/features/steps/then/bin/i_should_get_help_output.rb +4 -0
- data/features/steps/then/bin/output_should_include.rb +3 -0
- data/features/steps/then/bin/output_should_not_include.rb +4 -0
- data/features/steps/then/reporting/report_does_not_exist.rb +4 -0
- data/features/steps/then/reporting/report_should_exist.rb +3 -0
- data/features/steps/then/reporting/report_should_have.rb +7 -0
- data/features/steps/then/reporting/report_should_have_seed.rb +4 -0
- data/features/steps/then/runner/it_should_have_exit_status.rb +3 -0
- data/features/steps/then/runner/it_should_include_report_file.rb +4 -0
- data/features/steps/then/runner/it_should_not_include_report_file.rb +3 -0
- data/features/steps/then/templates/it_should_use_reporter.rb +6 -0
- data/features/steps/when/i_delete_file.rb +3 -0
- data/features/steps/when/i_get_runner.rb +4 -0
- data/features/steps/when/i_get_template_writer.rb +4 -0
- data/features/steps/when/i_run_executable.rb +4 -0
- data/features/steps/when/i_run_runner.rb +4 -0
- data/features/support/env.rb +7 -0
- data/jasmine-headless-webkit-firstbanco.gemspec +30 -0
- data/lib/autotest/discover.rb +1 -0
- data/lib/autotest/jasmine.rb +7 -0
- data/lib/autotest/jasmine_mixin.rb +111 -0
- data/lib/autotest/jasmine_rspec2.rb +7 -0
- data/lib/jasmine-headless-webkit.rb +3 -0
- data/lib/jasmine/headless.rb +61 -0
- data/lib/jasmine/headless/cacheable_action.rb +85 -0
- data/lib/jasmine/headless/coffee_script_cache.rb +20 -0
- data/lib/jasmine/headless/coffee_template.rb +36 -0
- data/lib/jasmine/headless/command_line.rb +31 -0
- data/lib/jasmine/headless/css_template.rb +19 -0
- data/lib/jasmine/headless/errors.rb +16 -0
- data/lib/jasmine/headless/file_checker.rb +25 -0
- data/lib/jasmine/headless/files_list.rb +332 -0
- data/lib/jasmine/headless/js_template.rb +23 -0
- data/lib/jasmine/headless/jst_template.rb +15 -0
- data/lib/jasmine/headless/nil_template.rb +14 -0
- data/lib/jasmine/headless/options.rb +206 -0
- data/lib/jasmine/headless/railtie.rb +12 -0
- data/lib/jasmine/headless/report.rb +81 -0
- data/lib/jasmine/headless/report_message.rb +12 -0
- data/lib/jasmine/headless/report_message/console.rb +18 -0
- data/lib/jasmine/headless/report_message/error.rb +20 -0
- data/lib/jasmine/headless/report_message/fail.rb +5 -0
- data/lib/jasmine/headless/report_message/pass.rb +5 -0
- data/lib/jasmine/headless/report_message/seed.rb +14 -0
- data/lib/jasmine/headless/report_message/spec.rb +28 -0
- data/lib/jasmine/headless/report_message/total.rb +31 -0
- data/lib/jasmine/headless/runner.rb +264 -0
- data/lib/jasmine/headless/spec_file_analyzer.rb +44 -0
- data/lib/jasmine/headless/task.rb +39 -0
- data/lib/jasmine/headless/template_writer.rb +65 -0
- data/lib/jasmine/headless/unique_asset_list.rb +16 -0
- data/lib/jasmine/headless/version.rb +5 -0
- data/lib/qt/qmake.rb +155 -0
- data/script/gemfile +11 -0
- data/script/hooks/post-commit +4 -0
- data/script/hooks/pre-commit +15 -0
- data/script/initialize-environment +35 -0
- data/script/install-git-hooks +6 -0
- data/skel/template.html.erb +77 -0
- data/spec/files/UTF-8-test.txt +0 -0
- data/spec/integration/randomization_spec.rb +13 -0
- data/spec/integration/specify_runner_file_spec.rb +22 -0
- data/spec/integration/sprockets_spec.rb +23 -0
- data/spec/jasmine/click_button/click_button.js +5 -0
- data/spec/jasmine/click_button/click_button.yml +12 -0
- data/spec/jasmine/click_button/click_button_spec.js +11 -0
- data/spec/jasmine/coffeescript_error/coffeescript_error.yml +10 -0
- data/spec/jasmine/coffeescript_error/spec.coffee +2 -0
- data/spec/jasmine/coffeescript_error/src.coffee +2 -0
- data/spec/jasmine/console_log/console_log.js +1 -0
- data/spec/jasmine/console_log/console_log.yml +10 -0
- data/spec/jasmine/console_log/console_log_spec.js +7 -0
- data/spec/jasmine/failure/failure.js +1 -0
- data/spec/jasmine/failure/failure.yml +9 -0
- data/spec/jasmine/failure/failure_spec.js +6 -0
- data/spec/jasmine/filtered_failure/failure_spec.js +6 -0
- data/spec/jasmine/filtered_failure/filtered_failure.yml +10 -0
- data/spec/jasmine/filtered_failure/src.js +0 -0
- data/spec/jasmine/filtered_failure/success_spec.js +6 -0
- data/spec/jasmine/filtered_success/filtered_success.yml +10 -0
- data/spec/jasmine/filtered_success/src.js +0 -0
- data/spec/jasmine/filtered_success/success_one_spec.js +6 -0
- data/spec/jasmine/filtered_success/success_other_file.js +7 -0
- data/spec/jasmine/filtered_success/success_two_spec.js +6 -0
- data/spec/jasmine/filtered_success_with_console/filtered_success.yml +10 -0
- data/spec/jasmine/filtered_success_with_console/src.js +0 -0
- data/spec/jasmine/filtered_success_with_console/success_one_spec.js +7 -0
- data/spec/jasmine/filtered_success_with_console/success_two_spec.js +6 -0
- data/spec/jasmine/leave_page/leave_page.js +4 -0
- data/spec/jasmine/leave_page/leave_page.yml +9 -0
- data/spec/jasmine/leave_page/leave_page_spec.js +11 -0
- data/spec/jasmine/noisy/file.js.erb +0 -0
- data/spec/jasmine/noisy/noisy.yml +8 -0
- data/spec/jasmine/noisy/other_file.js +2 -0
- data/spec/jasmine/runner_out_in_jasmine_yml/jasmine.yml +11 -0
- data/spec/jasmine/runner_out_in_jasmine_yml/test.js +2 -0
- data/spec/jasmine/runner_out_in_jasmine_yml/test_spec.coffee +4 -0
- data/spec/jasmine/success/success.js +1 -0
- data/spec/jasmine/success/success.yml +9 -0
- data/spec/jasmine/success/success_spec.js +6 -0
- data/spec/jasmine/success_with_error/success_with_error.js +3 -0
- data/spec/jasmine/success_with_error/success_with_error.yml +9 -0
- data/spec/jasmine/success_with_error/success_with_error_spec.js +6 -0
- data/spec/jasmine/two_files_from_src_files/app/app-file.js +0 -0
- data/spec/jasmine/two_files_from_src_files/app/app.js +2 -0
- data/spec/jasmine/two_files_from_src_files/jasmine.yml +7 -0
- data/spec/jasmine/two_files_from_src_files/vendor/vendor-file.js +0 -0
- data/spec/jasmine/two_files_from_src_files/vendor/vendor.js +2 -0
- data/spec/jasmine/two_spec_files_same_basename/jasmine.yml +6 -0
- data/spec/jasmine/two_spec_files_same_basename/spec.coffee +4 -0
- data/spec/jasmine/two_spec_files_same_basename/spec.js +6 -0
- data/spec/jasmine/window_prompt/source.js +2 -0
- data/spec/jasmine/window_prompt/window_prompt.yml +4 -0
- data/spec/jasmine/with_sprockets_includes/assets/application.js.erb +2 -0
- data/spec/jasmine/with_sprockets_includes/assets/things/code.js +6 -0
- data/spec/jasmine/with_sprockets_includes/assets/things/jquery.string.js +0 -0
- data/spec/jasmine/with_sprockets_includes/assets/things/required.js +3 -0
- data/spec/jasmine/with_sprockets_includes/assets/things/subcode/more_code.js +2 -0
- data/spec/jasmine/with_sprockets_includes/assets/things/templates/that.jst.ejs +1 -0
- data/spec/jasmine/with_sprockets_includes/assets/things/templates/this.jst +2 -0
- data/spec/jasmine/with_sprockets_includes/spec/spec_helper.js +1 -0
- data/spec/jasmine/with_sprockets_includes/spec/things/code_spec.js +9 -0
- data/spec/jasmine/with_sprockets_includes/with_sprockets_includes.yml +12 -0
- data/spec/javascripts/console.log_spec.coffee +15 -0
- data/spec/javascripts/headless_reporter_result_spec.coffee +30 -0
- data/spec/javascripts/helpers/spec_helper.coffee +2 -0
- data/spec/javascripts/jasmine-extensions_spec.coffee +80 -0
- data/spec/javascripts/jasmine.HeadlessReporter.ConsoleBase_spec.coffee +35 -0
- data/spec/javascripts/jasmine.HeadlessReporter.Console_spec.coffee +3 -0
- data/spec/javascripts/jasmine.HeadlessReporter.Tap_spec.coffee +19 -0
- data/spec/javascripts/jasmine.HeadlessReporter_spec.coffee +27 -0
- data/spec/javascripts/support/jasmine.yml +9 -0
- data/spec/lib/jasmine/headless/cacheable_action_spec.rb +122 -0
- data/spec/lib/jasmine/headless/coffee_script_cache_spec.rb +21 -0
- data/spec/lib/jasmine/headless/coffee_template_spec.rb +55 -0
- data/spec/lib/jasmine/headless/css_template_spec.rb +25 -0
- data/spec/lib/jasmine/headless/file_checker_spec.rb +41 -0
- data/spec/lib/jasmine/headless/files_list_spec.rb +194 -0
- data/spec/lib/jasmine/headless/js_template_spec.rb +31 -0
- data/spec/lib/jasmine/headless/jst_template_spec.rb +21 -0
- data/spec/lib/jasmine/headless/nil_template_spec.rb +31 -0
- data/spec/lib/jasmine/headless/options_spec.rb +194 -0
- data/spec/lib/jasmine/headless/report_message/seed_spec.rb +18 -0
- data/spec/lib/jasmine/headless/report_message/spec_spec.rb +20 -0
- data/spec/lib/jasmine/headless/report_spec.rb +95 -0
- data/spec/lib/jasmine/headless/runner_spec.rb +247 -0
- data/spec/lib/jasmine/headless/spec_file_analyzer_spec.rb +68 -0
- data/spec/lib/jasmine/headless/task_spec.rb +92 -0
- data/spec/lib/jasmine/headless/template_writer_spec.rb +92 -0
- data/spec/lib/jasmine/headless/unique_asset_list_spec.rb +22 -0
- data/spec/lib/jasmine/headless_spec.rb +38 -0
- data/spec/lib/qt/qmake_spec.rb +142 -0
- data/spec/skel/template.html.erb_spec.rb +8 -0
- data/spec/spec_helper.rb +113 -0
- data/vendor/assets/coffeescripts/headless_reporter_result.coffee +49 -0
- data/vendor/assets/coffeescripts/prolog.coffee +100 -0
- data/vendor/assets/javascripts/beautify-html.js +463 -0
- data/vendor/assets/javascripts/headless_reporter_result.js +79 -0
- data/vendor/assets/javascripts/intense.coffee +28 -0
- data/vendor/assets/javascripts/jasmine-extensions.coffee +97 -0
- data/vendor/assets/javascripts/jasmine.HeadlessReporter.Console.coffee +8 -0
- data/vendor/assets/javascripts/jasmine.HeadlessReporter.ConsoleBase.coffee +92 -0
- data/vendor/assets/javascripts/jasmine.HeadlessReporter.File.coffee +24 -0
- data/vendor/assets/javascripts/jasmine.HeadlessReporter.Tap.coffee +28 -0
- data/vendor/assets/javascripts/jasmine.HeadlessReporter.Verbose.coffee +64 -0
- data/vendor/assets/javascripts/jasmine.HeadlessReporter.coffee +58 -0
- data/vendor/assets/javascripts/jsDump.js +209 -0
- data/vendor/assets/javascripts/prolog.js +108 -0
- metadata +347 -0
@@ -0,0 +1 @@
|
|
1
|
+
var failure = 0;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
var success = 1;
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
'hello'
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require 'jquery'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#= require jquery
|
2
|
+
|
3
|
+
describe 'console.log', ->
|
4
|
+
it 'should not eat my precious jqueries', ->
|
5
|
+
_log = JHW.log
|
6
|
+
|
7
|
+
JHW.log = ->
|
8
|
+
|
9
|
+
d = $('<div><div id="inner">b</div></div>');
|
10
|
+
expect(d.find('#inner').length).toBe(1);
|
11
|
+
console.log(d.find('#inner'));
|
12
|
+
expect(d.find('#inner').length).toBe(1);
|
13
|
+
|
14
|
+
JHW.log = _log
|
15
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
describe 'HeadlessReporterResult', ->
|
2
|
+
result = null
|
3
|
+
name = "name"
|
4
|
+
splitName = "splitName"
|
5
|
+
message = 'message'
|
6
|
+
|
7
|
+
context 'no lines', ->
|
8
|
+
beforeEach ->
|
9
|
+
result = new HeadlessReporterResult(name, splitName)
|
10
|
+
|
11
|
+
describe '#addResult', ->
|
12
|
+
it 'should add a message', ->
|
13
|
+
result.addResult(message)
|
14
|
+
|
15
|
+
expect(result.results).toEqual([ message ])
|
16
|
+
|
17
|
+
context 'with lines', ->
|
18
|
+
beforeEach ->
|
19
|
+
HeadlessReporterResult.specLineNumbers = {
|
20
|
+
'one': {
|
21
|
+
'name': [ 1 ],
|
22
|
+
'of': [ 2, 9 ],
|
23
|
+
'test': [ 3, 10 ],
|
24
|
+
'other': [ 7 ]
|
25
|
+
}
|
26
|
+
}
|
27
|
+
it 'should find the best spec lines', ->
|
28
|
+
expect(HeadlessReporterResult.findSpecLine([ 'name', 'of', 'test' ]).lineNumber).toEqual(3)
|
29
|
+
expect(HeadlessReporterResult.findSpecLine([ 'other', 'of', 'test' ]).lineNumber).toEqual(10)
|
30
|
+
|
@@ -0,0 +1,80 @@
|
|
1
|
+
describe 'jasmine.Suite.prototype.getSuiteSplitName', ->
|
2
|
+
it 'should flatten the description', ->
|
3
|
+
suite = new jasmine.Suite({});
|
4
|
+
suite.description = "hello\ngoodbye\n";
|
5
|
+
expect(suite.getSuiteSplitName()).toEqual([ "hello goodbye " ])
|
6
|
+
|
7
|
+
it 'should not fail on missing description', ->
|
8
|
+
suite = new jasmine.Suite({});
|
9
|
+
suite.description = 1;
|
10
|
+
expect(suite.getSuiteSplitName()).toEqual([ "1" ])
|
11
|
+
|
12
|
+
describe 'jasmine.Spec.prototype.getSuiteSplitName', ->
|
13
|
+
it 'should flatten the description', ->
|
14
|
+
spec = new jasmine.Spec({}, {});
|
15
|
+
spec.suite = {
|
16
|
+
getSuiteSplitName: -> []
|
17
|
+
}
|
18
|
+
spec.description = "hello\ngoodbye\n";
|
19
|
+
expect(spec.getSpecSplitName()).toEqual([ "hello goodbye " ])
|
20
|
+
|
21
|
+
it 'should not fail on missing description', ->
|
22
|
+
spec = new jasmine.Spec({}, {});
|
23
|
+
spec.suite = {
|
24
|
+
getSuiteSplitName: -> []
|
25
|
+
}
|
26
|
+
spec.description = 1
|
27
|
+
expect(spec.getSpecSplitName()).toEqual([ "1" ])
|
28
|
+
|
29
|
+
describe 'jasmine.Spec.prototype.getJHWSpecInformation', ->
|
30
|
+
it 'should append null when there is no file information', ->
|
31
|
+
spec = new jasmine.Spec({}, {})
|
32
|
+
spyOn(spec, 'getSpecSplitName').andReturn(["one"])
|
33
|
+
spyOn(HeadlessReporterResult, 'findSpecLine').andReturn({})
|
34
|
+
expect(spec.getJHWSpecInformation()).toEqual("one||")
|
35
|
+
|
36
|
+
describe 'jasmine.WaitsBlock and jasmine.WaitsForBlock', ->
|
37
|
+
beforeEach ->
|
38
|
+
it 'should notify JHW of waiting', ->
|
39
|
+
waits(5500)
|
40
|
+
runs ->
|
41
|
+
expect(true).toEqual(true)
|
42
|
+
|
43
|
+
it 'should notify JHW of waiting for something', ->
|
44
|
+
value = false
|
45
|
+
|
46
|
+
setTimeout(
|
47
|
+
->
|
48
|
+
value = true
|
49
|
+
, 5000
|
50
|
+
)
|
51
|
+
|
52
|
+
waitsFor(
|
53
|
+
->
|
54
|
+
value
|
55
|
+
, "Nope"
|
56
|
+
5500
|
57
|
+
)
|
58
|
+
|
59
|
+
runs ->
|
60
|
+
expect(true).toEqual(true)
|
61
|
+
|
62
|
+
describe 'jasmine.NestedResults.isValidSpecLine', ->
|
63
|
+
it 'should check the lines', ->
|
64
|
+
expect(jasmine.NestedResults.isValidSpecLine('yes')).toEqual(false)
|
65
|
+
expect(jasmine.NestedResults.isValidSpecLine('expect')).toEqual(true)
|
66
|
+
expect(jasmine.NestedResults.isValidSpecLine(' expect')).toEqual(true)
|
67
|
+
expect(jasmine.NestedResults.isValidSpecLine('return expect')).toEqual(true)
|
68
|
+
expect(jasmine.NestedResults.isValidSpecLine(' return expect')).toEqual(true)
|
69
|
+
|
70
|
+
describe 'jasmine.nestedResults.parseFunction', ->
|
71
|
+
it 'should parse the function', ->
|
72
|
+
expect(jasmine.NestedResults.parseFunction("""
|
73
|
+
test
|
74
|
+
expect("cat")
|
75
|
+
return expect("dog")
|
76
|
+
""")).toEqual([
|
77
|
+
[ 'expect("cat")', 1 ],
|
78
|
+
[ 'expect("dog")', 2 ]
|
79
|
+
])
|
80
|
+
|