@sprucelabs/spruce-test-fixtures 62.4.30 → 62.4.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  import { Locale } from '@sprucelabs/calendar-utils';
2
- import { ControllerOptions, Scope, SkillViewController, SpyDevice, ViewControllerFactory, ViewControllerId, ViewController, ViewControllerConstructor, ViewControllerPluginOptions, ViewControllerPlugin } from '@sprucelabs/heartwood-view-controllers';
2
+ import { ControllerOptions, Scope, SkillViewController, SpyDevice, ViewControllerId, ViewController, ViewControllerConstructor, ViewControllerPluginOptions, ViewControllerPlugin, AppControllerId } from '@sprucelabs/heartwood-view-controllers';
3
3
  import { MercuryClient } from '@sprucelabs/mercury-client';
4
4
  import { SpruceSchemas } from '@sprucelabs/spruce-core-schemas';
5
5
  import { ClientProxyDecorator } from '../..';
@@ -7,6 +7,7 @@ import { TokenGenerator } from '../../ClientProxyDecorator';
7
7
  import { TestConnectFactory } from '../../types/fixture.types';
8
8
  import { ArgsFromSvc } from '../../types/view.types';
9
9
  import TestRouter from '../routers/TestRouter';
10
+ import SpyViewControllerFactory from '../SpyViewControllerFactory';
10
11
  import FixtureFactory from './FixtureFactory';
11
12
  import PermissionFixture from './PermissionFixture';
12
13
  import PersonFixture from './PersonFixture';
@@ -45,7 +46,7 @@ export default class ViewFixture {
45
46
  permissions: PermissionFixture;
46
47
  });
47
48
  addPlugin(name: string, plugin: ViewControllerPlugin): void;
48
- getFactory(): ViewControllerFactory;
49
+ getFactory(): SpyViewControllerFactory;
49
50
  BuildPlugin<P extends ViewControllerPlugin>(Plugin: new (options: ViewControllerPluginOptions) => P): P;
50
51
  getMaps(): import("../../utilities/SpyMapUtil").SpyMapUtil;
51
52
  render<VC extends ViewController<any>>(vc: VC): ReturnType<VC['render']>;
@@ -60,6 +61,8 @@ export default class ViewFixture {
60
61
  static resetAuth(): void;
61
62
  load<Svc extends SkillViewController = SkillViewController>(vc: Pick<Svc, 'load' | 'getScope'>, args?: ArgsFromSvc<Svc>): Promise<void>;
62
63
  getThemes(): import("../FakeThemeManager").default;
64
+ hasApp(namespace: string): boolean;
65
+ App(namespace: AppControllerId): never;
63
66
  private assertScopeRequirementsMet;
64
67
  setScope(scope: Scope): void;
65
68
  getScope(): SpyScope;
@@ -211,6 +211,12 @@ class ViewFixture {
211
211
  getThemes() {
212
212
  return this.getRouter().getThemes();
213
213
  }
214
+ hasApp(namespace) {
215
+ return this.getFactory().hasApp(namespace);
216
+ }
217
+ App(namespace) {
218
+ return this.getFactory().App(namespace);
219
+ }
214
220
  assertScopeRequirementsMet(vc) {
215
221
  return __awaiter(this, void 0, void 0, function* () {
216
222
  var _a, _b;
@@ -1,5 +1,5 @@
1
1
  import { Locale } from '@sprucelabs/calendar-utils';
2
- import { ControllerOptions, Scope, SkillViewController, SpyDevice, ViewControllerFactory, ViewControllerId, ViewController, ViewControllerConstructor, ViewControllerPluginOptions, ViewControllerPlugin } from '@sprucelabs/heartwood-view-controllers';
2
+ import { ControllerOptions, Scope, SkillViewController, SpyDevice, ViewControllerId, ViewController, ViewControllerConstructor, ViewControllerPluginOptions, ViewControllerPlugin, AppControllerId } from '@sprucelabs/heartwood-view-controllers';
3
3
  import { MercuryClient } from '@sprucelabs/mercury-client';
4
4
  import { SpruceSchemas } from '@sprucelabs/spruce-core-schemas';
5
5
  import { ClientProxyDecorator } from '../..';
@@ -7,6 +7,7 @@ import { TokenGenerator } from '../../ClientProxyDecorator';
7
7
  import { TestConnectFactory } from '../../types/fixture.types';
8
8
  import { ArgsFromSvc } from '../../types/view.types';
9
9
  import TestRouter from '../routers/TestRouter';
10
+ import SpyViewControllerFactory from '../SpyViewControllerFactory';
10
11
  import FixtureFactory from './FixtureFactory';
11
12
  import PermissionFixture from './PermissionFixture';
12
13
  import PersonFixture from './PersonFixture';
@@ -45,7 +46,7 @@ export default class ViewFixture {
45
46
  permissions: PermissionFixture;
46
47
  });
47
48
  addPlugin(name: string, plugin: ViewControllerPlugin): void;
48
- getFactory(): ViewControllerFactory;
49
+ getFactory(): SpyViewControllerFactory;
49
50
  BuildPlugin<P extends ViewControllerPlugin>(Plugin: new (options: ViewControllerPluginOptions) => P): P;
50
51
  getMaps(): import("../../utilities/SpyMapUtil").SpyMapUtil;
51
52
  render<VC extends ViewController<any>>(vc: VC): ReturnType<VC['render']>;
@@ -60,6 +61,8 @@ export default class ViewFixture {
60
61
  static resetAuth(): void;
61
62
  load<Svc extends SkillViewController = SkillViewController>(vc: Pick<Svc, 'load' | 'getScope'>, args?: ArgsFromSvc<Svc>): Promise<void>;
62
63
  getThemes(): import("../FakeThemeManager").default;
64
+ hasApp(namespace: string): boolean;
65
+ App(namespace: AppControllerId): never;
63
66
  private assertScopeRequirementsMet;
64
67
  setScope(scope: Scope): void;
65
68
  getScope(): SpyScope;
@@ -204,6 +204,12 @@ class ViewFixture {
204
204
  getThemes() {
205
205
  return this.getRouter().getThemes();
206
206
  }
207
+ hasApp(namespace) {
208
+ return this.getFactory().hasApp(namespace);
209
+ }
210
+ App(namespace) {
211
+ return this.getFactory().App(namespace);
212
+ }
207
213
  async assertScopeRequirementsMet(vc) {
208
214
  if ((0, scopeUtils_1.doesScopeIncludeOrganization)(vc.getScope?.())) {
209
215
  const org = await this.getScope().getCurrentOrganization();
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "@sprucelabs/spruce-test-fixtures"
14
14
  ]
15
15
  },
16
- "version": "62.4.30",
16
+ "version": "62.4.31",
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.30",
74
+ "@sprucelabs/spruce-skill-booter": "^62.4.31",
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": "e13610aafa0c214b6a6726b9f5875577fa4978b3"
117
+ "gitHead": "46ab3b5cfdf4a4c4454a4d00e30db3395ee0b7ba"
118
118
  }