Commit Graph

32 Commits

Author SHA1 Message Date
Sujeeth
fb9d9d912c feat(user): add strict validations for username (#1574)
Idea proposed by @sparshy #1204
Suggestions, rules and tests from Trustroots @simison
Added validations on user server model
Added client side validations
Added relevant tests on user server tests
Added relevant tests on user e2e tests

Fixes #1204
2016-10-19 20:40:26 -07:00
Sujeeth
d5b8ffa50c feat(core): Add error handler for failed requests (#1557)
Add error handle for failed requests(no response from server)
Using Notification.error to show error message
Added test for the notification in Auth Interceptor

Fixes #1556
2016-10-11 20:47:29 -07:00
Mikael Korpela
07a860f6b5 feat(angular): disable Angular debug data in production (#1457)
Disable Angular debug data in production for a significant performance
boost.

Passes environment variable from template to app config and from there
to
Angular bootstrap config.

https://docs.angularjs.org/guide/production#disabling-debug-data

See #1294
2016-08-28 14:52:05 +03:00
Steve Fox
5817a484fa Add support for params in menu items
 (#1305)
* Support params to state for menu items.

* feat(core): Add support for params in menu items

Proposed by @scfox

Fixes #1304

* Removed trailing space on test.

* Changed default params to be empty object instead of empty string.
2016-07-25 14:14:39 -07:00
Aman Mavai
fde27f0d1e fix(core): Typo in menu.client.service.js (#1355)
* fixed typo in modules/core/client/services/menu.client.service.js
* fixed typo in modules/core/tests/client/menu.client.service.tests.js
2016-06-06 15:29:46 +03:00
Liran Tal
c8cbcd326f feat(logs): replacing unmaintained and vulnerable file-stream-rotator package with winston log facility (#1334)
* replacing file-stream-rotator with a better logging mechanism using winston which can be extended later for other use cases and integrations

* refactoring logger mechanism, accomodating for tests and environment variable configurations

* only enabling morgan logger if config.log.format option was defined, and disabling the app.log file transport option for the test environment

* disabling all kind of logging when in test enviroment
2016-05-22 01:03:18 +03:00
Ryan Hutchison
b2462ec86c feat(core): Modify core module to implement style guidelines.
Update the core module to implement the style guidelines.
Reduce size of init.js - moved filter logic out to it's own config.
Rename Menus to menuService
2016-03-23 15:41:57 -04:00
Marek Grzybek
d14d5130af feat(config): Deprecate JSHint in favor of ESLint
Add basic ESLint setup extending well-known Airbnb code style.

Fixes #1072, #1097
2016-03-15 19:11:12 +01:00
Joris Willems
500d1a62df feat(config): upgrade to angular 1.5
Update bower dependencies to more recent versions.
Resolved hard-coded dependency by updating file upload
PhantomJs to 2.x series for tests (@usta)
Fix assertion in tests for compatibility with MongoDB 3.2 (@rhutchison)
Improve coding style tests to avoid type errors (@ilanbiala)
Fix refresh showing flash of scrollbar in menu
Remove deprecated angular-ui-utils

Fixes #1124
2016-03-02 18:18:53 +01:00
Cody B. Daig
b12be5fca5 Merge pull request #1107 from pgrodrigues/master
fix(core): Remove duplicate angular interceptor
2015-12-28 19:41:24 -08:00
Liran Tal
0744ce5d96 fix(tests) fixing assertion test for logger which failed on undefined variable 2015-12-28 10:24:32 +02:00
Pedro Rodrigues
996976ac66 fix(core): Remove duplicate angular interceptor
Remove the interceptor defined in the users module
Update the interceptor defined in the core module
Update the respective test

Fixes #1096
2015-12-16 14:55:07 +00:00
mleanos
8cd2291a6a Enable log options for Morgan
Adds the log options, and format to the Morgan middleware in the Express
configuration.

These options are defined in the environment configurations.

The implementation derived from https://github.com/meanjs/mean/pull/254
by @lirantal, which somehow got overlooked when merging 0.4.0 into
master.

Added tests for the Logger configuration.

Added the log settings to the Test env config.

Added environment variables for the log settings in the Test &
Production env configs.

Moved the Morgan Express middleware outside of the NODE_ENV ===
'development' check. Morgan should be used in all environments, and use
the settings set in each env config.

Changed the wording of the Stream option comments in the env configs.

Added Rotating Logs functionality, and refactored the log Stream
options. Added a new npm package, FileStreamRotator, for use with
Morgan's rotating logs functionality.

Also, refactored the log configuration tests to be more maintainable.

Added more tests, and refactored test suite to use mock-fs.
2015-10-20 21:03:07 -07:00
Ilan Biala
0323696eaf Format code according to ESLint rules 2015-10-16 20:52:31 -04:00
Liran Tal
e30c3d1249 Merge pull request #957 from mleanos/seeddb-enhance-testability
Seed options - logResults
2015-10-15 17:24:28 +03:00
mleanos
037878b4ba Global Mocha timeout
Added the timeout option to the Mocha grunt task; set to 10000.

Removed the individual test suite timeouts, for all server tests.

Also, added global timeout for Mocha gulp task.
2015-10-10 23:52:08 -07:00
mleanos
32e0d126ca Synchronous tests
Removed the done() callback method from the config tests that aren't
truly asynchronous.
2015-10-09 16:14:14 -07:00
mleanos
75cf74537a Formatting and Indentation
Changes to formatting and indentation.
2015-10-09 14:06:29 -07:00
mleanos
0560062eab Seed options - logResults
Added an options object to the database seed configuration. Currently,
the only option implemented is `logResults`; set using the seedDB env
config
options (default to "true").

Modified the definition of the env config for seedDB. It's now an
object, with
options.

Setting the logResults option is set to `false` in the core
configuration server test suite.

Also, fixed an issue with how env configs were reading the seedDB
setting from the env variables. Previously, the config was getting set
by
looking for merely the existence of the env variable (MONGO_SEED).
However,
if this setting existed but was set to "false", the seedDB would be
turned on.

Added the SeedDB user details to the env config, and seedDB options.

Added tests to the core server config test suite

should have seedDB configuration set for "regular" user
should have seedDB configuration set for admin user
should seed admin, and "regular" user accounts when NODE_ENV is set to
"test" when they already exist
should ONLY seed admin user account when NODE_ENV is set to "production"
with custom admin
should seed admin, and "regular" user accounts when NODE_ENV is set to
"test" with custom options
should NOT seed admin user account if it already exists when NODE_ENV is
set to "production"
should NOT seed "regular" user account if missing email when NODE_ENV
set to "test"

Added support for environment variables to seedDB env configs; currently
only supporting username & email.

Refactored how the SeedDB rejects were being handled
2015-10-09 13:48:11 -07:00
jloveland
b07af94255 adding return done() to tests 2015-10-09 12:45:16 -04:00
jloveland
2eb0b0970d adding ability to configure session.secret in local env config 2015-10-04 20:45:47 -04:00
mleanos
3b375e62d8 Mocha test timeouts [fixes #955]
Added a timeout of 10000 ms to each server test file. This is an attempt
to solve the timeout issues that we're experiencing with the Mocha
tests. Especially, this is hoping to address the build fails that are
caused by such timeouts.

Issue is described in https://github.com/meanjs/mean/issues/955
2015-09-30 19:50:07 -07:00
Liran Tal
6f8b5bfd58 adding tests for meanjs core server functionality 2015-09-28 11:29:42 +03:00
Andrew Throener
ed89f9ea08 Unauthorized client routing
Added Auth Interceptor tests

cleaned up test

Update routes
2015-08-24 17:04:36 -05:00
cdriscol
ec3af65661 Fixing Menus service remove bugs. 2015-08-15 12:40:00 -06:00
Cody B. Daig
1f7bfddf0b Make tests pass 2015-08-14 16:01:16 -06:00
Cody B. Daig
e68b4226bd Make TopBar Public By Default 2015-08-14 16:01:16 -06:00
Ryan Hutchison
ef3a3f9548 formatting reboot (space-2 and consistency)
JSCS fixes

update editorconfig
2015-07-31 10:04:02 -04:00
cdriscol
d5ea5c99d2 Adding client test coverage. 2015-07-29 06:51:38 -06:00
cdriscol
9e7239baf7 appending a base tag to the head before jasmine tests run. 2015-07-19 22:24:39 -06:00
Christian Berendt
e027f4025b Add missing newline at the end of text files
On Unix it is common to have a newline at the end of text files.
2015-02-16 21:39:55 +01:00
Amos Haviv
ab81d61bd3 New 0.4 version 2014-11-10 23:12:33 +02:00