Skip to content
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

Fix signup and fields #568

Closed
wants to merge 32 commits into from
Closed

Fix signup and fields #568

wants to merge 32 commits into from

Conversation

eikaramba
Copy link

This should fix the not working signup and that the password is send to the client

DaftMonk and others added 30 commits August 23, 2014 17:40
fix(app-config): Use parentheses to fix string concat in config
- Update tests and add new test for changed password
- User.authenticate() User.makeSalt() and User.encryptPassword() public API remains same
- User.authenticate() User.makeSalt() and User.encryptPassword() callbacks are optional

- Change User schema from hashedPassword to password
- Remove unnecessary virtual attribute User.password, getters and setters are not async
Changes:
- add `mocha.conf.js` and use it as a `require` in `mochaTest` task
- switch `should.js` for `mocha-chai`
- change server-side test assertions to user chai assertions

Breaking Changes:
- should.js is no longer included, chai assertions should be used instead.
Changes:
- split server tests into `unit` and `e2e` type test
- adjust `mochaTest` and `test:server` tasks to reflect the two types of tests
- implement `grunt-mocha-istanbul` task for server-side code coverage
- add `test:coverage` task
- improve `mocha.conf.js`
- add sinon, expect, and assert as globals to `server/.jshintrc-spec`
- add `proxyquire` to the app for better stubbing in unit tests
- improve test to reflect recent changes and to lay ground work for more coverage

Grunt Task `test`:
The grunt 'test' task now has a 'coverage' target. Used like so `grunt test:coverage`.
This task will run istanbul for the server unit tests and e2e test separately.
The resulting coverage reports will be placed in `coverage/(unit|e2e)`. There is also an option
for the `test:coverage` task, possibilities for option are:
- `unit`
- `e2e`
- `check`

`test:coverage:check` will check the coverage reports for both `unit` and `e2e` and
report whether or not they meet the required coverage.
feat(server-tests): code coverage and e2e
Changes:
- add missing `option` argument from `test` task
- define `istanbul_check_coverage` with `jit-grunt`
- place server coverage reports in their own folder: `coverage/server`
fix(server-tests): `test:coverage` task
Conflicts:
	app/templates/server/api/user(auth)/user.model.spec.js
Changes:
- add `(js)` filter to the js files in `client/components/socket`

Closes #530
Changes:
- `genFiles(ops)` creates an array of expected files based on options given
- test for generated files on every set of tests
- test for unexpected files
- use testExec to be more DRY

Exposes a bug with `client/components/socket`:
`socket.service.js` and `socket.mock.js` are not filtered.
See #530
test(gen): make tests more strict and DRY
fix(gen): filter `client/components/socket` js files
Changes:
- remove unneeded code
- use runTest for endpoints as well
- test endpoints with different options
- test endpoints with various cased named

Exposes Bug:
See #540
feat (mongoose): use mongoose-bird to promisify the mongoose API
test(gen): clean up code and test more endpoint combinations
…ack into pr/543

Conflicts:
	endpoint/templates/name.controller.js
Changes:
- getCurrentUser, isLoggedIn, and isAdmin are now sync if no arg and async with an arg
- Use Error first callback signature where applicable
- Remove unused arguments from Auth service
- Remove isLoggedInAsync
- Switch use of isLoggedInAsync to isLoggedIn
- Add/Improve comments
- Fix client/app/account(auth)/settings/settings.controller(js).js

Breaking Changes:
- Callbacks that return Errors, use 'Error first' signature

Closes #456
Changes:
- Use `ui-sref` instead of `href` or `ng-href` when ui-router is chosen
- Use `ui-sref-active` instead of `ng-class='{active: isActive()}'` when ui-router is chosen
- Use `$state.go()` where applicable, when ui-router is chosen
- Use `$scope.menu[n].state` instead of `$scope.menu[n].link` when ui-router is chosen (attempt to remove possible confusion)
- Omit `$scope.isActive` when ui-router is chosen
- Simplify `navbar(jade).jade` templating (remove extra `<% if (filters.auth) %>` tag)
- Add `/logout` route for both ng-route and ui-router
- Use `$routeChangeStart` or `$stateChangeStart` to pass refering route or state to `/logout`
- Add `stateMock` for testing `$state` transitions
- Use `stateMock` in main.controller for expecting template requests from state transistions

Closes #331
@DaftMonk
Copy link
Member

This PR should be made against canary.

@DaftMonk
Copy link
Member

Ok, I just read over the original issue and I'll just commit the fix myself. Thanks for the PR!

DaftMonk added a commit that referenced this pull request Sep 21, 2014
@DaftMonk DaftMonk closed this Sep 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants