@sprucelabs/spruce-test-fixtures 68.0.5 → 68.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/tests/SpyViewControllerFactory.d.ts +1 -0
- package/build/esm/tests/SpyViewControllerFactory.js +4 -0
- package/build/esm/tests/fixtures/ViewFixture.d.ts +2 -1
- package/build/esm/tests/fixtures/ViewFixture.js +7 -3
- package/build/tests/SpyViewControllerFactory.d.ts +1 -0
- package/build/tests/SpyViewControllerFactory.js +4 -0
- package/build/tests/fixtures/ViewFixture.d.ts +2 -1
- package/build/tests/fixtures/ViewFixture.js +6 -3
- package/package.json +8 -8
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewControllerFactory } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
export default class SpyViewControllerFactory extends ViewControllerFactory {
|
|
3
3
|
getPlugins(): import("@sprucelabs/heartwood-view-controllers").ViewControllerPlugins;
|
|
4
|
+
getDevice(): import("@sprucelabs/heartwood-view-controllers").Device;
|
|
4
5
|
}
|
|
@@ -34,7 +34,7 @@ export default class ViewFixture {
|
|
|
34
34
|
private proxyDecorator;
|
|
35
35
|
private locale;
|
|
36
36
|
private permissions;
|
|
37
|
-
private static device
|
|
37
|
+
private static device;
|
|
38
38
|
static lockProxyCacheForPerson(id: any): void;
|
|
39
39
|
static setShouldAutomaticallyResetAuth(shouldReset: false): void;
|
|
40
40
|
constructor(options: {
|
|
@@ -50,6 +50,7 @@ export default class ViewFixture {
|
|
|
50
50
|
proxyDecorator: ClientProxyDecorator;
|
|
51
51
|
permissions: PermissionFixture;
|
|
52
52
|
});
|
|
53
|
+
private static resetDevice;
|
|
53
54
|
addPlugin(name: string, plugin: ViewControllerPlugin): void;
|
|
54
55
|
getFactory(): SpyViewControllerFactory;
|
|
55
56
|
BuildPlugin<P extends ViewControllerPlugin>(Plugin: new (options: ViewControllerPluginOptions) => P): P;
|
|
@@ -43,7 +43,7 @@ class ViewFixture {
|
|
|
43
43
|
});
|
|
44
44
|
this.permissions = permissions;
|
|
45
45
|
if (!ViewFixture.device) {
|
|
46
|
-
ViewFixture.
|
|
46
|
+
ViewFixture.resetDevice();
|
|
47
47
|
}
|
|
48
48
|
this.locale = new LocaleImpl();
|
|
49
49
|
this.locations =
|
|
@@ -52,6 +52,9 @@ class ViewFixture {
|
|
|
52
52
|
organizations: this.organizations,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
+
static resetDevice() {
|
|
56
|
+
ViewFixture.device = new SpyDevice();
|
|
57
|
+
}
|
|
55
58
|
addPlugin(name, plugin) {
|
|
56
59
|
this.getFactory().addPlugin(name, plugin);
|
|
57
60
|
}
|
|
@@ -73,6 +76,7 @@ class ViewFixture {
|
|
|
73
76
|
return renderUtil.render(vc);
|
|
74
77
|
}
|
|
75
78
|
static getSharedFactory(options) {
|
|
79
|
+
var _a;
|
|
76
80
|
if (this.vcFactory) {
|
|
77
81
|
if (options.controllerMap) {
|
|
78
82
|
this.vcFactory.mixinControllers(options.controllerMap);
|
|
@@ -107,7 +111,7 @@ class ViewFixture {
|
|
|
107
111
|
}
|
|
108
112
|
this.vcFactory = ViewControllerFactory.Factory({
|
|
109
113
|
controllerMap,
|
|
110
|
-
device: this.device,
|
|
114
|
+
device: (_a = this.device) !== null && _a !== void 0 ? _a : new SpyDevice(),
|
|
111
115
|
pluginsByName,
|
|
112
116
|
connectToApi: (options) => __awaiter(this, void 0, void 0, function* () {
|
|
113
117
|
var _a;
|
|
@@ -183,7 +187,7 @@ class ViewFixture {
|
|
|
183
187
|
this.resetAuth();
|
|
184
188
|
}
|
|
185
189
|
this.viewClient = undefined;
|
|
186
|
-
this.
|
|
190
|
+
this.resetDevice();
|
|
187
191
|
const lockedToken = this.dontResetProxyTokenForPersonId &&
|
|
188
192
|
ViewFixture.loggedInPersonProxyTokens[this.dontResetProxyTokenForPersonId];
|
|
189
193
|
ViewFixture.loggedInPersonProxyTokens = {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewControllerFactory } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
export default class SpyViewControllerFactory extends ViewControllerFactory {
|
|
3
3
|
getPlugins(): import("@sprucelabs/heartwood-view-controllers").ViewControllerPlugins;
|
|
4
|
+
getDevice(): import("@sprucelabs/heartwood-view-controllers").Device;
|
|
4
5
|
}
|
|
@@ -5,5 +5,9 @@ class SpyViewControllerFactory extends heartwood_view_controllers_1.ViewControll
|
|
|
5
5
|
getPlugins() {
|
|
6
6
|
return this.plugins;
|
|
7
7
|
}
|
|
8
|
+
getDevice() {
|
|
9
|
+
// @ts-ignore - remove this ignore after 6/20/2025
|
|
10
|
+
return this.device;
|
|
11
|
+
}
|
|
8
12
|
}
|
|
9
13
|
exports.default = SpyViewControllerFactory;
|
|
@@ -34,7 +34,7 @@ export default class ViewFixture {
|
|
|
34
34
|
private proxyDecorator;
|
|
35
35
|
private locale;
|
|
36
36
|
private permissions;
|
|
37
|
-
private static device
|
|
37
|
+
private static device;
|
|
38
38
|
static lockProxyCacheForPerson(id: any): void;
|
|
39
39
|
static setShouldAutomaticallyResetAuth(shouldReset: false): void;
|
|
40
40
|
constructor(options: {
|
|
@@ -50,6 +50,7 @@ export default class ViewFixture {
|
|
|
50
50
|
proxyDecorator: ClientProxyDecorator;
|
|
51
51
|
permissions: PermissionFixture;
|
|
52
52
|
});
|
|
53
|
+
private static resetDevice;
|
|
53
54
|
addPlugin(name: string, plugin: ViewControllerPlugin): void;
|
|
54
55
|
getFactory(): SpyViewControllerFactory;
|
|
55
56
|
BuildPlugin<P extends ViewControllerPlugin>(Plugin: new (options: ViewControllerPluginOptions) => P): P;
|
|
@@ -40,7 +40,7 @@ class ViewFixture {
|
|
|
40
40
|
});
|
|
41
41
|
this.permissions = permissions;
|
|
42
42
|
if (!ViewFixture.device) {
|
|
43
|
-
ViewFixture.
|
|
43
|
+
ViewFixture.resetDevice();
|
|
44
44
|
}
|
|
45
45
|
this.locale = new calendar_utils_1.LocaleImpl();
|
|
46
46
|
this.locations =
|
|
@@ -50,6 +50,9 @@ class ViewFixture {
|
|
|
50
50
|
organizations: this.organizations,
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
+
static resetDevice() {
|
|
54
|
+
ViewFixture.device = new heartwood_view_controllers_1.SpyDevice();
|
|
55
|
+
}
|
|
53
56
|
addPlugin(name, plugin) {
|
|
54
57
|
this.getFactory().addPlugin(name, plugin);
|
|
55
58
|
}
|
|
@@ -108,7 +111,7 @@ class ViewFixture {
|
|
|
108
111
|
}
|
|
109
112
|
this.vcFactory = heartwood_view_controllers_1.ViewControllerFactory.Factory({
|
|
110
113
|
controllerMap,
|
|
111
|
-
device: this.device,
|
|
114
|
+
device: this.device ?? new heartwood_view_controllers_1.SpyDevice(),
|
|
112
115
|
pluginsByName,
|
|
113
116
|
connectToApi: async (options) => {
|
|
114
117
|
return this.viewClient ?? connectToApi(options);
|
|
@@ -182,7 +185,7 @@ class ViewFixture {
|
|
|
182
185
|
this.resetAuth();
|
|
183
186
|
}
|
|
184
187
|
this.viewClient = undefined;
|
|
185
|
-
this.
|
|
188
|
+
this.resetDevice();
|
|
186
189
|
const lockedToken = this.dontResetProxyTokenForPersonId &&
|
|
187
190
|
ViewFixture.loggedInPersonProxyTokens[this.dontResetProxyTokenForPersonId];
|
|
188
191
|
ViewFixture.loggedInPersonProxyTokens = {};
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@sprucelabs/spruce-test-fixtures"
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
"version": "68.0.
|
|
16
|
+
"version": "68.0.7",
|
|
17
17
|
"files": [
|
|
18
18
|
"build/**/*",
|
|
19
19
|
"!build/__tests__",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@sprucelabs/data-stores": "^29.0.9",
|
|
65
65
|
"@sprucelabs/error": "^7.0.4",
|
|
66
|
-
"@sprucelabs/heartwood-view-controllers": "^121.2.
|
|
67
|
-
"@sprucelabs/mercury-client": "^43.0.
|
|
68
|
-
"@sprucelabs/mercury-core-events": "^27.0.
|
|
69
|
-
"@sprucelabs/mercury-event-emitter": "^43.0.
|
|
66
|
+
"@sprucelabs/heartwood-view-controllers": "^121.2.7",
|
|
67
|
+
"@sprucelabs/mercury-client": "^43.0.10",
|
|
68
|
+
"@sprucelabs/mercury-core-events": "^27.0.4",
|
|
69
|
+
"@sprucelabs/mercury-event-emitter": "^43.0.10",
|
|
70
70
|
"@sprucelabs/schema": "^32.0.8",
|
|
71
71
|
"@sprucelabs/spruce-core-schemas": "^41.0.8",
|
|
72
72
|
"@sprucelabs/spruce-event-utils": "^41.0.9",
|
|
73
|
-
"@sprucelabs/spruce-permission-utils": "^14.0.
|
|
74
|
-
"@sprucelabs/spruce-skill-booter": "^68.0.
|
|
73
|
+
"@sprucelabs/spruce-permission-utils": "^14.0.11",
|
|
74
|
+
"@sprucelabs/spruce-skill-booter": "^68.0.7",
|
|
75
75
|
"@sprucelabs/spruce-skill-utils": "^32.0.8",
|
|
76
76
|
"@sprucelabs/test-utils": "^6.0.7",
|
|
77
77
|
"dotenv": "^16.5.0",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "94ce6d3aa4c90951bbdaa58b55b936f45a27ff19"
|
|
118
118
|
}
|