Comments (8)
@tmeasday let us know if you want to pair on this at all, @sanjo and I would be happy to help
from todos.
@samhatoum that sounds useful; let me have a go at them myself (perhaps sometime this week), and get back to you.
from todos.
OK, I built a first acceptance test, a few questions @samhatoum
- Is there a way to specify the URL to connect to on the commandline? This line seems bad if i want to run the tests pointing somewhere else: 8e8a712#diff-98f10856893a7c43b98eb1f461e47173R12
- Is there a way to set the inter-step timeout? (ideally on the commandline). In the past I've tended to need set a small delay between steps to let animations etc play out (see 8e8a712#diff-98f10856893a7c43b98eb1f461e47173R16)
- It'd be nice to be able to write ES2015. I guess this is a bit out of scope though ;)
from todos.
Is there a way to specify the URL to connect to on the commandline? This line seems bad if i want to run the tests pointing somewhere else: 8e8a712#diff-98f10856893a7c43b98eb1f461e47173R12
I would create a hooks file and use a before
/beforeEach
hook and have that to go the url of the app. It is very possible when doing acceptance tests to have an app that is distributed over many locations. You might have two apps running in a given setup, like a marketing/registration app running, and the main app. Another use-case is to use smoke-tests, where you might send an email from your app, then actually go and check it arrived in a webmail client.
Another point to bear in mind is resetting data. I tend to clear state and revisit the app between tests to ensure a completely clean slate. I use our cleaner package. It's a good practice to clean then reload the page between specs.
We could implement it that Chimp automatically navigates to the app when a URL is provided on the command line, though it may not always be desirable, especially if no data has been setup yet.
Is there a way to set the inter-step timeout? (ideally on the commandline). In the past I've tended to need set a small delay between steps to let animations etc play out (see 8e8a712#diff-98f10856893a7c43b98eb1f461e47173R16)
I believe --timeoutsImplicitWait
is what you want. We already set that to a default of 3000ms. Though what is happening in your case is that the .list-todo
is visible. You might want to wait for the list length to change instead using waitUntil
. This is a common UI testing gotcha!
It'd be nice to be able to write ES2015. I guess this is a bit out of scope though ;)
Already supported out the box. Just write ES6! You can use Mocha's standard --compilers=es6:babel-core
option on the cli too.
Also, we added support for config files recently, so if you want to save writing command-line args all the time, create a chimp.js
file locally and put this in it:
module.exports = {
// - - - - CHIMP - - - -
watch: false,
watchTags: '@focus',
mocha: true,
// - - - - MOCHA - - - -
path: './tests',
// use other compilers
// compilers: 'es6:babel-core/register',
// '- - - - DEBUGGING - - - -
// log: 'info',
// debug: false,
// seleniumDebug: false,
// webdriverLogLevel: false,
// debugBrkMocha: 5858,
};
I will soon document all the options, and you can look here for a reference of what is supported.
Let me know if you need anything else.
from todos.
Be sure to be using v0.28.2
from todos.
We could implement it that Chimp automatically navigates to the app when a URL is provided on the command line, though it may not always be desirable, especially if no data has been setup yet.
Fair enough. It might be useful to be able to set something via commandline that you can read in the script however. That would make it simpler to point my test at different deployments of the app.
Already supported out the box. Just write ES6!
I seem to get errors about () => {}
(Unexpected token )
. With or without --compilers=es6:babel-core
Also, we added support for config files recently
Did you consider using a field in package.json
for this? I think quite a few other node tools use this convention for configuration. (adding a chimp.js
file is going to mess up my project right?)
from todos.
It might be useful to be able to set something via commandline that you can read in the script however. That would make it simpler to point my test at different deployments of the app.
Would env vars work? like MY_URL=hello chimp
, and then use process.env.MY_URL
I seem to get errors about () => {} (Unexpected token ). With or without --compilers=es6:babel-core
I might have spoken too soon! It works for Cucumber out the box, I'll add it to Mocha shortly.
Did you consider using a field in package.json for this? I think quite a few other node tools use this convention for configuration. (adding a chimp.js file is going to mess up my project right?)
Good idea to support config in package.json
. You can also put the file under .config/chimp.js
so that Meteor ignores it, then pass the file to chimp as the first param, like this:
chimp .config/chimp.json <other options>
from todos.
@tmeasday I have added ES2015 support in mocha tests in chimp 0.29.0. No options needed.
from todos.
Related Issues (20)
- Apollo branch needs to be updated to reflect current Apollo project. HOT 5
- Any interest in a Vue port? HOT 17
- Cannot serve the built app through an ad-hoc local network
- Update React Todo to use TypeScript since PropTypes deprecation HOT 1
- replace createContainer with withTracker HOT 1
- CSS Import?
- http://todos.mysite.com redirect to https://todos.mysite.com HOT 1
- Current version won't start (last commit 59f6621 on 27 Apr 2017) HOT 1
- Add Server Side Rendering and Dynamic Imports to React To Dos HOT 1
- Why are collections not imported or defined in the register-api / api.js file ? Where are they imported and defined? HOT 3
- Where are collections defined and imported? HOT 1
- Why the code looks so messy? HOT 2
- ant-design branch ready to pull HOT 2
- Uncaught Error: Target container is not a DOM element. HOT 6
- Error Connection Websocket
- Cannot find sockjs HOT 1
- React branch update with hooks - New react/typescript branch? HOT 5
- todos example doesn't run, error in meteor npm i
- german language HOT 1
- Official Example doesn't update to latest version 1.11.x HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from todos.