Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
96e37bf1
...
96e37bf1d689c4acd740baa42c7ed52675eeac58
authored
2012-11-18 20:48:31 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refs #246 - jshint added to travis-ci build configuration
1 parent
2276b8d6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
6 deletions
.jshintconfig
.travis.yml
modules/casper.js
modules/clientutils.js
modules/http.js
tests/suites/casper/frames.js
tests/suites/casper/request.js
tests/suites/cli.js
.jshintconfig
View file @
96e37bf
...
...
@@ -9,6 +9,7 @@
"maxdepth": 3,
"maxstatements": 15,
"maxcomplexity": 7,
"proto": true,
"regexdash": true,
"strict": true,
"sub": true,
...
...
.travis.yml
View file @
96e37bf
...
...
@@ -2,12 +2,13 @@ branches:
only
:
-
master
before_script
:
-
"
npm
install
-g
jshint"
-
"
phantomjs
--version"
-
"
export
PHANTOMJS_EXECUTABLE='phantomjs
--local-to-remote-url-access=yes
--ignore-ssl-errors=yes'"
-
"
export
DISPLAY=:99.0"
-
"
sh
-e
/etc/init.d/xvfb
start"
script
:
-
"
DISPLAY=:99.0
./bin/casperjs
selftest"
-
"
./bin/casperjs
selftest"
after_script
:
-
"
jshint
--config=.jshintconfig
."
notifications
:
irc
:
channels
:
...
...
modules/casper.js
View file @
96e37bf
...
...
@@ -926,6 +926,7 @@ Casper.prototype.getTitle = function getTitle() {
*/
Casper
.
prototype
.
handleReceivedResource
=
function
(
resource
)
{
"use strict"
;
/*jshint maxstatements:20*/
if
(
resource
.
stage
!==
"end"
)
{
return
;
}
...
...
@@ -1109,6 +1110,7 @@ Casper.prototype.mouseEvent = function mouseEvent(type, selector) {
*/
Casper
.
prototype
.
open
=
function
open
(
location
,
settings
)
{
"use strict"
;
/*jshint maxstatements:30*/
var
baseCustomHeaders
=
this
.
page
.
customHeaders
,
customHeaders
=
settings
&&
settings
.
headers
||
{};
this
.
checkStarted
();
...
...
@@ -1297,6 +1299,7 @@ Casper.prototype.setHttpAuth = function setHttpAuth(username, password) {
*/
Casper
.
prototype
.
start
=
function
start
(
location
,
then
)
{
"use strict"
;
/*jshint maxstatements:30*/
this
.
emit
(
'starting'
);
this
.
log
(
'Starting...'
,
"info"
);
this
.
startTime
=
new
Date
().
getTime
();
...
...
modules/clientutils.js
View file @
96e37bf
...
...
@@ -41,6 +41,7 @@
* Casper client-side helpers.
*/
exports
.
ClientUtils
=
function
ClientUtils
(
options
)
{
/*jshint maxstatements:30*/
// private members
var
BASE64_ENCODE_CHARS
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
;
var
BASE64_DECODE_CHARS
=
new
Array
(
...
...
@@ -200,6 +201,7 @@
* @return Object An object containing setting result for each field, including file uploads
*/
this
.
fill
=
function
fill
(
form
,
vals
)
{
/*jshint maxcomplexity:8*/
var
out
=
{
errors
:
[],
fields
:
[],
...
...
@@ -606,6 +608,7 @@
* @param mixed value The field value to set
*/
this
.
setField
=
function
setField
(
field
,
value
)
{
/*jshint maxcomplexity:99 */
var
logValue
,
fields
,
out
;
value
=
logValue
=
(
value
||
""
);
if
(
field
instanceof
NodeList
)
{
...
...
modules/http.js
View file @
96e37bf
...
...
@@ -62,6 +62,7 @@ responseHeaders.prototype.get = function get(name){
*/
exports
.
augmentResponse
=
function
(
response
)
{
"use strict"
;
/*jshint proto:true*/
if
(
!
utils
.
isHTTPResource
(
response
))
{
return
;
}
...
...
tests/suites/casper/frames.js
View file @
96e37bf
/*global casper*/
/*global casper
__utils__
*/
/*jshint strict:false*/
casper
.
start
(
'tests/site/frames.html'
,
function
()
{
this
.
test
.
assertTitle
(
'CasperJS test frames'
);
...
...
tests/suites/casper/request.js
View file @
96e37bf
...
...
@@ -13,7 +13,7 @@ var t = casper.test, current = 0, tests = [
},
function
(
request
)
{
t
.
assertNot
(
request
.
headers
.
some
(
testHeader
),
"Casper.open() custom headers option is not persistent"
);
}
,
}
];
casper
.
on
(
'page.resource.requested'
,
function
(
request
)
{
...
...
tests/suites/cli.js
View file @
96e37bf
/*global casper*/
/*jshint strict:false*/
/*jshint strict:false
maxstatements:99
*/
var
cli
=
require
(
'cli'
),
t
=
casper
.
test
;
t
.
comment
(
'parse(), get(), has()'
);
...
...
Please
register
or
sign in
to post a comment