@sprucelabs/spruce-test-fixtures 46.0.15 → 46.0.18
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/__tests__/behavioral/views/ViewFixture.test.js +2 -2
- package/build/esm/__tests__/behavioral/views/ViewFixture.test.js +2 -2
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/tests/fixtures/{TestScope.d.ts → SpyScope.d.ts} +5 -5
- package/build/esm/tests/fixtures/{TestScope.js → SpyScope.js} +1 -1
- package/build/esm/tests/fixtures/ViewFixture.d.ts +2 -1
- package/build/esm/tests/fixtures/ViewFixture.js +2 -2
- package/build/index.d.ts +1 -0
- package/build/index.js +3 -1
- package/build/tests/fixtures/{TestScope.d.ts → SpyScope.d.ts} +5 -5
- package/build/tests/fixtures/{TestScope.js → SpyScope.js} +2 -2
- package/build/tests/fixtures/ViewFixture.d.ts +2 -1
- package/build/tests/fixtures/ViewFixture.js +2 -2
- package/package.json +17 -17
|
@@ -19,7 +19,7 @@ const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/Abst
|
|
|
19
19
|
const constants_1 = require("../../../tests/constants");
|
|
20
20
|
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
|
21
21
|
const Fake_svc_1 = __importDefault(require("../../../tests/Fake.svc"));
|
|
22
|
-
const
|
|
22
|
+
const SpyScope_1 = __importDefault(require("../../../tests/fixtures/SpyScope"));
|
|
23
23
|
const ViewFixture_1 = __importDefault(require("../../../tests/fixtures/ViewFixture"));
|
|
24
24
|
const EventFaker_1 = __importDefault(require("../../support/EventFaker"));
|
|
25
25
|
const FakeThemeManager_1 = __importDefault(require("../../support/FakeThemeManager"));
|
|
@@ -368,7 +368,7 @@ let ViewFixtureTest = class ViewFixtureTest extends AbstractSpruceFixtureTest_1.
|
|
|
368
368
|
test_1.assert.isEqual(heartwood_view_controllers_1.SwipeViewControllerImpl.swipeDelay, 0);
|
|
369
369
|
}
|
|
370
370
|
static canSetScope() {
|
|
371
|
-
const scope = new
|
|
371
|
+
const scope = new SpyScope_1.default({
|
|
372
372
|
organizationFixture: this.organizations,
|
|
373
373
|
locationFixture: this.locations,
|
|
374
374
|
});
|
|
@@ -23,7 +23,7 @@ import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.
|
|
|
23
23
|
import { DEMO_NUMBER_VIEW_FIXTURE, DEMO_NUMBER, DEMO_NUMBER_VIEW_FIXTURE_2, DEMO_NUMBER_VIEW_FIXTURE_CLIENT_2, } from '../../../tests/constants.js';
|
|
24
24
|
import fake from '../../../tests/decorators/fake.js';
|
|
25
25
|
import FakeSkillViewController from '../../../tests/Fake.svc.js';
|
|
26
|
-
import
|
|
26
|
+
import SpyScope from '../../../tests/fixtures/SpyScope.js';
|
|
27
27
|
import ViewFixture from '../../../tests/fixtures/ViewFixture.js';
|
|
28
28
|
import EventFaker from '../../support/EventFaker.js';
|
|
29
29
|
import FakeThemeManager from '../../support/FakeThemeManager.js';
|
|
@@ -423,7 +423,7 @@ let ViewFixtureTest = class ViewFixtureTest extends AbstractSpruceFixtureTest {
|
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
static canSetScope() {
|
|
426
|
-
const scope = new
|
|
426
|
+
const scope = new SpyScope({
|
|
427
427
|
organizationFixture: this.organizations,
|
|
428
428
|
locationFixture: this.locations,
|
|
429
429
|
});
|
package/build/esm/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { default as eventFaker } from './tests/eventFaker';
|
|
|
22
22
|
export { default as eventMocker } from './tests/eventMocker';
|
|
23
23
|
export { default as ClientProxyDecorator } from './ClientProxyDecorator';
|
|
24
24
|
export { default as FakeThemeManager } from './__tests__/support/FakeThemeManager';
|
|
25
|
+
export { default as SpyScope } from './tests/fixtures/SpyScope';
|
|
25
26
|
/**
|
|
26
27
|
* @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
|
|
27
28
|
*/
|
package/build/esm/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export { default as eventFaker } from './tests/eventFaker.js';
|
|
|
22
22
|
export { default as eventMocker } from './tests/eventMocker.js';
|
|
23
23
|
export { default as ClientProxyDecorator } from './ClientProxyDecorator.js';
|
|
24
24
|
export { default as FakeThemeManager } from './__tests__/support/FakeThemeManager.js';
|
|
25
|
+
export { default as SpyScope } from './tests/fixtures/SpyScope.js';
|
|
25
26
|
/**
|
|
26
27
|
* @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
|
|
27
28
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Scope } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import LocationFixture from './LocationFixture';
|
|
3
3
|
import OrganizationFixture from './OrganizationFixture';
|
|
4
|
-
export default class
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export default class SpyScope implements Scope {
|
|
5
|
+
currentOrgId?: string | null;
|
|
6
|
+
currentLocationId?: string | null;
|
|
7
7
|
private organizationFixture;
|
|
8
8
|
private locationFixture;
|
|
9
9
|
constructor(options: {
|
|
@@ -11,8 +11,8 @@ export default class TestScope implements Scope {
|
|
|
11
11
|
locationFixture: LocationFixture;
|
|
12
12
|
});
|
|
13
13
|
getCurrentOrganization(): Promise<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema, false>> | null>;
|
|
14
|
-
setCurrentOrganization(id: string): void;
|
|
14
|
+
setCurrentOrganization(id: string | null): void;
|
|
15
15
|
getCurrentLocation(): Promise<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>> | null>;
|
|
16
|
-
setCurrentLocation(id: string): void;
|
|
16
|
+
setCurrentLocation(id: string | null): void;
|
|
17
17
|
clearSession(): void;
|
|
18
18
|
}
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
export default class
|
|
10
|
+
export default class SpyScope {
|
|
11
11
|
constructor(options) {
|
|
12
12
|
this.organizationFixture = options.organizationFixture;
|
|
13
13
|
this.locationFixture = options.locationFixture;
|
|
@@ -10,6 +10,7 @@ import TestRouter from '../routers/TestRouter';
|
|
|
10
10
|
import SpyAuthorizer from '../SpyAuthorizer';
|
|
11
11
|
import FixtureFactory from './FixtureFactory';
|
|
12
12
|
import PersonFixture from './PersonFixture';
|
|
13
|
+
import SpyScope from './SpyScope';
|
|
13
14
|
declare type Factory = TestConnectFactory;
|
|
14
15
|
declare type Client = MercuryClient;
|
|
15
16
|
export default class ViewFixture {
|
|
@@ -54,7 +55,7 @@ export default class ViewFixture {
|
|
|
54
55
|
getThemes(): import("../..").FakeThemeManager;
|
|
55
56
|
private assertScopeRequirementsMet;
|
|
56
57
|
setScope(scope: Scope): void;
|
|
57
|
-
getScope():
|
|
58
|
+
getScope(): SpyScope;
|
|
58
59
|
getLocale(): Locale;
|
|
59
60
|
getRouter(): TestRouter;
|
|
60
61
|
getAuthenticator(): import("@sprucelabs/heartwood-view-controllers").Authenticator;
|
|
@@ -18,7 +18,7 @@ import vcDiskUtil from '../../utilities/vcDisk.utility.js';
|
|
|
18
18
|
import FakeSkillViewController from '../Fake.svc.js';
|
|
19
19
|
import TestRouter from '../routers/TestRouter.js';
|
|
20
20
|
import SpyAuthorizer from '../SpyAuthorizer.js';
|
|
21
|
-
import
|
|
21
|
+
import SpyScope from './SpyScope.js';
|
|
22
22
|
export default class ViewFixture {
|
|
23
23
|
constructor(options) {
|
|
24
24
|
var _a, _b;
|
|
@@ -204,7 +204,7 @@ export default class ViewFixture {
|
|
|
204
204
|
}
|
|
205
205
|
getScope() {
|
|
206
206
|
if (!ViewFixture.scope) {
|
|
207
|
-
ViewFixture.scope = new
|
|
207
|
+
ViewFixture.scope = new SpyScope({
|
|
208
208
|
organizationFixture: this.orgs,
|
|
209
209
|
locationFixture: this.locations,
|
|
210
210
|
});
|
package/build/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { default as eventFaker } from './tests/eventFaker';
|
|
|
22
22
|
export { default as eventMocker } from './tests/eventMocker';
|
|
23
23
|
export { default as ClientProxyDecorator } from './ClientProxyDecorator';
|
|
24
24
|
export { default as FakeThemeManager } from './__tests__/support/FakeThemeManager';
|
|
25
|
+
export { default as SpyScope } from './tests/fixtures/SpyScope';
|
|
25
26
|
/**
|
|
26
27
|
* @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
|
|
27
28
|
*/
|
package/build/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.phoneNumberIncrementor = exports.phoneNumberIncrementer = exports.FakeThemeManager = exports.ClientProxyDecorator = exports.eventMocker = exports.eventFaker = exports.fake = exports.install = exports.login = exports.seed = exports.TestRouter = exports.vcDiskUtil = exports.FakeSkillViewController = exports.MercuryFixture = exports.ViewControllerFixture = exports.RoleFixture = exports.ViewFixture = exports.LocationFixture = exports.SkillFixture = exports.PersonFixture = exports.StoreFixture = exports.OrganizationFixture = exports.AbstractSpruceFixtureTest = void 0;
|
|
20
|
+
exports.phoneNumberIncrementor = exports.phoneNumberIncrementer = exports.SpyScope = exports.FakeThemeManager = exports.ClientProxyDecorator = exports.eventMocker = exports.eventFaker = exports.fake = exports.install = exports.login = exports.seed = exports.TestRouter = exports.vcDiskUtil = exports.FakeSkillViewController = exports.MercuryFixture = exports.ViewControllerFixture = exports.RoleFixture = exports.ViewFixture = exports.LocationFixture = exports.SkillFixture = exports.PersonFixture = exports.StoreFixture = exports.OrganizationFixture = exports.AbstractSpruceFixtureTest = void 0;
|
|
21
21
|
var AbstractSpruceFixtureTest_1 = require("./tests/AbstractSpruceFixtureTest");
|
|
22
22
|
Object.defineProperty(exports, "AbstractSpruceFixtureTest", { enumerable: true, get: function () { return __importDefault(AbstractSpruceFixtureTest_1).default; } });
|
|
23
23
|
__exportStar(require("./types/fixture.types"), exports);
|
|
@@ -63,6 +63,8 @@ var ClientProxyDecorator_1 = require("./ClientProxyDecorator");
|
|
|
63
63
|
Object.defineProperty(exports, "ClientProxyDecorator", { enumerable: true, get: function () { return __importDefault(ClientProxyDecorator_1).default; } });
|
|
64
64
|
var FakeThemeManager_1 = require("./__tests__/support/FakeThemeManager");
|
|
65
65
|
Object.defineProperty(exports, "FakeThemeManager", { enumerable: true, get: function () { return __importDefault(FakeThemeManager_1).default; } });
|
|
66
|
+
var SpyScope_1 = require("./tests/fixtures/SpyScope");
|
|
67
|
+
Object.defineProperty(exports, "SpyScope", { enumerable: true, get: function () { return __importDefault(SpyScope_1).default; } });
|
|
66
68
|
/**
|
|
67
69
|
* @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
|
|
68
70
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Scope } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import LocationFixture from './LocationFixture';
|
|
3
3
|
import OrganizationFixture from './OrganizationFixture';
|
|
4
|
-
export default class
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export default class SpyScope implements Scope {
|
|
5
|
+
currentOrgId?: string | null;
|
|
6
|
+
currentLocationId?: string | null;
|
|
7
7
|
private organizationFixture;
|
|
8
8
|
private locationFixture;
|
|
9
9
|
constructor(options: {
|
|
@@ -11,8 +11,8 @@ export default class TestScope implements Scope {
|
|
|
11
11
|
locationFixture: LocationFixture;
|
|
12
12
|
});
|
|
13
13
|
getCurrentOrganization(): Promise<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema, false>> | null>;
|
|
14
|
-
setCurrentOrganization(id: string): void;
|
|
14
|
+
setCurrentOrganization(id: string | null): void;
|
|
15
15
|
getCurrentLocation(): Promise<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>> | null>;
|
|
16
|
-
setCurrentLocation(id: string): void;
|
|
16
|
+
setCurrentLocation(id: string | null): void;
|
|
17
17
|
clearSession(): void;
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class
|
|
3
|
+
class SpyScope {
|
|
4
4
|
constructor(options) {
|
|
5
5
|
this.organizationFixture = options.organizationFixture;
|
|
6
6
|
this.locationFixture = options.locationFixture;
|
|
@@ -43,4 +43,4 @@ class TestScope {
|
|
|
43
43
|
this.currentLocationId = undefined;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
exports.default =
|
|
46
|
+
exports.default = SpyScope;
|
|
@@ -10,6 +10,7 @@ import TestRouter from '../routers/TestRouter';
|
|
|
10
10
|
import SpyAuthorizer from '../SpyAuthorizer';
|
|
11
11
|
import FixtureFactory from './FixtureFactory';
|
|
12
12
|
import PersonFixture from './PersonFixture';
|
|
13
|
+
import SpyScope from './SpyScope';
|
|
13
14
|
declare type Factory = TestConnectFactory;
|
|
14
15
|
declare type Client = MercuryClient;
|
|
15
16
|
export default class ViewFixture {
|
|
@@ -54,7 +55,7 @@ export default class ViewFixture {
|
|
|
54
55
|
getThemes(): import("../..").FakeThemeManager;
|
|
55
56
|
private assertScopeRequirementsMet;
|
|
56
57
|
setScope(scope: Scope): void;
|
|
57
|
-
getScope():
|
|
58
|
+
getScope(): SpyScope;
|
|
58
59
|
getLocale(): Locale;
|
|
59
60
|
getRouter(): TestRouter;
|
|
60
61
|
getAuthenticator(): import("@sprucelabs/heartwood-view-controllers").Authenticator;
|
|
@@ -14,7 +14,7 @@ const vcDisk_utility_1 = __importDefault(require("../../utilities/vcDisk.utility
|
|
|
14
14
|
const Fake_svc_1 = __importDefault(require("../Fake.svc"));
|
|
15
15
|
const TestRouter_1 = __importDefault(require("../routers/TestRouter"));
|
|
16
16
|
const SpyAuthorizer_1 = __importDefault(require("../SpyAuthorizer"));
|
|
17
|
-
const
|
|
17
|
+
const SpyScope_1 = __importDefault(require("./SpyScope"));
|
|
18
18
|
class ViewFixture {
|
|
19
19
|
constructor(options) {
|
|
20
20
|
var _a, _b;
|
|
@@ -192,7 +192,7 @@ class ViewFixture {
|
|
|
192
192
|
}
|
|
193
193
|
getScope() {
|
|
194
194
|
if (!ViewFixture.scope) {
|
|
195
|
-
ViewFixture.scope = new
|
|
195
|
+
ViewFixture.scope = new SpyScope_1.default({
|
|
196
196
|
organizationFixture: this.orgs,
|
|
197
197
|
locationFixture: this.locations,
|
|
198
198
|
});
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@sprucelabs/spruce-test-fixtures"
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
"version": "46.0.
|
|
16
|
+
"version": "46.0.18",
|
|
17
17
|
"files": [
|
|
18
18
|
"build/**/*",
|
|
19
19
|
"!build/__tests__",
|
|
@@ -62,29 +62,29 @@
|
|
|
62
62
|
"lint.tsc": "tsc -p . --noEmit"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@sprucelabs/data-stores": "^18.0.
|
|
65
|
+
"@sprucelabs/data-stores": "^18.0.22",
|
|
66
66
|
"@sprucelabs/error": "^5.0.491",
|
|
67
|
-
"@sprucelabs/heartwood-view-controllers": "^87.0.
|
|
68
|
-
"@sprucelabs/mercury-client": "^31.0.
|
|
69
|
-
"@sprucelabs/mercury-core-events": "^12.0.
|
|
70
|
-
"@sprucelabs/mercury-event-emitter": "^31.0.
|
|
71
|
-
"@sprucelabs/schema": "^28.4.
|
|
72
|
-
"@sprucelabs/spruce-core-schemas": "^34.2.
|
|
73
|
-
"@sprucelabs/spruce-event-utils": "^27.0.
|
|
74
|
-
"@sprucelabs/spruce-skill-booter": "^46.0.
|
|
75
|
-
"@sprucelabs/spruce-skill-utils": "^26.4.
|
|
67
|
+
"@sprucelabs/heartwood-view-controllers": "^87.0.11",
|
|
68
|
+
"@sprucelabs/mercury-client": "^31.0.131",
|
|
69
|
+
"@sprucelabs/mercury-core-events": "^12.0.130",
|
|
70
|
+
"@sprucelabs/mercury-event-emitter": "^31.0.131",
|
|
71
|
+
"@sprucelabs/schema": "^28.4.10",
|
|
72
|
+
"@sprucelabs/spruce-core-schemas": "^34.2.38",
|
|
73
|
+
"@sprucelabs/spruce-event-utils": "^27.0.109",
|
|
74
|
+
"@sprucelabs/spruce-skill-booter": "^46.0.18",
|
|
75
|
+
"@sprucelabs/spruce-skill-utils": "^26.4.12",
|
|
76
76
|
"dotenv": "^16.0.1",
|
|
77
77
|
"unique-names-generator": "^4.7.1"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@sprucelabs/esm-postbuild": "^1.0.
|
|
81
|
-
"@sprucelabs/jest-json-reporter": "^6.0.
|
|
82
|
-
"@sprucelabs/jest-sheets-reporter": "^1.3.
|
|
83
|
-
"@sprucelabs/mercury-types": "^35.0.
|
|
80
|
+
"@sprucelabs/esm-postbuild": "^1.0.542",
|
|
81
|
+
"@sprucelabs/jest-json-reporter": "^6.0.438",
|
|
82
|
+
"@sprucelabs/jest-sheets-reporter": "^1.3.73",
|
|
83
|
+
"@sprucelabs/mercury-types": "^35.0.80",
|
|
84
84
|
"@sprucelabs/resolve-path-aliases": "^1.1.78",
|
|
85
85
|
"@sprucelabs/semantic-release": "^4.0.8",
|
|
86
86
|
"@sprucelabs/test": "^7.7.341",
|
|
87
|
-
"@sprucelabs/test-utils": "^3.1.
|
|
87
|
+
"@sprucelabs/test-utils": "^3.1.49",
|
|
88
88
|
"@types/node": "17.0.5",
|
|
89
89
|
"calendar-utils": "^0.10.1",
|
|
90
90
|
"chokidar-cli": "^3.0.0",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
]
|
|
132
132
|
]
|
|
133
133
|
},
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "39ab94845936bea80fbb1f6a8a95ddc743775ea1"
|
|
135
135
|
}
|