@sprucelabs/spruce-test-fixtures 62.4.32 → 62.4.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -79,9 +79,11 @@ class ViewFixture {
79
79
  const { namespace, controllerMap: map, vcDir, connectToApi } = options;
80
80
  let controllerMap;
81
81
  let pluginsByName = {};
82
+ let App;
82
83
  try {
83
- const { map: loadedControllerMap, pluginsByName: plugins } = vcDiskUtil.loadViewControllersAndBuildMap(namespace, vcDir);
84
+ const { map: loadedControllerMap, pluginsByName: plugins, App: loadedApp, } = vcDiskUtil.loadViewControllersAndBuildMap(namespace, vcDir);
84
85
  controllerMap = Object.assign(Object.assign({}, loadedControllerMap), map);
86
+ App = loadedApp;
85
87
  pluginsByName = plugins;
86
88
  }
87
89
  catch (err) {
@@ -120,6 +122,9 @@ class ViewFixture {
120
122
  vcAssert._setVcFactory(this.vcFactory);
121
123
  //@ts-ignore
122
124
  formAssert._setVcFactory(this.vcFactory);
125
+ if (App) {
126
+ this.vcFactory.importControllers([], undefined, App);
127
+ }
123
128
  const oldFactory = this.vcFactory.Controller.bind(this.vcFactory);
124
129
  this.vcFactory.Controller = (...args) => {
125
130
  //@ts-ignore
@@ -89,6 +89,9 @@ const vcDiskUtil = {
89
89
  map[`${namespace}.${item.id}`] = item.Class;
90
90
  }
91
91
  }
92
+ if (App) {
93
+ App.id = `${namespace}`;
94
+ }
92
95
  return {
93
96
  map,
94
97
  pluginsByName,
@@ -75,12 +75,14 @@ class ViewFixture {
75
75
  const { namespace, controllerMap: map, vcDir, connectToApi } = options;
76
76
  let controllerMap;
77
77
  let pluginsByName = {};
78
+ let App;
78
79
  try {
79
- const { map: loadedControllerMap, pluginsByName: plugins } = vcDisk_utility_1.default.loadViewControllersAndBuildMap(namespace, vcDir);
80
+ const { map: loadedControllerMap, pluginsByName: plugins, App: loadedApp, } = vcDisk_utility_1.default.loadViewControllersAndBuildMap(namespace, vcDir);
80
81
  controllerMap = {
81
82
  ...loadedControllerMap,
82
83
  ...map,
83
84
  };
85
+ App = loadedApp;
84
86
  pluginsByName = plugins;
85
87
  }
86
88
  catch (err) {
@@ -118,6 +120,9 @@ class ViewFixture {
118
120
  heartwood_view_controllers_1.vcAssert._setVcFactory(this.vcFactory);
119
121
  //@ts-ignore
120
122
  heartwood_view_controllers_1.formAssert._setVcFactory(this.vcFactory);
123
+ if (App) {
124
+ this.vcFactory.importControllers([], undefined, App);
125
+ }
121
126
  const oldFactory = this.vcFactory.Controller.bind(this.vcFactory);
122
127
  this.vcFactory.Controller = (...args) => {
123
128
  //@ts-ignore
@@ -93,6 +93,9 @@ const vcDiskUtil = {
93
93
  map[`${namespace}.${item.id}`] = item.Class;
94
94
  }
95
95
  }
96
+ if (App) {
97
+ App.id = `${namespace}`;
98
+ }
96
99
  return {
97
100
  map,
98
101
  pluginsByName,
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "@sprucelabs/spruce-test-fixtures"
14
14
  ]
15
15
  },
16
- "version": "62.4.32",
16
+ "version": "62.4.33",
17
17
  "files": [
18
18
  "build/**/*",
19
19
  "!build/__tests__",
@@ -71,7 +71,7 @@
71
71
  "@sprucelabs/spruce-core-schemas": "^40.1.550",
72
72
  "@sprucelabs/spruce-event-utils": "^40.1.326",
73
73
  "@sprucelabs/spruce-permission-utils": "^8.1.29",
74
- "@sprucelabs/spruce-skill-booter": "^62.4.32",
74
+ "@sprucelabs/spruce-skill-booter": "^62.4.33",
75
75
  "@sprucelabs/spruce-skill-utils": "^31.0.627",
76
76
  "@sprucelabs/test-utils": "^5.1.504",
77
77
  "dotenv": "^16.4.5",
@@ -114,5 +114,5 @@
114
114
  "^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
115
115
  }
116
116
  },
117
- "gitHead": "42e872e4fc0cd120df8eb5b0d4eed90124fa9523"
117
+ "gitHead": "45da67459db52df56b3893a2b7370d6466c374e2"
118
118
  }