blazer82 / meteor-casperjs Goto Github PK
View Code? Open in Web Editor NEWCasperJS end to end test integration for meteor using velocity
License: MIT License
CasperJS end to end test integration for meteor using velocity
License: MIT License
Please add a license, even if you are no longer interested in maintaining this project, so that others may legally continue to use (and fork) it.
If you are unfamiliar with software licensing, the MIT License is a common choice with permissive terms.
Hi there, I started a vanilla project, added casperjs + example tests and ran into this error:
Exception in queued task: TypeError: Cannot read property 'testsuite' of undefined
at packages/nblazer:casperjs/nblazer:casperjs.coffee:75:3
at Parser.<anonymous> (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/lib/xml2js.js:384:20)
at Parser.emit (events.js:95:17)
at Object.onclosetag (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/lib/xml2js.js:348:26)
at emit (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/node_modules/sax/lib/sax.js:615:33)
at emitNode (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/node_modules/sax/lib/sax.js:620:3)
at closeTag (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/node_modules/sax/lib/sax.js:861:5)
at Object.write (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/node_modules/sax/lib/sax.js:1294:29)
at Parser.exports.Parser.Parser.parseString (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/lib/xml2js.js:403:31)
at Parser.parseString (/home/knut/.meteor/packages/nblazer_casperjs/.0.1.6.ag867e++os+web.browser+web.cordova/npm/node_modules/xml2js/lib/xml2js.js:6:61)
Exception in queued task: Error: Unknown id for changed: /home/knut/Dokumente/Programming/meteor/playground/casperjs/tests/casperjs/sampleTest.coffee
at self.applyChange.changed (packages/minimongo/observe.js:65:1)
at packages/mongo/observe_multiplex.js:163:1
at Array.forEach (native)
at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
at Object.task (packages/mongo/observe_multiplex.js:157:1)
at [object Object]._.extend._run (packages/meteor/fiber_helpers.js:145:1)
at packages/meteor/fiber_helpers.js:123:1
any ideas? casperjs is fully installed
Please read my comment regarding the breaking change in the new velocity:core release: https://github.com/meteor-velocity/velocity/issues/96#issuecomment-90531211
Thanks
PhantomJS 2.0 removes CoffeeScript support (ariya/phantomjs#12410), which causes CasperJS to hang until killed on .coffee
files, resulting in an ENOENT error in meteor-casperjs
on the xml report files that never get created.
We could remove coffee support from meteor-casperjs
to match, but I'd strongly prefer not to.
The solution would be to compile the coffee files to a temporary location in runTestFile()
prior to running the tests.
HOWEVER CasperJS is already aware of this issue (https://github.com/n1k0/casperjs/issues/1203), and they are currently considering adding that compile step themselves.
If we're feeling patient, we can wait and see where https://github.com/n1k0/casperjs/issues/1203 goes on their end.
I've just created a new app and added nblazer:casperjs
. I've created a file in tests/casperjs/ directory with the code of the example and it's all ok.
But when I add sanjo:jasmine
I get the error "ReferenceError: casper is not defined".
Maybe it's not a problem of nblazer:casperjs
but of sanjo:jasmine
, I don't know. Have you got any clue? Thanks in advance.
Hi, I'm trying to use this with velocity:html-reporter
and am receiving the following error after clicking on the button in html-reporter that adds a Casperjs test:
meteor
[[[[[ ~/code/meteor.chipcastle.com ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
I20141210-12:15:47.406(-6)? [casperjs] Run tests for file /Users/chip/code/meteor.chipcastle.com/tests/casperjs/sampleTest.coffee...
I20141210-12:15:48.219(-6)? Exception in queued task: Error: ENOENT, no such file or directory '/Users/chip/code/meteor.chipcastle.com/tests/.reports/casperjs/sampleTest.coffee.xml'
I20141210-12:15:48.220(-6)? at Object.fs.openSync (fs.js:432:18)
I20141210-12:15:48.221(-6)? at Object.fs.readFileSync (fs.js:289:15)
I20141210-12:15:48.221(-6)? at parseReport (packages/nblazer:casperjs/nblazer:casperjs.coffee:74:17)
I20141210-12:15:48.221(-6)? at Object.runTestFile (packages/nblazer:casperjs/nblazer:casperjs.coffee:61:1)
I20141210-12:15:48.221(-6)? at observeChangesCallbacks.added (packages/minimongo/observe.js:153)
I20141210-12:15:48.221(-6)? at self.applyChange.added (packages/minimongo/observe.js:53)
I20141210-12:15:48.221(-6)? at packages/mongo/observe_multiplex.js:163
I20141210-12:15:48.221(-6)? at Array.forEach (native)
I20141210-12:15:48.221(-6)? at Function._.each._.forEach (packages/underscore/underscore.js:105)
I20141210-12:15:48.221(-6)? at Object.task (packages/mongo/observe_multiplex.js:157)
My project has the following packages installed:
accounts-base 1.1.2 A user account system
accounts-password 1.0.4 Password support for accounts
accounts-ui 1.1.3 Simple templates to add login widgets to an app
alanning:roles 1.2.13 Role-based authorization
anti:fake 0.4.1 Random text and data generator
cmather:handlebars-server 0.2.0* Allows handlebars templates to be defined on the server in .handlebars files
coffeescript 1.0.4 Javascript dialect with fewer braces and semicolons
cunneen:mailgun 0.9.1 Easily send emails using Mailgun as your email provider.
dburles:collection-helpers 1.0.1 Transform your collections with helpers that you define
dburles:factory 0.3.7 Factories for Meteor
fuatsengul:iron-router-auth 1.0.7 Iron:Router Auth for 1.0
iron:router 1.0.3 Routing specifically designed for Meteor
joshowens:accounts-entry 1.0.3 Make signin and signout their own pages with routes.
joshowens:simple-form 0.2.2 A meteorite package that makes building dynamic two way forms easy
less 1.0.11 The dynamic stylesheet language
manuelschoebel:ms-seo 0.4.1 Easily config SEO for your routes
matb33:collection-hooks 0.7.6 Extends Mongo.Collection with before/after hooks for insert/update/remove/find/findOne
meteor-platform 1.2.0 Include a standard set of Meteor packages in your app
meteorhacks:zones 1.4.0 Zone.Js integration for meteor
mrt:moment 2.8.1 Moment.js, a JavaScript date library for dates, packaged for Meteor. See http://momentjs.com.
mrt:underscore-string-latest 2.3.3 underscore.string repackaged for Meteor
nblazer:casperjs 0.1.6 CasperJS end to end test integration with velocity.
reywood:publish-composite 1.3.5 Publish a set of related documents from multiple collections with a reactive join
velocity:html-reporter 0.3.1 Reactive Velocity test reports in your app.
zimme:iron-router-active 1.0.1 Active route/path template helpers for iron:router
Any clues on how to fix or troubleshoot would be appreciated. Thanks. ๐
Looks like the package is not able to locate Velocity's resetReports method, thus failing to run the tests.
Sam Hatoum pointed out that this is not working with the latests version of Velocity because of this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.