casperjs 1.0.0.RC1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. data/CHANGELOG.md +179 -0
  2. data/LICENSE.md +19 -0
  3. data/README.md +30 -0
  4. data/bin/bootstrap.js +292 -0
  5. data/bin/usage.txt +10 -0
  6. data/casperjs.gemspec +21 -0
  7. data/modules/casper.js +1679 -0
  8. data/modules/cli.js +138 -0
  9. data/modules/clientutils.js +595 -0
  10. data/modules/colorizer.js +129 -0
  11. data/modules/events.js +247 -0
  12. data/modules/injector.js +93 -0
  13. data/modules/mouse.js +110 -0
  14. data/modules/querystring.js +187 -0
  15. data/modules/tester.js +807 -0
  16. data/modules/utils.js +429 -0
  17. data/modules/vendors/coffee-script.js +8 -0
  18. data/modules/xunit.js +123 -0
  19. data/package.json +35 -0
  20. data/rubybin/casperjs +57 -0
  21. data/samples/bbcshots.coffee +64 -0
  22. data/samples/bbcshots.js +80 -0
  23. data/samples/cliplay.coffee +19 -0
  24. data/samples/cliplay.js +21 -0
  25. data/samples/customevents.coffee +11 -0
  26. data/samples/customevents.js +13 -0
  27. data/samples/customlogging.coffee +33 -0
  28. data/samples/customlogging.js +42 -0
  29. data/samples/download.coffee +10 -0
  30. data/samples/download.js +11 -0
  31. data/samples/dynamic.coffee +60 -0
  32. data/samples/dynamic.js +65 -0
  33. data/samples/each.coffee +14 -0
  34. data/samples/each.js +17 -0
  35. data/samples/events.coffee +34 -0
  36. data/samples/events.js +41 -0
  37. data/samples/extends.coffee +29 -0
  38. data/samples/extends.js +37 -0
  39. data/samples/googlelinks.coffee +27 -0
  40. data/samples/googlelinks.js +33 -0
  41. data/samples/googlematch.coffee +47 -0
  42. data/samples/googlematch.js +65 -0
  43. data/samples/googlepagination.coffee +40 -0
  44. data/samples/googlepagination.js +51 -0
  45. data/samples/googletesting.coffee +17 -0
  46. data/samples/googletesting.js +23 -0
  47. data/samples/logcolor.coffee +10 -0
  48. data/samples/logcolor.js +11 -0
  49. data/samples/metaextract.coffee +23 -0
  50. data/samples/metaextract.js +29 -0
  51. data/samples/multirun.coffee +37 -0
  52. data/samples/multirun.js +56 -0
  53. data/samples/screenshot.coffee +28 -0
  54. data/samples/screenshot.js +33 -0
  55. data/samples/statushandlers.coffee +15 -0
  56. data/samples/statushandlers.js +19 -0
  57. data/samples/steptimeout.coffee +37 -0
  58. data/samples/steptimeout.js +45 -0
  59. data/samples/timeout.coffee +39 -0
  60. data/samples/timeout.js +47 -0
  61. data/tests/run.js +76 -0
  62. data/tests/site/alert.html +10 -0
  63. data/tests/site/click.html +40 -0
  64. data/tests/site/confirm.html +12 -0
  65. data/tests/site/elementattribute.html +6 -0
  66. data/tests/site/error.html +10 -0
  67. data/tests/site/form.html +26 -0
  68. data/tests/site/global.html +9 -0
  69. data/tests/site/images/phantom.png +0 -0
  70. data/tests/site/index.html +17 -0
  71. data/tests/site/mouse-events.html +47 -0
  72. data/tests/site/multiple-forms.html +16 -0
  73. data/tests/site/page1.html +8 -0
  74. data/tests/site/page2.html +8 -0
  75. data/tests/site/page3.html +8 -0
  76. data/tests/site/prompt.html +12 -0
  77. data/tests/site/resources.html +16 -0
  78. data/tests/site/result.html +11 -0
  79. data/tests/site/test.html +10 -0
  80. data/tests/site/visible.html +17 -0
  81. data/tests/site/waitFor.html +22 -0
  82. data/tests/suites/casper/agent.js +24 -0
  83. data/tests/suites/casper/capture.js +31 -0
  84. data/tests/suites/casper/click.js +61 -0
  85. data/tests/suites/casper/confirm.js +21 -0
  86. data/tests/suites/casper/elementattribute.js +8 -0
  87. data/tests/suites/casper/encode.js +20 -0
  88. data/tests/suites/casper/evaluate.js +27 -0
  89. data/tests/suites/casper/events.js +38 -0
  90. data/tests/suites/casper/exists.js +9 -0
  91. data/tests/suites/casper/fetchtext.js +9 -0
  92. data/tests/suites/casper/flow.coffee +38 -0
  93. data/tests/suites/casper/formfill.js +69 -0
  94. data/tests/suites/casper/global.js +9 -0
  95. data/tests/suites/casper/history.js +21 -0
  96. data/tests/suites/casper/hooks.js +41 -0
  97. data/tests/suites/casper/logging.js +38 -0
  98. data/tests/suites/casper/mouseevents.js +27 -0
  99. data/tests/suites/casper/onerror.js +19 -0
  100. data/tests/suites/casper/open.js +73 -0
  101. data/tests/suites/casper/prompt.js +17 -0
  102. data/tests/suites/casper/resources.coffee +24 -0
  103. data/tests/suites/casper/start.js +15 -0
  104. data/tests/suites/casper/steps.js +32 -0
  105. data/tests/suites/casper/viewport.js +11 -0
  106. data/tests/suites/casper/visible.js +17 -0
  107. data/tests/suites/casper/wait.js +27 -0
  108. data/tests/suites/casper/xpath.js +32 -0
  109. data/tests/suites/cli.js +125 -0
  110. data/tests/suites/clientutils.js +84 -0
  111. data/tests/suites/coffee.coffee +19 -0
  112. data/tests/suites/fs.js +36 -0
  113. data/tests/suites/http_status.js +28 -0
  114. data/tests/suites/injector.js +64 -0
  115. data/tests/suites/tester.js +121 -0
  116. data/tests/suites/utils.js +209 -0
  117. data/tests/suites/xunit.js +16 -0
  118. data/tests/testdir/01_a/abc.js +0 -0
  119. data/tests/testdir/01_a/def.js +0 -0
  120. data/tests/testdir/02_b/abc.js +0 -0
  121. data/tests/testdir/03_a.js +0 -0
  122. data/tests/testdir/03_b.js +0 -0
  123. data/tests/testdir/04/01_init.js +0 -0
  124. data/tests/testdir/04/02_do.js +0 -0
  125. metadata +192 -0
@@ -0,0 +1,16 @@
1
+ casper.test.comment('phantom.Casper.XUnitExporter');
2
+
3
+ xunit = require('xunit').create();
4
+ xunit.addSuccess('foo', 'bar');
5
+ casper.test.assertMatch(xunit.getXML(), /<testcase classname="foo" name="bar"/, 'XUnitExporter.addSuccess() adds a successful testcase');
6
+ xunit.addFailure('bar', 'baz', 'wrong', 'chucknorriz');
7
+ casper.test.assertMatch(xunit.getXML(), /<testcase classname="bar" name="baz"><failure type="chucknorriz">wrong/, 'XUnitExporter.addFailure() adds a failed testcase');
8
+
9
+ // named classname
10
+ xunit = require('xunit').create();
11
+ xunit.addSuccess(require('fs').workingDirectory + '/plop.js', 'It worked');
12
+ casper.test.assertMatch(xunit.getXML(), /<testcase classname="plop" name="It worked"/, 'XUnitExporter.addSuccess() handles class name');
13
+ xunit.addSuccess(require('fs').workingDirectory + '/plip.js', 'Failure');
14
+ casper.test.assertMatch(xunit.getXML(), /<testcase classname="plip" name="Failure"/, 'XUnitExporter.addFailure() handles class name');
15
+
16
+ casper.test.done();
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,192 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: casperjs
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: true
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ - RC1
10
+ version: 1.0.0.RC1
11
+ platform: ruby
12
+ authors:
13
+ - Nicolas Perriault
14
+ autorequire:
15
+ bindir: rubybin
16
+ cert_chain: []
17
+
18
+ date: 2012-07-03 00:00:00 +08:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: |-
23
+ CasperJS is a navigation scripting & testing utility for [PhantomJS](http://www.phantomjs.org/).
24
+ It eases the process of defining a full navigation scenario and provides useful
25
+ high-level functions, methods & syntaxic sugar for doing common tasks.
26
+ email:
27
+ - nperriault@gmail.com
28
+ executables:
29
+ - casperjs
30
+ extensions: []
31
+
32
+ extra_rdoc_files:
33
+ - LICENSE.md
34
+ - README.md
35
+ files:
36
+ - LICENSE.md
37
+ - README.md
38
+ - CHANGELOG.md
39
+ - package.json
40
+ - casperjs.gemspec
41
+ - bin/bootstrap.js
42
+ - bin/usage.txt
43
+ - modules/casper.js
44
+ - modules/cli.js
45
+ - modules/clientutils.js
46
+ - modules/colorizer.js
47
+ - modules/events.js
48
+ - modules/injector.js
49
+ - modules/mouse.js
50
+ - modules/querystring.js
51
+ - modules/tester.js
52
+ - modules/utils.js
53
+ - modules/vendors/coffee-script.js
54
+ - modules/xunit.js
55
+ - samples/bbcshots.coffee
56
+ - samples/bbcshots.js
57
+ - samples/cliplay.coffee
58
+ - samples/cliplay.js
59
+ - samples/customevents.coffee
60
+ - samples/customevents.js
61
+ - samples/customlogging.coffee
62
+ - samples/customlogging.js
63
+ - samples/download.coffee
64
+ - samples/download.js
65
+ - samples/dynamic.coffee
66
+ - samples/dynamic.js
67
+ - samples/each.coffee
68
+ - samples/each.js
69
+ - samples/events.coffee
70
+ - samples/events.js
71
+ - samples/extends.coffee
72
+ - samples/extends.js
73
+ - samples/googlelinks.coffee
74
+ - samples/googlelinks.js
75
+ - samples/googlematch.coffee
76
+ - samples/googlematch.js
77
+ - samples/googlepagination.coffee
78
+ - samples/googlepagination.js
79
+ - samples/googletesting.coffee
80
+ - samples/googletesting.js
81
+ - samples/logcolor.coffee
82
+ - samples/logcolor.js
83
+ - samples/metaextract.coffee
84
+ - samples/metaextract.js
85
+ - samples/multirun.coffee
86
+ - samples/multirun.js
87
+ - samples/screenshot.coffee
88
+ - samples/screenshot.js
89
+ - samples/statushandlers.coffee
90
+ - samples/statushandlers.js
91
+ - samples/steptimeout.coffee
92
+ - samples/steptimeout.js
93
+ - samples/timeout.coffee
94
+ - samples/timeout.js
95
+ - tests/run.js
96
+ - tests/site/alert.html
97
+ - tests/site/click.html
98
+ - tests/site/confirm.html
99
+ - tests/site/elementattribute.html
100
+ - tests/site/error.html
101
+ - tests/site/form.html
102
+ - tests/site/global.html
103
+ - tests/site/images/phantom.png
104
+ - tests/site/index.html
105
+ - tests/site/mouse-events.html
106
+ - tests/site/multiple-forms.html
107
+ - tests/site/page1.html
108
+ - tests/site/page2.html
109
+ - tests/site/page3.html
110
+ - tests/site/prompt.html
111
+ - tests/site/resources.html
112
+ - tests/site/result.html
113
+ - tests/site/test.html
114
+ - tests/site/visible.html
115
+ - tests/site/waitFor.html
116
+ - tests/suites/casper/agent.js
117
+ - tests/suites/casper/capture.js
118
+ - tests/suites/casper/click.js
119
+ - tests/suites/casper/confirm.js
120
+ - tests/suites/casper/elementattribute.js
121
+ - tests/suites/casper/encode.js
122
+ - tests/suites/casper/evaluate.js
123
+ - tests/suites/casper/events.js
124
+ - tests/suites/casper/exists.js
125
+ - tests/suites/casper/fetchtext.js
126
+ - tests/suites/casper/flow.coffee
127
+ - tests/suites/casper/formfill.js
128
+ - tests/suites/casper/global.js
129
+ - tests/suites/casper/history.js
130
+ - tests/suites/casper/hooks.js
131
+ - tests/suites/casper/logging.js
132
+ - tests/suites/casper/mouseevents.js
133
+ - tests/suites/casper/onerror.js
134
+ - tests/suites/casper/open.js
135
+ - tests/suites/casper/prompt.js
136
+ - tests/suites/casper/resources.coffee
137
+ - tests/suites/casper/start.js
138
+ - tests/suites/casper/steps.js
139
+ - tests/suites/casper/viewport.js
140
+ - tests/suites/casper/visible.js
141
+ - tests/suites/casper/wait.js
142
+ - tests/suites/casper/xpath.js
143
+ - tests/suites/cli.js
144
+ - tests/suites/clientutils.js
145
+ - tests/suites/coffee.coffee
146
+ - tests/suites/fs.js
147
+ - tests/suites/http_status.js
148
+ - tests/suites/injector.js
149
+ - tests/suites/tester.js
150
+ - tests/suites/utils.js
151
+ - tests/suites/xunit.js
152
+ - tests/testdir/01_a/abc.js
153
+ - tests/testdir/01_a/def.js
154
+ - tests/testdir/02_b/abc.js
155
+ - tests/testdir/03_a.js
156
+ - tests/testdir/03_b.js
157
+ - tests/testdir/04/01_init.js
158
+ - tests/testdir/04/02_do.js
159
+ has_rdoc: true
160
+ homepage: http://casperjs.org/
161
+ licenses:
162
+ - MIT
163
+ post_install_message:
164
+ rdoc_options: []
165
+
166
+ require_paths:
167
+ - lib
168
+ required_ruby_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ segments:
173
+ - 0
174
+ version: "0"
175
+ required_rubygems_version: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">"
178
+ - !ruby/object:Gem::Version
179
+ segments:
180
+ - 1
181
+ - 3
182
+ - 1
183
+ version: 1.3.1
184
+ requirements:
185
+ - PhantomJS v1.5
186
+ rubyforge_project:
187
+ rubygems_version: 1.3.6
188
+ signing_key:
189
+ specification_version: 3
190
+ summary: Navigation scripting & testing utility for PhantomJS
191
+ test_files: []
192
+