@sprucelabs/spruce-test-fixtures 49.0.39 → 49.0.42

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.
Files changed (135) hide show
  1. package/build/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.js +5 -5
  2. package/build/__tests__/behavioral/DatabaseFixture.test.d.ts +1 -1
  3. package/build/__tests__/behavioral/DatabaseFixture.test.js +7 -7
  4. package/build/__tests__/behavioral/DbResetsAsExpected.test.js +4 -4
  5. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +18 -18
  6. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +3 -3
  7. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +5 -5
  8. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +9 -9
  9. package/build/__tests__/behavioral/FakingEventResponses.test.js +15 -15
  10. package/build/__tests__/behavioral/FixtureFactory.test.d.ts +1 -1
  11. package/build/__tests__/behavioral/FixtureFactory.test.js +14 -14
  12. package/build/__tests__/behavioral/LocationFixture.test.js +17 -17
  13. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +11 -11
  14. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +3 -3
  15. package/build/__tests__/behavioral/MercuryFixture.test.js +28 -28
  16. package/build/__tests__/behavioral/OrganizationFixture.test.js +50 -50
  17. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +3 -3
  18. package/build/__tests__/behavioral/PersonFixture.test.d.ts +1 -1
  19. package/build/__tests__/behavioral/PersonFixture.test.js +37 -37
  20. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +22 -22
  21. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +5 -5
  22. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +3 -3
  23. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +5 -5
  24. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +9 -9
  25. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +4 -4
  26. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +2 -2
  27. package/build/__tests__/behavioral/RoleFixture.test.js +15 -15
  28. package/build/__tests__/behavioral/SeedingData.test.js +43 -43
  29. package/build/__tests__/behavioral/SkillFixture.test.js +22 -22
  30. package/build/__tests__/behavioral/StoreFixture.test.d.ts +1 -1
  31. package/build/__tests__/behavioral/StoreFixture.test.js +20 -20
  32. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +11 -11
  33. package/build/__tests__/behavioral/faking/FakeDecorator.test.js +74 -74
  34. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +3 -3
  35. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +3 -3
  36. package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +1 -1
  37. package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +8 -8
  38. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +6 -6
  39. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +15 -15
  40. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +5 -5
  41. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +5 -5
  42. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +19 -19
  43. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +41 -41
  44. package/build/__tests__/behavioral/faking/UpdatePerson.test.js +5 -5
  45. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +60 -60
  46. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +1 -1
  47. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +4 -4
  48. package/build/__tests__/behavioral/faking/WhoAmI.test.js +12 -12
  49. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +17 -17
  50. package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +54 -54
  51. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +16 -16
  52. package/build/__tests__/behavioral/views/CheckingPermissions.test.js +30 -30
  53. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +8 -8
  54. package/build/__tests__/behavioral/views/Routing.test.js +30 -30
  55. package/build/__tests__/behavioral/views/TestingScope.test.js +10 -10
  56. package/build/__tests__/behavioral/views/ViewFixture.test.js +107 -107
  57. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +10 -10
  58. package/build/__tests__/support/AbstractFakeDecoratorTest.js +4 -4
  59. package/build/esm/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.js +1 -1
  60. package/build/esm/__tests__/behavioral/DatabaseFixture.test.d.ts +1 -1
  61. package/build/esm/__tests__/behavioral/DatabaseFixture.test.js +1 -1
  62. package/build/esm/__tests__/behavioral/DbResetsAsExpected.test.js +1 -1
  63. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +1 -1
  64. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +1 -1
  65. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +1 -1
  66. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +1 -1
  67. package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +1 -1
  68. package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +1 -1
  69. package/build/esm/__tests__/behavioral/FixtureFactory.test.js +1 -1
  70. package/build/esm/__tests__/behavioral/LocationFixture.test.js +1 -1
  71. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +1 -1
  72. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +1 -1
  73. package/build/esm/__tests__/behavioral/MercuryFixture.test.js +1 -1
  74. package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +1 -1
  75. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +1 -1
  76. package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +1 -1
  77. package/build/esm/__tests__/behavioral/PersonFixture.test.js +1 -1
  78. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +1 -1
  79. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +1 -1
  80. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +1 -1
  81. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +1 -1
  82. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +1 -1
  83. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +1 -1
  84. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +1 -1
  85. package/build/esm/__tests__/behavioral/RoleFixture.test.js +1 -1
  86. package/build/esm/__tests__/behavioral/SeedingData.test.js +1 -1
  87. package/build/esm/__tests__/behavioral/SkillFixture.test.js +1 -1
  88. package/build/esm/__tests__/behavioral/StoreFixture.test.d.ts +1 -1
  89. package/build/esm/__tests__/behavioral/StoreFixture.test.js +1 -1
  90. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +1 -1
  91. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +1 -1
  92. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +1 -1
  93. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +1 -1
  94. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +1 -1
  95. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +1 -1
  96. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +1 -1
  97. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +1 -1
  98. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +1 -1
  99. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +1 -1
  100. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +1 -1
  101. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +1 -1
  102. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +1 -1
  103. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +1 -1
  104. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +1 -1
  105. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +1 -1
  106. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +1 -1
  107. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +1 -1
  108. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +1 -1
  109. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +1 -1
  110. package/build/esm/__tests__/behavioral/views/CheckingPermissions.test.js +1 -1
  111. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +1 -1
  112. package/build/esm/__tests__/behavioral/views/Routing.test.js +1 -1
  113. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +1 -1
  114. package/build/esm/__tests__/behavioral/views/ViewFixture.test.js +1 -1
  115. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +1 -1
  116. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +1 -1
  117. package/build/esm/tests/AbstractSpruceFixtureTest.js +1 -1
  118. package/build/esm/tests/SpyAuthorizer.js +1 -1
  119. package/build/esm/tests/decorators/fake.js +1 -1
  120. package/build/esm/tests/decorators/install.js +1 -1
  121. package/build/esm/tests/decorators/login.js +1 -1
  122. package/build/esm/tests/decorators/seed.js +1 -1
  123. package/build/esm/tests/fixtures/LocationFixture.js +1 -1
  124. package/build/esm/tests/fixtures/RoleFixture.js +1 -1
  125. package/build/esm/tests/fixtures/SeedFixture.js +1 -1
  126. package/build/tests/AbstractSpruceFixtureTest.js +3 -3
  127. package/build/tests/SpyAuthorizer.js +3 -3
  128. package/build/tests/decorators/fake.js +20 -20
  129. package/build/tests/decorators/install.js +3 -3
  130. package/build/tests/decorators/login.js +4 -4
  131. package/build/tests/decorators/seed.js +2 -2
  132. package/build/tests/fixtures/LocationFixture.js +3 -3
  133. package/build/tests/fixtures/RoleFixture.js +2 -2
  134. package/build/tests/fixtures/SeedFixture.js +2 -2
  135. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import AbstractSpruceTest from '@sprucelabs/test';
1
+ import AbstractSpruceTest from '@sprucelabs/test-utils';
2
2
  export default class UsingFakesOnIncompatibleClassTest extends AbstractSpruceTest {
3
3
  protected static shouldNotCrash(): Promise<void>;
4
4
  }
@@ -32,15 +32,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
32
32
  return (mod && mod.__esModule) ? mod : { "default": mod };
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- const test_1 = __importStar(require("@sprucelabs/test"));
35
+ const test_utils_1 = __importStar(require("@sprucelabs/test-utils"));
36
36
  const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
37
- let UsingFakesOnIncompatibleClassTest = class UsingFakesOnIncompatibleClassTest extends test_1.default {
37
+ let UsingFakesOnIncompatibleClassTest = class UsingFakesOnIncompatibleClassTest extends test_utils_1.default {
38
38
  static async shouldNotCrash() {
39
- test_1.assert.isTrue(true);
39
+ test_utils_1.assert.isTrue(true);
40
40
  }
41
41
  };
42
42
  __decorate([
43
- (0, test_1.test)()
43
+ (0, test_utils_1.test)()
44
44
  ], UsingFakesOnIncompatibleClassTest, "shouldNotCrash", null);
45
45
  UsingFakesOnIncompatibleClassTest = __decorate([
46
46
  fake_1.default.login()
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_1 = require("@sprucelabs/test");
12
+ const test_utils_1 = require("@sprucelabs/test-utils");
13
13
  const __1 = require("../../..");
14
14
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
15
15
  let WhoAmITest = class WhoAmITest extends AbstractSpruceFixtureTest_1.default {
@@ -34,29 +34,29 @@ let WhoAmITest = class WhoAmITest extends AbstractSpruceFixtureTest_1.default {
34
34
  });
35
35
  }
36
36
  static async authIsResetBeforeEachSoListenersAreReset() {
37
- test_1.assert.isNotEqual(this.views.getAuthenticator(), this.auth);
37
+ test_utils_1.assert.isNotEqual(this.views.getAuthenticator(), this.auth);
38
38
  await __1.fake.getClient().emitAndFlattenResponses('whoami::v2020_12_25');
39
- test_1.assert.isEqual(this.didLoginCount, 0);
39
+ test_utils_1.assert.isEqual(this.didLoginCount, 0);
40
40
  }
41
41
  static async canRegisterProxyToken() {
42
42
  const proxy = await this.registerOwnerProxy();
43
- test_1.assert.isTruthy(proxy);
43
+ test_utils_1.assert.isTruthy(proxy);
44
44
  const proxy2 = await this.registerOwnerProxy();
45
- test_1.assert.isNotEqual(proxy, proxy2);
45
+ test_utils_1.assert.isNotEqual(proxy, proxy2);
46
46
  }
47
47
  static async canUseProxyToEmitAsOtherPerson() {
48
48
  const { client } = await this.loginAsOutsider();
49
49
  const proxy = await this.registerOwnerProxy();
50
50
  client.setProxyToken(proxy);
51
51
  const auth = await this.emitWhoAmI(client);
52
- test_1.assert.isEqualDeep(auth.person, this.fakedPerson);
52
+ test_utils_1.assert.isEqualDeep(auth.person, this.fakedPerson);
53
53
  }
54
54
  static async canUseProxyAsSecondPerson() {
55
55
  const { client, person } = await this.loginAsOutsider();
56
56
  const proxy = await client.registerProxyToken();
57
57
  this.client.setProxyToken(proxy);
58
58
  const auth = await this.emitWhoAmI();
59
- test_1.assert.isEqualDeep(auth.person, person);
59
+ test_utils_1.assert.isEqualDeep(auth.person, person);
60
60
  }
61
61
  static async loginAsOutsider() {
62
62
  const { client, person } = await this.people.loginAsDemoPerson('555-555-1234');
@@ -83,19 +83,19 @@ let WhoAmITest = class WhoAmITest extends AbstractSpruceFixtureTest_1.default {
83
83
  };
84
84
  WhoAmITest.didLoginCount = 0;
85
85
  __decorate([
86
- (0, test_1.test)()
86
+ (0, test_utils_1.test)()
87
87
  ], WhoAmITest, "canWhoAmI", null);
88
88
  __decorate([
89
- (0, test_1.test)()
89
+ (0, test_utils_1.test)()
90
90
  ], WhoAmITest, "authIsResetBeforeEachSoListenersAreReset", null);
91
91
  __decorate([
92
- (0, test_1.test)()
92
+ (0, test_utils_1.test)()
93
93
  ], WhoAmITest, "canRegisterProxyToken", null);
94
94
  __decorate([
95
- (0, test_1.test)()
95
+ (0, test_utils_1.test)()
96
96
  ], WhoAmITest, "canUseProxyToEmitAsOtherPerson", null);
97
97
  __decorate([
98
- (0, test_1.test)()
98
+ (0, test_utils_1.test)()
99
99
  ], WhoAmITest, "canUseProxyAsSecondPerson", null);
100
100
  WhoAmITest = __decorate([
101
101
  __1.fake.login()
@@ -10,8 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
13
- const test_1 = require("@sprucelabs/test");
14
13
  const test_utils_1 = require("@sprucelabs/test-utils");
14
+ const test_utils_2 = require("@sprucelabs/test-utils");
15
15
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
16
16
  const SpyMapUtil_1 = __importDefault(require("../../../utilities/SpyMapUtil"));
17
17
  class SpyCard extends heartwood_view_controllers_1.CardViewControllerImpl {
@@ -29,48 +29,48 @@ class SpyingMapUtilTest extends AbstractSpruceFixtureTest_1.default {
29
29
  });
30
30
  }
31
31
  static async canCreateSpyingMapUtil() {
32
- test_1.assert.isTruthy(SpyMapUtil_1.default);
32
+ test_utils_1.assert.isTruthy(SpyMapUtil_1.default);
33
33
  }
34
34
  static async dropsIntoViewFixture() {
35
- test_1.assert.isEqual(this.maps, SpyMapUtil_1.default);
35
+ test_utils_1.assert.isEqual(this.maps, SpyMapUtil_1.default);
36
36
  }
37
37
  static async dropsSpyIntoVc() {
38
38
  const vc = this.views.Controller('spy', {});
39
- test_1.assert.isEqual(vc.getMaps(), this.maps);
39
+ test_utils_1.assert.isEqual(vc.getMaps(), this.maps);
40
40
  }
41
41
  static async redirectingIsTracked() {
42
42
  var _a;
43
43
  const address = {
44
- city: (0, test_utils_1.generateId)(),
45
- country: (0, test_utils_1.generateId)(),
46
- province: (0, test_utils_1.generateId)(),
47
- street1: (0, test_utils_1.generateId)(),
48
- street2: (0, test_utils_1.generateId)(),
49
- zip: (0, test_utils_1.generateId)(),
44
+ city: (0, test_utils_2.generateId)(),
45
+ country: (0, test_utils_2.generateId)(),
46
+ province: (0, test_utils_2.generateId)(),
47
+ street1: (0, test_utils_2.generateId)(),
48
+ street2: (0, test_utils_2.generateId)(),
49
+ zip: (0, test_utils_2.generateId)(),
50
50
  };
51
51
  this.maps.openNavigation({ to: address });
52
- test_1.assert.isEqualDeep((_a = this.maps.lastOpenNavigationOptions) === null || _a === void 0 ? void 0 : _a.to, address);
52
+ test_utils_1.assert.isEqualDeep((_a = this.maps.lastOpenNavigationOptions) === null || _a === void 0 ? void 0 : _a.to, address);
53
53
  }
54
54
  static async resetsLastOpenNavBetweenTests() {
55
- test_1.assert.isFalsy(this.maps.lastOpenNavigationOptions);
55
+ test_utils_1.assert.isFalsy(this.maps.lastOpenNavigationOptions);
56
56
  }
57
57
  static get maps() {
58
58
  return this.views.getMaps();
59
59
  }
60
60
  }
61
61
  __decorate([
62
- (0, test_1.test)()
62
+ (0, test_utils_1.test)()
63
63
  ], SpyingMapUtilTest, "canCreateSpyingMapUtil", null);
64
64
  __decorate([
65
- (0, test_1.test)()
65
+ (0, test_utils_1.test)()
66
66
  ], SpyingMapUtilTest, "dropsIntoViewFixture", null);
67
67
  __decorate([
68
- (0, test_1.test)()
68
+ (0, test_utils_1.test)()
69
69
  ], SpyingMapUtilTest, "dropsSpyIntoVc", null);
70
70
  __decorate([
71
- (0, test_1.test)()
71
+ (0, test_utils_1.test)()
72
72
  ], SpyingMapUtilTest, "redirectingIsTracked", null);
73
73
  __decorate([
74
- (0, test_1.test)()
74
+ (0, test_utils_1.test)()
75
75
  ], SpyingMapUtilTest, "resetsLastOpenNavBetweenTests", null);
76
76
  exports.default = SpyingMapUtilTest;
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
13
13
  const mercury_client_1 = require("@sprucelabs/mercury-client");
14
- const test_1 = require("@sprucelabs/test");
14
+ const test_utils_1 = require("@sprucelabs/test-utils");
15
15
  const __1 = require("../../..");
16
16
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
17
17
  const constants_1 = require("../../../tests/constants");
@@ -22,43 +22,43 @@ const Good_store_1 = __importDefault(require("../../testDirsAndFiles/one-good-st
22
22
  const DummyStore_1 = require("../DummyStore");
23
23
  let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtureTest_1.default {
24
24
  static async beforeEach() {
25
- test_1.assert.isTrue(mercury_client_1.MercuryClientFactory.isInTestMode());
25
+ test_utils_1.assert.isTrue(mercury_client_1.MercuryClientFactory.isInTestMode());
26
26
  this.goodStore = await this.Fixture('store').Store('good');
27
27
  await this.assertCountGoods(5);
28
28
  await super.beforeEach();
29
29
  const auth = heartwood_view_controllers_1.AuthenticatorImpl.getInstance();
30
- test_1.assert.isTruthy(auth.getSessionToken());
30
+ test_utils_1.assert.isTruthy(auth.getSessionToken());
31
31
  const client = login_1.default.getClient();
32
32
  const person = login_1.default.getPerson();
33
33
  //@ts-ignore
34
- test_1.assert.isEqualDeep(person, client.auth.person);
35
- test_1.assert.isTruthy(client);
36
- test_1.assert.isTrue(client.isConnected());
37
- test_1.assert.isTrue(client.getIsTestClient());
34
+ test_utils_1.assert.isEqualDeep(person, client.auth.person);
35
+ test_utils_1.assert.isTruthy(client);
36
+ test_utils_1.assert.isTrue(client.isConnected());
37
+ test_utils_1.assert.isTrue(client.getIsTestClient());
38
38
  this.lastClient = client;
39
39
  //@ts-ignore
40
- test_1.assert.isEqualDeep(auth.getPerson(), client.auth.person);
40
+ test_utils_1.assert.isEqualDeep(auth.getPerson(), client.auth.person);
41
41
  //@ts-ignore
42
- test_1.assert.isEqualDeep(auth.getSessionToken(), client.auth.token);
42
+ test_utils_1.assert.isEqualDeep(auth.getSessionToken(), client.auth.token);
43
43
  this.goodStore = await this.Fixture('store').Store('good');
44
44
  await this.assertCountGoods(5);
45
45
  }
46
46
  static async afterAll() {
47
47
  await super.afterAll();
48
48
  const client = __1.MercuryFixture.getDefaultClient();
49
- test_1.assert.isFalsy(client);
50
- test_1.assert.isFalse(this.lastClient.isConnected());
49
+ test_utils_1.assert.isFalsy(client);
50
+ test_utils_1.assert.isFalse(this.lastClient.isConnected());
51
51
  }
52
52
  static async loginSetsDefaultClient() {
53
53
  const client = __1.MercuryFixture.getDefaultClient();
54
- test_1.assert.isTruthy(client);
55
- test_1.assert.isTrue(client.isConnected());
54
+ test_utils_1.assert.isTruthy(client);
55
+ test_utils_1.assert.isTrue(client.isConnected());
56
56
  }
57
57
  static async retainsClientBetweenTests() {
58
58
  const client = __1.MercuryFixture.getDefaultClient();
59
- test_1.assert.isTruthy(client);
60
- test_1.assert.isEqual(this.lastClient, client);
61
- test_1.assert.isTrue(client.isConnected());
59
+ test_utils_1.assert.isTruthy(client);
60
+ test_utils_1.assert.isEqual(this.lastClient, client);
61
+ test_utils_1.assert.isTrue(client.isConnected());
62
62
  }
63
63
  static async canSeedThreeOrgs() {
64
64
  await this.assertCountOrgs(3);
@@ -72,7 +72,7 @@ let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtur
72
72
  static async seededLocationsArePublic() {
73
73
  const locations = await this.locations.listLocations();
74
74
  for (const location of locations) {
75
- test_1.assert.isTrue(location.isPublic);
75
+ test_utils_1.assert.isTrue(location.isPublic);
76
76
  }
77
77
  }
78
78
  static async canSeedTenLocations() {
@@ -83,22 +83,22 @@ let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtur
83
83
  await this.assertCountOrgs(10);
84
84
  }
85
85
  static async canSeedStores() {
86
- test_1.assert.isTrue(DummyStore_1.DummyStore.wasSeedInvoked);
87
- test_1.assert.isEqualDeep(DummyStore_1.DummyStore.seedOptions, {
86
+ test_utils_1.assert.isTrue(DummyStore_1.DummyStore.wasSeedInvoked);
87
+ test_utils_1.assert.isEqualDeep(DummyStore_1.DummyStore.seedOptions, {
88
88
  totalToSeed: 10,
89
89
  TestClass: this,
90
90
  });
91
91
  }
92
92
  static logsInViewAuthenticator() {
93
- test_1.assert.isTruthy(heartwood_view_controllers_1.AuthenticatorImpl.getInstance().getSessionToken());
93
+ test_utils_1.assert.isTruthy(heartwood_view_controllers_1.AuthenticatorImpl.getInstance().getSessionToken());
94
94
  }
95
95
  static passesThroughArgs(one, two, three) {
96
- test_1.assert.isEqual(one, 1);
97
- test_1.assert.isEqual(two, 1);
98
- test_1.assert.isEqual(three, 1);
96
+ test_utils_1.assert.isEqual(one, 1);
97
+ test_utils_1.assert.isEqual(two, 1);
98
+ test_utils_1.assert.isEqual(three, 1);
99
99
  }
100
100
  static passesThroughArgs2(one) {
101
- test_1.assert.isEqualDeep(one, { hello: 'world' });
101
+ test_utils_1.assert.isEqualDeep(one, { hello: 'world' });
102
102
  }
103
103
  static async seedsAddToBeforeEach() {
104
104
  await this.assertCountGoods(10);
@@ -107,14 +107,14 @@ let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtur
107
107
  await this.assertCountGoods(6);
108
108
  }
109
109
  static async canGetClientOffLogin() {
110
- test_1.assert.isFunction(login_1.default.getClient);
111
- test_1.assert.isEqual(login_1.default.getClient(), __1.MercuryFixture.getDefaultClient());
110
+ test_utils_1.assert.isFunction(login_1.default.getClient);
111
+ test_utils_1.assert.isEqual(login_1.default.getClient(), __1.MercuryFixture.getDefaultClient());
112
112
  }
113
113
  static async storeGetsVariablesPassed() {
114
- test_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['hello', 'world']);
114
+ test_utils_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['hello', 'world']);
115
115
  }
116
116
  static async storeGetsVariablesPassed2() {
117
- test_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['goodbye', 'people']);
117
+ test_utils_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['goodbye', 'people']);
118
118
  }
119
119
  static async canSeedPeople(baseCounts) {
120
120
  await this.assertExpectedSeededPeople(baseCounts);
@@ -131,30 +131,30 @@ let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtur
131
131
  }
132
132
  static async assertCountOrgs(expected) {
133
133
  const organizations = await this.organizations.listOrganizations();
134
- test_1.assert.isLength(organizations, expected);
134
+ test_utils_1.assert.isLength(organizations, expected);
135
135
  }
136
136
  static async assertCountLocations(expected) {
137
137
  const org = await this.views.getScope().getCurrentOrganization();
138
- test_1.assert.isTruthy(org);
138
+ test_utils_1.assert.isTruthy(org);
139
139
  const organizationId = org.id;
140
140
  const locations = await this.locations.listLocations(organizationId);
141
- test_1.assert.isLength(locations, expected);
141
+ test_utils_1.assert.isLength(locations, expected);
142
142
  }
143
143
  static async assertCountGoods(expected) {
144
144
  const goodStore = await this.stores.Store('good');
145
145
  const count = await goodStore.count({});
146
- test_1.assert.isEqual(count, expected);
146
+ test_utils_1.assert.isEqual(count, expected);
147
147
  const localCount = await this.goodStore.count({});
148
- test_1.assert.isEqual(localCount, expected, 'The store built in beforeEach is pointing at stale database.');
148
+ test_utils_1.assert.isEqual(localCount, expected, 'The store built in beforeEach is pointing at stale database.');
149
149
  }
150
150
  static async assertTotalPeopleByRole(roleBase, total) {
151
151
  const org = await this.organizations.getNewestOrganization();
152
- test_1.assert.isTruthy(org);
152
+ test_utils_1.assert.isTruthy(org);
153
153
  const teammates = await this.people.listPeople({
154
154
  organizationId: org.id,
155
155
  roleBases: [roleBase],
156
156
  });
157
- test_1.assert.isLength(teammates, total);
157
+ test_utils_1.assert.isLength(teammates, total);
158
158
  }
159
159
  };
160
160
  __decorate([
@@ -162,72 +162,72 @@ __decorate([
162
162
  (0, seed_1.default)('dummies', 10)
163
163
  ], UsingDecoratorsTest, "beforeEach", null);
164
164
  __decorate([
165
- (0, test_1.test)()
165
+ (0, test_utils_1.test)()
166
166
  ], UsingDecoratorsTest, "loginSetsDefaultClient", null);
167
167
  __decorate([
168
- (0, test_1.test)()
168
+ (0, test_utils_1.test)()
169
169
  ], UsingDecoratorsTest, "retainsClientBetweenTests", null);
170
170
  __decorate([
171
- (0, test_1.test)(),
171
+ (0, test_utils_1.test)(),
172
172
  (0, seed_1.default)('organizations', 3)
173
173
  ], UsingDecoratorsTest, "canSeedThreeOrgs", null);
174
174
  __decorate([
175
- (0, test_1.test)(),
175
+ (0, test_utils_1.test)(),
176
176
  (0, seed_1.default)('organizations', 5)
177
177
  ], UsingDecoratorsTest, "canSeedFiveOrgs", null);
178
178
  __decorate([
179
- (0, test_1.test)(),
179
+ (0, test_utils_1.test)(),
180
180
  (0, seed_1.default)('locations', 3)
181
181
  ], UsingDecoratorsTest, "canSeedTwoLocations", null);
182
182
  __decorate([
183
- (0, test_1.test)(),
183
+ (0, test_utils_1.test)(),
184
184
  (0, seed_1.default)('locations', 3)
185
185
  ], UsingDecoratorsTest, "seededLocationsArePublic", null);
186
186
  __decorate([
187
- (0, test_1.test)(),
187
+ (0, test_utils_1.test)(),
188
188
  (0, seed_1.default)('locations', 10)
189
189
  ], UsingDecoratorsTest, "canSeedTenLocations", null);
190
190
  __decorate([
191
- (0, test_1.test)(),
191
+ (0, test_utils_1.test)(),
192
192
  (0, seed_1.default)('organizations', 10),
193
193
  (0, seed_1.default)('locations', 10)
194
194
  ], UsingDecoratorsTest, "locationUsesLatestOrg", null);
195
195
  __decorate([
196
- (0, test_1.test)(),
196
+ (0, test_utils_1.test)(),
197
197
  (0, seed_1.default)('dummies', 10)
198
198
  ], UsingDecoratorsTest, "canSeedStores", null);
199
199
  __decorate([
200
- (0, test_1.test)()
200
+ (0, test_utils_1.test)()
201
201
  ], UsingDecoratorsTest, "logsInViewAuthenticator", null);
202
202
  __decorate([
203
- (0, test_1.test)('passes through args 1', 1, 1, 1),
203
+ (0, test_utils_1.test)('passes through args 1', 1, 1, 1),
204
204
  (0, seed_1.default)('dummies', 3)
205
205
  ], UsingDecoratorsTest, "passesThroughArgs", null);
206
206
  __decorate([
207
- (0, test_1.test)('passes through args 2', { hello: 'world' }),
207
+ (0, test_utils_1.test)('passes through args 2', { hello: 'world' }),
208
208
  (0, seed_1.default)('dummies', 3)
209
209
  ], UsingDecoratorsTest, "passesThroughArgs2", null);
210
210
  __decorate([
211
- (0, test_1.test)(),
211
+ (0, test_utils_1.test)(),
212
212
  (0, seed_1.default)('good', 5)
213
213
  ], UsingDecoratorsTest, "seedsAddToBeforeEach", null);
214
214
  __decorate([
215
- (0, test_1.test)(),
215
+ (0, test_utils_1.test)(),
216
216
  (0, seed_1.default)('good', 1)
217
217
  ], UsingDecoratorsTest, "seedsAddToBeforeEachButNotLastRun", null);
218
218
  __decorate([
219
- (0, test_1.test)()
219
+ (0, test_utils_1.test)()
220
220
  ], UsingDecoratorsTest, "canGetClientOffLogin", null);
221
221
  __decorate([
222
- (0, test_1.test)(),
222
+ (0, test_utils_1.test)(),
223
223
  (0, seed_1.default)('good', 1, 'hello', 'world')
224
224
  ], UsingDecoratorsTest, "storeGetsVariablesPassed", null);
225
225
  __decorate([
226
- (0, test_1.test)(),
226
+ (0, test_utils_1.test)(),
227
227
  (0, seed_1.default)('good', 1, 'goodbye', 'people')
228
228
  ], UsingDecoratorsTest, "storeGetsVariablesPassed2", null);
229
229
  __decorate([
230
- (0, test_1.test)('can seed people', {
230
+ (0, test_utils_1.test)('can seed people', {
231
231
  guest: 2,
232
232
  teammate: 2,
233
233
  groupManager: 2,
@@ -243,7 +243,7 @@ __decorate([
243
243
  (0, seed_1.default)('owners', 2)
244
244
  ], UsingDecoratorsTest, "canSeedPeople", null);
245
245
  __decorate([
246
- (0, test_1.test)('can seed more people', {
246
+ (0, test_utils_1.test)('can seed more people', {
247
247
  guest: 5,
248
248
  teammate: 5,
249
249
  groupManager: 3,
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_1 = require("@sprucelabs/test");
12
+ const test_utils_1 = require("@sprucelabs/test-utils");
13
13
  const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
14
14
  const constants_1 = require("../../../tests/constants");
15
15
  const install_1 = __importDefault(require("../../../tests/decorators/install"));
@@ -21,11 +21,11 @@ let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extend
21
21
  this.skill = await this.skills.seedDemoSkill();
22
22
  }
23
23
  static throwsWhenMissingNamespaces() {
24
- test_1.assert.doesThrow(() => install_1.default.skills());
24
+ test_utils_1.assert.doesThrow(() => install_1.default.skills());
25
25
  }
26
26
  static returnsDecorator() {
27
27
  const decorator = this.getDecorator();
28
- test_1.assert.isFunction(decorator);
28
+ test_utils_1.assert.isFunction(decorator);
29
29
  }
30
30
  static async callsOriginalTestMethod() {
31
31
  let wasHit = false;
@@ -34,7 +34,7 @@ let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extend
34
34
  wasHit = true;
35
35
  },
36
36
  });
37
- test_1.assert.isTrue(wasHit);
37
+ test_utils_1.assert.isTrue(wasHit);
38
38
  }
39
39
  static async passesThroughOriginalArgs(args) {
40
40
  let passedArgs;
@@ -44,13 +44,13 @@ let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extend
44
44
  },
45
45
  args,
46
46
  });
47
- test_1.assert.isEqualDeep(passedArgs, args);
47
+ test_utils_1.assert.isEqualDeep(passedArgs, args);
48
48
  }
49
49
  static async throwsWithoutSeedingOrg() {
50
- await test_1.assert.doesThrowAsync(() => this.executeDecorator({ testFunction: async () => { } }));
50
+ await test_utils_1.assert.doesThrowAsync(() => this.executeDecorator({ testFunction: async () => { } }));
51
51
  }
52
52
  static async throwsWhenInstallingBadSkill() {
53
- await test_1.assert.doesThrowAsync(() => this.executeDecorator({
53
+ await test_utils_1.assert.doesThrowAsync(() => this.executeDecorator({
54
54
  testFunction: async () => { },
55
55
  namespaces: ['not-found'],
56
56
  }));
@@ -64,7 +64,7 @@ let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extend
64
64
  await this.executeDecorator({
65
65
  testFunction: async () => { },
66
66
  });
67
- test_1.assert.isFalse(passedPayload.shouldNotifySkillOfInstall);
67
+ test_utils_1.assert.isFalse(passedPayload.shouldNotifySkillOfInstall);
68
68
  }
69
69
  static async executeDecorator(options) {
70
70
  const { testFunction, args, namespaces } = options;
@@ -82,29 +82,29 @@ let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extend
82
82
  }
83
83
  };
84
84
  __decorate([
85
- (0, test_1.test)()
85
+ (0, test_utils_1.test)()
86
86
  ], UsingDecoratorsToInstallSkills, "throwsWhenMissingNamespaces", null);
87
87
  __decorate([
88
- (0, test_1.test)()
88
+ (0, test_utils_1.test)()
89
89
  ], UsingDecoratorsToInstallSkills, "returnsDecorator", null);
90
90
  __decorate([
91
- (0, test_1.test)(),
91
+ (0, test_utils_1.test)(),
92
92
  (0, seed_1.default)('organizations', 1)
93
93
  ], UsingDecoratorsToInstallSkills, "callsOriginalTestMethod", null);
94
94
  __decorate([
95
- (0, test_1.test)('passes args 1', [1]),
96
- (0, test_1.test)('passes args 1', ['hello', 'world']),
95
+ (0, test_utils_1.test)('passes args 1', [1]),
96
+ (0, test_utils_1.test)('passes args 1', ['hello', 'world']),
97
97
  (0, seed_1.default)('organizations', 1)
98
98
  ], UsingDecoratorsToInstallSkills, "passesThroughOriginalArgs", null);
99
99
  __decorate([
100
- (0, test_1.test)()
100
+ (0, test_utils_1.test)()
101
101
  ], UsingDecoratorsToInstallSkills, "throwsWithoutSeedingOrg", null);
102
102
  __decorate([
103
- (0, test_1.test)(),
103
+ (0, test_utils_1.test)(),
104
104
  (0, seed_1.default)('organizations', 1)
105
105
  ], UsingDecoratorsToInstallSkills, "throwsWhenInstallingBadSkill", null);
106
106
  __decorate([
107
- (0, test_1.test)(),
107
+ (0, test_utils_1.test)(),
108
108
  (0, seed_1.default)('organizations', 1)
109
109
  ], UsingDecoratorsToInstallSkills, "doesNotEmitDidInstall", null);
110
110
  UsingDecoratorsToInstallSkills = __decorate([