-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add protractor tests to CI for generator #572
Comments
Awesome I was seriously just looking into this. Several of the recent issues are best exposed through protractor. I've already written a few tests that should do the trick. |
Side question: @DaftMonk do you have much experience with writing protractor tests? I'd like to get some feedback on the ones I've put together for exposing some recent issues with |
Sure, I'll take a look. I've written a fair number of protractor tests |
One thing in particular, I'm looking for a way to clean and stub the DB for the signup/login tests. Would you suggest simply requiring the user schema and using it in |
I think that would work fine. It seems like the easiest way to clean the test DB. |
@DaftMonk I'm having an issue with Heres my require: var UserModel = require(serverConfig.root + '/server/api/user/user.model'); and in ...
// Prepare environment for tests
onPrepare: function() {
global.serverConfig = require('./server/config/environment');
}
}; |
Ok, protractor tests are running in a different process as the server; that didn't occur to me at first. Adding: // Setup mongo connection
var mongoose = require('mongoose-bird')();
mongoose.connect(serverConfig.mongo.uri, serverConfig.mongo.options); to the |
@DaftMonk when you get a chance: https://github.com/kingcody/test-fullstack/tree/test/protractor-tests |
👍 Awesome, looks good. One thing I noticed though, you don't need to do waitForAngular before calling done, protractor will do that for you. |
Cool deal, I take it you mean here |
Yep. |
Use saucelabs to allow travis to run through e2e tests on generated projects: https://docs.saucelabs.com/ci-integrations/travis-ci/
We could then add tests that ensure the whole application is working in each build by adding tests for logging in, logging out, registering, creating new items, etc.
The text was updated successfully, but these errors were encountered: