This repository was archived by the owner on Jan 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,13 @@ Package.onTest(function(api) {
109
109
110
110
'velocity:helpers' ,
111
111
'velocity:console-reporter' ,
112
+ 'jquery' ,
112
113
113
114
'wieldo:angular-formly-templates-material'
114
115
] ) ;
115
116
116
117
api . addFiles ( [
118
+ 'tests/client/test-utils.js' ,
117
119
'tests/client/formly-material-spec.js'
118
120
] , client ) ;
119
121
} ) ;
Original file line number Diff line number Diff line change
1
+ testUtils = class testUtils {
2
+ static fixTypeTemplateUrl ( formlyConfig , typeName ) {
3
+ let type = formlyConfig . getType ( typeName , true ) ;
4
+ type . templateUrl = type . templateUrl . replace (
5
+ "/packages/wieldo:angular-formly-templates-material/lib/" ,
6
+ "wieldo_angular-formly-templates-material_lib/"
7
+ ) ;
8
+ }
9
+
10
+ static fixWrapperTemplateUrl ( formlyConfig , wrapperName ) {
11
+ let wrapper = formlyConfig . getWrapper ( wrapperName , true ) ;
12
+ wrapper . templateUrl = wrapper . templateUrl . replace (
13
+ "/packages/wieldo:angular-formly-templates-material/lib/" ,
14
+ "wieldo_angular-formly-templates-material_lib/"
15
+ ) ;
16
+ }
17
+
18
+ static fixFieldsTypes ( formlyConfig , fields ) {
19
+ fields . forEach ( ( field ) => {
20
+ testUtils . fixTypeTemplateUrl ( formlyConfig , field . type ) ;
21
+ } ) ;
22
+ }
23
+
24
+ static formTemplate = `<form name="testForm"><formly-form fields="fields" form="testForm"></formly-form></form>` ;
25
+ } ;
You can’t perform that action at this time.
0 commit comments