-
Notifications
You must be signed in to change notification settings - Fork 23
JS Test Setup #56
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
base: master
Are you sure you want to change the base?
JS Test Setup #56
Conversation
When bundling the project angularjs-rails whines about there being no source for the .36 version. Bump to fix.
Teaspoon environment file and helper created. To really do testing in Angular you apparently need the angular-mocks library. Pulled this into the support section and included it into the spec_helper.
Since the dummy app is used to grok the way the gem modifies Spree/Rails, let's load it during the test. Redefine RAILS_ROOT and require to coincide with dummy.
Teaspoon needs a few assets built for precompilation in the dummy app. Add them to the dummy assets initializer.
When running the Javascript suite of tests, it will be run using PhantomJS. Allow everyone running these tests to have easy knowledge of the version of PhantomJS. This file can be used with the PhantomENV library. Basically rbenv but for PhantomJS
|
Currently reads 0 failing tests. I set it up to use Mocha and Chai as test frameworks and assertion libs. However, this is completely modifiable. |
|
@braidn Looks good! |
|
Hey all, I would like to resurrect this. Is this still a want/request? Anyone have some sensible places I should start when writing some tests? |
|
@braidn this is very needed, have not forgot about it. Was having issues with getting capybara features to pass in the CI, so wanted to resolve that before merging this. Thinking the best places to start doing JS testing is either the controller or model layer. The capybara tests will handle the e2e tests. |
|
@joshnuss this shouldn't touch or cause any issue with capybara e2e tests. It should setup a layer that is perfect for model/controller testing. Unless the teaspoon dependencies are causing items to break and I missed that. |
Setup js testing for angular/js.
Will be used for testing controllers/directives/models