Permalink
Browse files

Adds unit tests, e2e tests, manual tests, and travis.yml

- Move /demo/ to /test/manual/ as these are manual test files
- gulp test-e2e will use protractor + the /test/manual files to automate manual tests
- gulp test-unit will run unit tests
- gulp tdd will run the unit tests while watching all files for changes (repeat tests)
- Fix delete-link change color when sort disabled, add classes for validation help text
- Add classes to inputs & links
- jshint updates
- Add unit test for provider
- Update README.md
- Add validation tests, add validate.sh and travis.yml
  - travis will run:
  - gulp test-unit
  - ./validate.sh to validate the build
- add _tmp-css task for validate.sh to validate build
- update travis.yml to use xvfb for firefox support
  • Loading branch information...
benjaminapetersen committed Aug 24, 2016
1 parent 5bca008 commit 64df409446251143ee1f438e196996a062f36429
Showing with 3,219 additions and 489 deletions.
  1. +1 −1 .gitignore
  2. +15 −0 .travis.yml
  3. +4 −0 README.md
  4. +1 −1 bower.json
  5. +0 −251 demo/validators.html
  6. +6 −2 dist/angular-key-value-editor.css
  7. +1 −1 dist/compiled-templates.js
  8. +81 −14 gulpfile.js
  9. +16 −14 index.html
  10. +13 −2 package.json
  11. +4 −0 src/directives/key-value-editor.js
  12. +2 −1 src/less/angular-key-value-editor.less
  13. +15 −14 src/views/key-value-editor.html
  14. +45 −0 test/.jshintrc
  15. +84 −0 test/README.md
  16. +29 −0 test/e2e/cannot-add.js
  17. +15 −0 test/e2e/cannot-delete.js
  18. +15 −0 test/e2e/cannot-sort.js
  19. +41 −0 test/e2e/default.js
  20. +51 −0 test/e2e/helpers/angularRoot.js
  21. +14 −0 test/e2e/helpers/hasClass.js
  22. +227 −0 test/e2e/helpers/keyValueEditor.js
  23. +25 −0 test/e2e/helpers/navigate.js
  24. +17 −0 test/e2e/is-readonly.js
  25. +133 −0 test/e2e/validation.js
  26. +52 −0 test/karma.conf.js
  27. +172 −0 test/manual/__test__.html
  28. +0 −1 {demo → test/manual}/app.js
  29. 0 {demo → test/manual}/bc.js
  30. 0 {demo → test/manual}/build.js
  31. +150 −0 test/manual/cannot-add.html
  32. +152 −0 test/manual/cannot-delete.html
  33. +152 −0 test/manual/cannot-sort.html
  34. 0 {demo → test/manual}/ctrl-owc.js
  35. +7 −14 {demo → test/manual}/ctrl.js
  36. +1 −2 {demo → test/manual}/ctrl_dc.js
  37. +9 −18 {demo → test/manual}/dc.html
  38. 0 {demo → test/manual}/dc.js
  39. +12 −16 {demo → test/manual}/headings.html
  40. +11 −13 {demo → test/manual}/icons.html
  41. +153 −0 test/manual/is-readonly.html
  42. +10 −11 {demo → test/manual}/keys-only.html
  43. +12 −13 demo/index.html → test/manual/many-editors-different.html
  44. +214 −0 test/manual/many-editors-shared.html
  45. +266 −0 test/manual/many-with-validation.html
  46. +11 −13 {demo → test/manual}/optional-link.html
  47. +12 −13 {demo → test/manual}/owc.html
  48. +11 −13 {demo → test/manual}/placeholders.html
  49. +11 −13 {demo → test/manual}/policy.html
  50. 0 {demo → test/manual}/policy.js
  51. 0 {demo → test/manual}/services.js
  52. +123 −0 test/manual/single-default.html
  53. +11 −13 demo/one.html → test/manual/single-with-validation.html
  54. +9 −11 {demo → test/manual}/tab-focus.html
  55. +11 −13 {demo → test/manual}/value-alt.html
  56. +9 −11 {demo → test/manual}/values-only.html
  57. +23 −0 test/protractor.conf.js
  58. +69 −0 test/unit/helpers/prep.js
  59. +3 −0 test/unit/spec/README.md
  60. +30 −0 test/unit/spec/__template__.spec.js
  61. +83 −0 test/unit/spec/directives/add-row-link.spec.js
  62. +160 −0 test/unit/spec/directives/defaults.spec.js
  63. +75 −0 test/unit/spec/directives/header.spec.js
  64. +136 −0 test/unit/spec/directives/validation.spec.js
  65. +188 −0 test/unit/spec/services/key-value-editor-utils.spec.js
  66. +16 −0 validate.sh
View
@@ -1,4 +1,4 @@
.DS_Store
.tmp
/node_modules
/bower_components
View
@@ -0,0 +1,15 @@
language: node_js
node_js:
- "4"
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
before_script:
- npm install -g gulp
- npm install -g bower
- npm install
- bower install
script:
- gulp validate-dist
- gulp test-unit
View
@@ -7,6 +7,10 @@ A simple UI for editing key-value pairs
This key-value-editor is based on the bootstrap based framework [Patternfly](https://www.patternfly.org/#_). Patternfly or a similar boostrap based framework should be present for proper layout rendering. Icons are from font awesome. Alternative layouts with a different framework could be achieved by replacing the `key-value-editor.html` template which is pre-compiled into `compiled-templates.js` for convenience.
## Tests
See the [Test Readme.md file](test/README.md) for details about running tests.
## Basic usage:
Add the `key-value-editor` in html and provide it some data via the entries attribute:
View
@@ -1,7 +1,7 @@
{
"name": "angular-key-value-editor",
"description": "A simple UI for editing key-value pairs",
"version": "2.7.4",
"version": "2.8.0",
"main": [
"dist/angular-key-value-editor.css",
"dist/angular-key-value-editor.js",
View

This file was deleted.

Oops, something went wrong.
@@ -18,12 +18,16 @@
padding: 6px;
vertical-align: middle;
}
.key-value-editor .as-sortable-item-delete {
.key-value-editor .as-sortable-item-delete,
.key-value-editor .as-sortable-DISABLED-item-delete {
color: #333;
}
.key-value-editor .as-sortable-item-delete:hover,
.key-value-editor .as-sortable-DISABLED-item-delete:hover,
.key-value-editor .as-sortable-item-delete:focus,
.key-value-editor .as-sortable-item-delete:active {
.key-value-editor .as-sortable-DISABLED-item-delete:focus,
.key-value-editor .as-sortable-item-delete:active,
.key-value-editor .as-sortable-DISABLED-item-delete:active {
text-decoration: none;
}
.key-value-editor .as-sortable-item-handle {
Oops, something went wrong.

0 comments on commit 64df409

Please sign in to comment.