Commit Graph

14 Commits

Author SHA1 Message Date
Paul Karikh 56b360126a Add patched version of angular-ui bootstrap lib
This patch adds patched version of angular-ui/bootstrap lib.
We need to patch it because of typeahead - one of bootstrap
components. This component does not support
ngModelOptions="{getterSetter: true}", which we need for
barricade.js integration.
Angular-ui/bootstrap upstream bug:
https://github.com/angular-ui/bootstrap/issues/3823
Until this bug is not fixed in upstream version,
we need to use this patched version of library.

Change-Id: I30a5d52d3a638fa2d7ca110d8824682c3d205611
2015-07-31 15:44:26 +03:00
Timur Sufiev e17565a708 Change location of symlink to bower_components
Do so in order to use both js and css assets fetched with bower.

Change-Id: Id4a8fa8dc3cd0915b33ead24421c14155897939e
2015-07-22 12:51:52 +03:00
Timur Sufiev a4e2892dc0 Rename unit-test files from *Spec.js to *.spec.js
Change-Id: I6cc067733cd2d7ee5e6a66f5a74cc207513be620
2015-06-26 20:26:27 +03:00
Timur Sufiev a5c1c308cf Decouple @enum and drop-down widget
Provide a convenience fields.linkedcollection model to handle common
use-case of using @ref in a Mistral WB. Cover it with unit-tests as
well all scenarios of using fields.linkedcollection in MIstral WB.

Change-Id: I97a61262db4cc521b5c230667a49b99701318f3f
Closes-Bug: #1467514
2015-06-26 20:23:13 +03:00
Michael Krotscheck 4beaf29f6e Added test execution in Firefox.
This adds capturing and executing tests in the Firefox browser. It also
adds the use of the jasmine-jquery framework to permit easier detection
of DOM elements in a rendered directive, as the present method does not
play well with Firefox' tendency to randomly reorder attribute positions.

Testing with Firefox is already supported in infra.

Change-Id: Ifc81e1b243975536ee40e627c1e4a164855fe85c
2015-06-17 12:19:32 -07:00
Michael Krotscheck fc2f3628e4 Added test execution in Chromium.
This adds capturing and executing tests in the Chromium browser.
It is already supported in infra.

Change-Id: I4d18da18f9b93dc057cbe71667c5871e8210c50d
2015-06-16 12:06:36 -07:00
Timur Sufiev 0efc6355f7 Rewrite <editable> directive
Instead of showing popup for the value being edited it now allows
editing the same value in-place, accompanied with 2 buttons - confirm
& reject the edit. Only when one of 2 these buttons is pressed (or
equivalend Enter/Esc keys are pressed) the value will be applied. The
<editable> directive could be used both for changing Action/Workflow
entity names, for changing dictionary and varlist keys.

Change-Id: I4e7e1c0fcaed71aa649b1c9925a9b53005ff9a2d
Closes-Bug: #1411649
2015-04-28 17:05:18 +03:00
Timur Sufiev e5b8fb8a3a Rewrite <panel> and <collapsible-group> directives
Use 'collapse' directive from angular-bootstrap inside them instead of
hand-written bootstrap css transitions. Clicking on panel title no
longer collapses/expands panel contents - this is done in order enable
panel entity name in-line editing in next commit.

Change-Id: Ifcc32cd74a5482a59b417333824522ebf48c73b5
Closes-Bug: #1411636
Closes-Bug: #1428719
2015-04-28 15:52:27 +03:00
Timur Sufiev 6fa8b92891 Refactor third-party libraries usage and clean up karma config
* handle js-yaml and underscore libraries with bower (use libraries
  downloaded with bower by sym-linking bower_components to libs dir in
  static);
* get rid of no longer used angular-filter;
* move libraries without official releases to custom-libs
* simplify file requirements in karma config.

Change-Id: Ie3d1d90c6f2ccc89c7cf91fe0d9dae4b2b88442f
2015-04-25 19:18:52 +00:00
Timur Sufiev e9e750ef4c Add unit-tests for merlin directives
To simplify templates serving the plugin karma-ng-html2js-preprocessor
has been added to Karma and project dependencies.

Change-Id: If947acd2e9d7e64838c31e406d04fa9c1c67c770
Implements: blueprint merlin-unittests
2015-04-25 11:00:39 -07:00
Timur Sufiev 0b92f674a4 Enable changing Task structure
Provide unit-tests for verifying that Task structure depends both on
parent Workflow type and on Task type.

This commits also depends on a change made to Barricade.js library:
now it passes the parameters of a parent container to the children
containers, which add new elements to it via prototype inheritance.

Closes-Bug: #1446230
Implements: blueprint merlin-unittests
Change-Id: Ic4c0539297d6df9a0b1450a824eeca4749455cfd
2015-04-23 21:37:42 +03:00
Timur Sufiev 5014b8de58 Enable the Workflow structure change on changing its type
To enable this fix, a massive refactoring to panel/row/item - i.e.,
the 'view' mixins - was done. Now these mixins are implemented as
filters, which has the following benefits:
 * once the underlying Barricade model changes, the following change is
 immediately propagated to the view (input events are no longer
 catched by some obsolete piece of model just because view is not
 updated and is still sending events to an old model);
 * at the same time the filter results are memoized (with the
 appropriate function from underscore.js) so not infinite $digest
 looping happens, with the Barricade objects' string hash being used
 as a parts of a composite caching key.

Also change .toJSON() usage in Mistral models to .toJSON({pretty: true})
usage to not interfere with deserializing JSON blobs when we need to
recreate a Barricade object from JSON blob.

Provide a foundation of a suite of filters unit-tests - just a list of
specs being verified with an actual code to be written later.

Closes-Bug: #1436409
Change-Id: I7af36abbdcfab70a6b867c39e49420d1716c1310
2015-04-22 14:24:39 +03:00
Timur Sufiev 4bc01fe872 Fix the bug with asynchronous template loading
Due to each field template being loaded asynchronously it was possible
that some templates hadn't been put to the $templateCache by the time
they were requested from it for rendering a field directive. This lead
to some random field shown in the initial document not being rendered
at all. Fix this problem by using promises, effectively delaying the
field rendering until the moment the template is finally loaded. Using
promises also allows to not use $templateCache at all - the
templateContents are passed as resolve() method argument.

Also add 'ng-cloak' directive to the toplevel Workbook div to prevent
raw Angular template flickering during initial load.

Change-Id: I8a52b9730b52d4dd20400460137576713c081867
Closes-Bug: #1428730
2015-04-21 13:49:23 +03:00
Paul Karikh 05451e3e59 Add karma testing
This patch adds configuration for Karma.

Change-Id: Ibb65060836f967ac81a57ea279d7fa494e238d49
Implements blueprint: merlin-unittests
2015-04-17 15:27:11 +03:00