@sprucelabs/spruce-location-utils 2.0.1 → 2.0.2
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.
|
@@ -8,11 +8,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { vcAssertUtil, } from '@sprucelabs/heartwood-view-controllers';
|
|
11
|
+
import { assertOptions } from '@sprucelabs/schema';
|
|
11
12
|
import { TestRouter, } from '@sprucelabs/spruce-test-fixtures';
|
|
12
13
|
import { assert } from '@sprucelabs/test';
|
|
13
14
|
const organizationAssert = {
|
|
14
15
|
assertRedirectsToAddOrgIfNoOrgExists(options) {
|
|
15
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
assertOptions(options, [
|
|
18
|
+
'viewFixture',
|
|
19
|
+
'vc',
|
|
20
|
+
'organizationFixture',
|
|
21
|
+
'didAddOrgRedirectDestination',
|
|
22
|
+
]);
|
|
16
23
|
const { viewFixture, vc, organizationFixture, didAddOrgRedirectDestination: redirectDestination, } = options;
|
|
17
24
|
yield organizationFixture.deleteAllOrganizations();
|
|
18
25
|
TestRouter.setShouldThrowWhenRedirectingToBadSvc(false);
|
|
@@ -34,6 +41,7 @@ const organizationAssert = {
|
|
|
34
41
|
},
|
|
35
42
|
assertDoesNotRedirectToAddAOrgIfOrgExists(options) {
|
|
36
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
assertOptions(options, ['viewFixture', 'vc', 'organizationFixture']);
|
|
37
45
|
const { vc, viewFixture, organizationFixture } = options;
|
|
38
46
|
yield viewFixture.loginAsDemoPerson();
|
|
39
47
|
const latest = yield organizationFixture.getNewestOrganization();
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
|
4
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
4
5
|
const spruce_test_fixtures_1 = require("@sprucelabs/spruce-test-fixtures");
|
|
5
6
|
const test_1 = require("@sprucelabs/test");
|
|
6
7
|
const organizationAssert = {
|
|
7
8
|
async assertRedirectsToAddOrgIfNoOrgExists(options) {
|
|
9
|
+
(0, schema_1.assertOptions)(options, [
|
|
10
|
+
'viewFixture',
|
|
11
|
+
'vc',
|
|
12
|
+
'organizationFixture',
|
|
13
|
+
'didAddOrgRedirectDestination',
|
|
14
|
+
]);
|
|
8
15
|
const { viewFixture, vc, organizationFixture, didAddOrgRedirectDestination: redirectDestination, } = options;
|
|
9
16
|
await organizationFixture.deleteAllOrganizations();
|
|
10
17
|
spruce_test_fixtures_1.TestRouter.setShouldThrowWhenRedirectingToBadSvc(false);
|
|
@@ -24,6 +31,7 @@ const organizationAssert = {
|
|
|
24
31
|
spruce_test_fixtures_1.TestRouter.setShouldThrowWhenRedirectingToBadSvc(true);
|
|
25
32
|
},
|
|
26
33
|
async assertDoesNotRedirectToAddAOrgIfOrgExists(options) {
|
|
34
|
+
(0, schema_1.assertOptions)(options, ['viewFixture', 'vc', 'organizationFixture']);
|
|
27
35
|
const { vc, viewFixture, organizationFixture } = options;
|
|
28
36
|
await viewFixture.loginAsDemoPerson();
|
|
29
37
|
const latest = await organizationFixture.getNewestOrganization();
|