@sprucelabs/spruce-cli 15.2.21 → 15.2.24
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/CHANGELOG.md +24 -0
- package/build/__tests__/behavioral/AddingADependency.test.js +3 -1
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +20 -20
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +12 -12
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js +3 -1
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js +4 -2
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/RebuildingASkill.test.js +2 -2
- package/build/__tests__/behavioral/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js +6 -4
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js +3 -1
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js +3 -1
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js +5 -3
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/WatchingSkillViews.test.js +6 -6
- package/build/__tests__/behavioral/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.d.ts +5 -0
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +242 -119
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +3 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +2 -2
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.d.ts +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +8 -8
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/{UpdatingDependencies.test.d.ts → upgrading/UpdatingDependencies.test.d.ts} +1 -1
- package/build/__tests__/behavioral/{UpdatingDependencies.test.js → upgrading/UpdatingDependencies.test.js} +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -0
- package/build/__tests__/behavioral/{UpdatingDependencies2.test.d.ts → upgrading/UpdatingDependencies2.test.d.ts} +1 -1
- package/build/__tests__/behavioral/{UpdatingDependencies2.test.js → upgrading/UpdatingDependencies2.test.js} +4 -4
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -0
- package/build/__tests__/behavioral/{UpgradingANodeModule.test.d.ts → upgrading/UpgradingANodeModule.test.d.ts} +1 -1
- package/build/__tests__/behavioral/{UpgradingANodeModule.test.js → upgrading/UpgradingANodeModule.test.js} +7 -7
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill.test.d.ts +0 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill.test.js +3 -14
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill2.test.d.ts +0 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill2.test.js +4 -13
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill3.test.d.ts +0 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill3.test.js +6 -6
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill4.test.d.ts +0 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill4.test.js +3 -3
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill5.test.d.ts +0 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill5.test.js +2 -2
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingWithListeners.test.d.ts +0 -0
- package/build/__tests__/behavioral/{skill → upgrading}/UpgradingWithListeners.test.js +4 -8
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -0
- package/build/__tests__/behavioral/{UpgradingWithSandboxFeatureInstalled.test.d.ts → upgrading/UpgradingWithSandboxFeatureInstalled.test.d.ts} +3 -3
- package/build/__tests__/behavioral/{UpgradingWithSandboxFeatureInstalled.test.js → upgrading/UpgradingWithSandboxFeatureInstalled.test.js} +14 -14
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -0
- package/build/__tests__/implementation/ActionExecuter2.test.js +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +2 -2
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +7 -2
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +2 -2
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +2 -2
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/cli.js +1 -1
- package/build/cli.js.map +1 -1
- package/build/features/event/EventFeature.d.ts +1 -0
- package/build/features/event/EventFeature.js +89 -56
- package/build/features/event/EventFeature.js.map +1 -1
- package/build/features/event/actions/ListenAction.d.ts +1 -0
- package/build/features/event/actions/ListenAction.js +23 -31
- package/build/features/event/actions/ListenAction.js.map +1 -1
- package/build/features/event/stores/EventStore.d.ts +6 -5
- package/build/features/event/stores/EventStore.js +10 -7
- package/build/features/event/stores/EventStore.js.map +1 -1
- package/build/features/store/StoreFeature.d.ts +1 -1
- package/build/features/store/StoreFeature.js +15 -14
- package/build/features/store/StoreFeature.js.map +1 -1
- package/build/services/CommandService.d.ts +1 -1
- package/build/services/CommandService.js +2 -2
- package/build/services/CommandService.js.map +1 -1
- package/build/tests/AbstractCliTest.d.ts +2 -0
- package/build/tests/AbstractCliTest.js +9 -2
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/CommandFaker.d.ts +8 -0
- package/build/tests/CommandFaker.js +54 -0
- package/build/tests/CommandFaker.js.map +1 -0
- package/build/tests/cleanTestData.js +9 -10
- package/build/tests/cleanTestData.js.map +1 -1
- package/build/tests/constants.d.ts +8 -0
- package/build/tests/constants.js +28 -0
- package/build/tests/constants.js.map +1 -0
- package/package.json +94 -95
- package/src/__tests__/behavioral/AddingADependency.test.ts +2 -1
- package/src/__tests__/behavioral/DeployingASkill.test.ts +20 -20
- package/src/__tests__/behavioral/EnablingAndDisablingCache.test.ts +12 -12
- package/src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts +2 -1
- package/src/__tests__/behavioral/LoggingInAsASkill.test.ts +3 -2
- package/src/__tests__/behavioral/RebuildingASkill.test.ts +2 -2
- package/src/__tests__/behavioral/RegisteringEventsOnBoot.test.ts +3 -5
- package/src/__tests__/behavioral/RegisteringGlobalEvents.test.ts +2 -1
- package/src/__tests__/behavioral/RegisteringSkillViewOnBoot.test.ts +2 -1
- package/src/__tests__/behavioral/SettingUpASkillForTesting.test.ts +4 -3
- package/src/__tests__/behavioral/WatchingSkillViews.test.ts +6 -6
- package/src/__tests__/behavioral/events/CreatingAListener.test.ts +54 -7
- package/src/__tests__/behavioral/events/CreatingAnEvent.test.ts +2 -1
- package/src/__tests__/behavioral/node/CreatingANodeModule.test.ts +1 -1
- package/src/__tests__/behavioral/skill/CreatingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/stores/CreatingADataStore.test.ts +2 -2
- package/src/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.ts +3 -3
- package/src/__tests__/behavioral/{UpdatingDependencies.test.ts → upgrading/UpdatingDependencies.test.ts} +2 -2
- package/src/__tests__/behavioral/{UpdatingDependencies2.test.ts → upgrading/UpdatingDependencies2.test.ts} +6 -6
- package/src/__tests__/behavioral/{UpgradingANodeModule.test.ts → upgrading/UpgradingANodeModule.test.ts} +7 -7
- package/src/__tests__/behavioral/{skill → upgrading}/UpgradingASkill.test.ts +3 -11
- package/src/__tests__/behavioral/{skill → upgrading}/UpgradingASkill2.test.ts +4 -7
- package/src/__tests__/behavioral/{skill → upgrading}/UpgradingASkill3.test.ts +6 -6
- package/src/__tests__/behavioral/{skill → upgrading}/UpgradingASkill4.test.ts +3 -3
- package/src/__tests__/behavioral/{skill → upgrading}/UpgradingASkill5.test.ts +2 -2
- package/src/__tests__/behavioral/{skill → upgrading}/UpgradingWithListeners.test.ts +3 -5
- package/src/__tests__/behavioral/{UpgradingWithSandboxFeatureInstalled.test.ts → upgrading/UpgradingWithSandboxFeatureInstalled.test.ts} +5 -5
- package/src/__tests__/implementation/ActionExecuter2.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter4.test.ts +2 -2
- package/src/__tests__/implementation/EventStore.test.ts +3 -1
- package/src/__tests__/implementation/LintService.test.ts +2 -2
- package/src/__tests__/implementation/PkgService.test.ts +4 -7
- package/src/__tests__/implementation/StoreFeature.test.ts +1 -1
- package/src/cli.ts +1 -1
- package/src/features/event/EventFeature.ts +14 -11
- package/src/features/event/actions/ListenAction.ts +22 -12
- package/src/features/event/stores/EventStore.ts +17 -12
- package/src/features/store/StoreFeature.ts +6 -5
- package/src/services/CommandService.ts +1 -4
- package/src/tests/AbstractCliTest.ts +6 -1
- package/src/tests/CommandFaker.ts +24 -0
- package/src/tests/cleanTestData.ts +2 -19
- package/src/tests/constants.ts +17 -0
- package/build/__tests__/behavioral/UpdatingDependencies.test.js.map +0 -1
- package/build/__tests__/behavioral/UpdatingDependencies2.test.js.map +0 -1
- package/build/__tests__/behavioral/UpgradingANodeModule.test.js.map +0 -1
- package/build/__tests__/behavioral/UpgradingWithSandboxFeatureInstalled.test.js.map +0 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.js.map +0 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill2.test.js.map +0 -1
- package/build/__tests__/behavioral/skill/UpgradingWithListeners.test.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [15.2.24](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v15.2.23...v15.2.24) (2022-04-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @sprucelabs/spruce-cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [15.2.23](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v15.2.22...v15.2.23) (2022-04-02)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @sprucelabs/spruce-cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [15.2.22](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v15.2.21...v15.2.22) (2022-04-01)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @sprucelabs/spruce-cli
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [15.2.21](https://github.com/sprucelabsai/spruce-cli-workspace/compare/v15.2.20...v15.2.21) (2022-04-01)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @sprucelabs/spruce-cli
|
|
@@ -31,6 +31,8 @@ var _testUtils = require("@sprucelabs/test-utils");
|
|
|
31
31
|
|
|
32
32
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../tests/AbstractSkillTest"));
|
|
33
33
|
|
|
34
|
+
var _constants = require("../../tests/constants");
|
|
35
|
+
|
|
34
36
|
var _uiAssert = _interopRequireDefault(require("../../tests/utilities/uiAssert.utility"));
|
|
35
37
|
|
|
36
38
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2;
|
|
@@ -311,7 +313,7 @@ var ConfiguringDependenciesTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
311
313
|
case 2:
|
|
312
314
|
skill = _context7.sent;
|
|
313
315
|
_context7.next = 5;
|
|
314
|
-
return this.people.loginAsDemoPerson(
|
|
316
|
+
return this.people.loginAsDemoPerson(_constants.DEMO_NUMBER_GLOBAL_EVENTS);
|
|
315
317
|
|
|
316
318
|
case 5:
|
|
317
319
|
_context7.next = 7;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/__tests__/behavioral/AddingADependency.test.ts"],"names":["ConfiguringDependenciesTest","assert","isFunction","Action","execute","getSkillFixture","registerCurrentSkill","name","namespace","results","isTruthy","errors","errorAssert","assertError","seedDemoSkill","parentSkill","slug","isFalsy","settings","Service","dependencies","get","isEqualDeep","id","err","doesThrow","add","otherSkill","promise","waitForInput","last","ui","getLastInvocation","doesInclude","options","choices","value","label","sendInput","people","loginAsDemoPerson","uiAssert","assertSelectDidNotRenderChoice","reset","skill","
|
|
1
|
+
{"version":3,"sources":["../../../src/__tests__/behavioral/AddingADependency.test.ts"],"names":["ConfiguringDependenciesTest","assert","isFunction","Action","execute","getSkillFixture","registerCurrentSkill","name","namespace","results","isTruthy","errors","errorAssert","assertError","seedDemoSkill","parentSkill","slug","isFalsy","settings","Service","dependencies","get","isEqualDeep","id","err","doesThrow","add","otherSkill","promise","waitForInput","last","ui","getLastInvocation","doesInclude","options","choices","value","label","sendInput","people","loginAsDemoPerson","uiAssert","assertSelectDidNotRenderChoice","reset","skill","DEMO_NUMBER_GLOBAL_EVENTS","AbstractSkillTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,2B,WAQnB,iB,UAKA,iB,UAeA,iB,UAyBA,iB,UAYA,iB,UA+BA,iB,UAiBA,iB;;;;;;;;;;;;;kHAzGD;AAAA;AAAA;AAAA;AAAA;AAECC,6BAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,YAAZ,EAA0B,KAA1B,EAAiCC,OAAnD;;AAFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;wHAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEO,KAAKC,eAAL,GAAuBC,oBAAvB,CAA4C;AACjDC,kBAAAA,IAAI,EAAE;AAD2C,iBAA5C,CAFP;;AAAA;AAAA;AAAA,uBAMuB,KAAKJ,MAAL,CAAY,YAAZ,EAA0B,KAA1B,EAAiCC,OAAjC,CAAyC;AAC9DI,kBAAAA,SAAS,EAAE;AADmD,iBAAzC,CANvB;;AAAA;AAMOC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ACJ,EADoB;AAEnCf,kBAAAA,SAAS,EAAEmB,UAAU,CAACX;AAFa,iBAApC;;AAzBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;2IA+BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEO,KAAKuB,MAAL,CAAYC,iBAAZ,EAFP;;AAAA;AAIC,qBAAK,KAAKrC,MAAL,CAAY,YAAZ,EAA0B,KAA1B,EAAiCC,OAAjC,CAAyC,EAAzC,CAAL;AAJD;AAAA,uBAMO,KAAKyB,YAAL,EANP;;AAAA;AAQCY,qCAASC,8BAAT,CACC,KAAKX,EADN,EAEC,KAAKhB,WAAL,CAAiBC,IAFlB,EAGC,KAAKD,WAAL,CAAiBR,IAHlB;;AAMA,qBAAKwB,EAAL,CAAQY,KAAR;;AAdD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;kIAiBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEqB,KAAKtC,eAAL,GAAuBS,aAAvB,CAAqC;AACxDP,kBAAAA,IAAI,EAAE;AADkD,iBAArC,CAFrB;;AAAA;AAEOqC,gBAAAA,KAFP;AAAA;AAAA,uBAMO,KAAKL,MAAL,CAAYC,iBAAZ,CAA8BK,oCAA9B,CANP;;AAAA;AAAA;AAAA,uBAQuB,KAAK1C,MAAL,CAAY,YAAZ,EAA0B,KAA1B,EAAiCC,OAAjC,CAAyC;AAC9DI,kBAAAA,SAAS,EAAEoC,KAAK,CAAC5B;AAD6C,iBAAzC,CARvB;;AAAA;AAQOP,gBAAAA,OARP;;AAYCR,6BAAOgB,OAAP,CAAeR,OAAO,CAACE,MAAvB;;AAZD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EAjHwDmC,8B,8DACvB,Q","sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractSkillTest from '../../tests/AbstractSkillTest'\nimport { DEMO_NUMBER_GLOBAL_EVENTS } from '../../tests/constants'\nimport uiAssert from '../../tests/utilities/uiAssert.utility'\n\nexport default class ConfiguringDependenciesTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'skills'\n\tprivate static parentSkill: {\n\t\tid: string\n\t\tslug: string\n\t\tname: string\n\t}\n\n\t@test()\n\tprotected static async hasAddDependencyAction() {\n\t\tassert.isFunction(this.Action('dependency', 'add').execute)\n\t}\n\n\t@test()\n\tprotected static async errorsWhenPassedBadNamespace() {\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'current skill in adding deps',\n\t\t})\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: 'waka-waka',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'SKILL_NOT_FOUND')\n\t}\n\n\t@test()\n\tprotected static async succeedsWhenPassedGoodNamespace() {\n\t\tconst parentSkill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'dependent skill',\n\t\t})\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: parentSkill.slug,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.parentSkill = parentSkill\n\n\t\tconst settings = this.Service('settings')\n\t\tconst dependencies = settings.get('dependencies')\n\n\t\tassert.isEqualDeep(dependencies, [\n\t\t\t{\n\t\t\t\tid: parentSkill.id,\n\t\t\t\tnamespace: parentSkill.slug,\n\t\t\t},\n\t\t])\n\t}\n\n\t@test()\n\tprotected static async cantAddDependencyTwice() {\n\t\tconst err = assert.doesThrow(() =>\n\t\t\tthis.Service('dependency').add({\n\t\t\t\tid: this.parentSkill.id,\n\t\t\t\tnamespace: this.parentSkill.slug,\n\t\t\t})\n\t\t)\n\n\t\terrorAssert.assertError(err, 'DEPENDENCY_EXISTS')\n\t}\n\n\t@test()\n\tprotected static async asksToSelectSkillWhenNoNamespacePassed() {\n\t\tconst otherSkill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'dependent skill',\n\t\t})\n\n\t\tconst promise = this.Action('dependency', 'add').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tvalue: otherSkill.slug,\n\t\t\tlabel: otherSkill.name,\n\t\t})\n\n\t\tawait this.ui.sendInput(otherSkill.slug)\n\n\t\tconst results = await promise\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst settings = this.Service('settings')\n\t\tconst dependencies = settings.get('dependencies')\n\n\t\tassert.isEqualDeep(dependencies[1], {\n\t\t\tid: otherSkill.id,\n\t\t\tnamespace: otherSkill.slug,\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async doesNotShowSkillsThatAreAlreadySetAsADependency() {\n\t\tawait this.people.loginAsDemoPerson()\n\n\t\tvoid this.Action('dependency', 'add').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tuiAssert.assertSelectDidNotRenderChoice(\n\t\t\tthis.ui,\n\t\t\tthis.parentSkill.slug,\n\t\t\tthis.parentSkill.name\n\t\t)\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canAddSkillThatWasCreatedBySomeoneElse() {\n\t\tconst skill = await this.getSkillFixture().seedDemoSkill({\n\t\t\tname: 'global dependency skill',\n\t\t})\n\n\t\tawait this.people.loginAsDemoPerson(DEMO_NUMBER_GLOBAL_EVENTS)\n\n\t\tconst results = await this.Action('dependency', 'add').execute({\n\t\t\tnamespace: skill.slug,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"file":"AddingADependency.test.js"}
|
|
@@ -67,44 +67,44 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
67
67
|
return (0, _get2["default"])((0, _getPrototypeOf2["default"])(DeployingASkillTest), "beforeEach", this).call(this);
|
|
68
68
|
|
|
69
69
|
case 2:
|
|
70
|
-
_CommandService["default"].
|
|
70
|
+
_CommandService["default"].fakeCommand('which heroku', {
|
|
71
71
|
code: 0
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
_CommandService["default"].
|
|
74
|
+
_CommandService["default"].fakeCommand('grep api.heroku.com ~/.netrc', {
|
|
75
75
|
code: 0
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
_CommandService["default"].
|
|
78
|
+
_CommandService["default"].fakeCommand('git status', {
|
|
79
79
|
code: 0
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
_CommandService["default"].
|
|
82
|
+
_CommandService["default"].fakeCommand('git init', {
|
|
83
83
|
code: 0,
|
|
84
84
|
stdout: 'Initialized empty Git repository in'
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
_CommandService["default"].
|
|
87
|
+
_CommandService["default"].fakeCommand('git ls-remote heroku', {
|
|
88
88
|
code: 0
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
-
_CommandService["default"].
|
|
91
|
+
_CommandService["default"].fakeCommand('which git', {
|
|
92
92
|
code: 0
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
_CommandService["default"].
|
|
95
|
+
_CommandService["default"].fakeCommand('heroku create good-heroku-name', {
|
|
96
96
|
code: 0
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
_CommandService["default"].
|
|
99
|
+
_CommandService["default"].fakeCommand('heroku create bad-heroku-name', {
|
|
100
100
|
code: 1
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
-
_CommandService["default"].
|
|
103
|
+
_CommandService["default"].fakeCommand('heroku buildpacks:set heroku/nodejs', {
|
|
104
104
|
code: 0
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
_CommandService["default"].
|
|
107
|
+
_CommandService["default"].fakeCommand('git push --set-upstream heroku master', {
|
|
108
108
|
code: 0
|
|
109
109
|
});
|
|
110
110
|
|
|
@@ -365,7 +365,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
365
365
|
while (1) {
|
|
366
366
|
switch (_context7.prev = _context7.next) {
|
|
367
367
|
case 0:
|
|
368
|
-
_CommandService["default"].
|
|
368
|
+
_CommandService["default"].fakeCommand('which heroku', {
|
|
369
369
|
code: 1
|
|
370
370
|
});
|
|
371
371
|
|
|
@@ -414,7 +414,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
414
414
|
while (1) {
|
|
415
415
|
switch (_context8.prev = _context8.next) {
|
|
416
416
|
case 0:
|
|
417
|
-
_CommandService["default"].
|
|
417
|
+
_CommandService["default"].fakeCommand('which git', {
|
|
418
418
|
code: 1
|
|
419
419
|
});
|
|
420
420
|
|
|
@@ -463,7 +463,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
463
463
|
while (1) {
|
|
464
464
|
switch (_context9.prev = _context9.next) {
|
|
465
465
|
case 0:
|
|
466
|
-
_CommandService["default"].
|
|
466
|
+
_CommandService["default"].fakeCommand('git status', {
|
|
467
467
|
code: 128,
|
|
468
468
|
stderr: 'fatal: not a git repository (or any of the parent directories): .git'
|
|
469
469
|
});
|
|
@@ -522,7 +522,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
522
522
|
while (1) {
|
|
523
523
|
switch (_context10.prev = _context10.next) {
|
|
524
524
|
case 0:
|
|
525
|
-
_CommandService["default"].
|
|
525
|
+
_CommandService["default"].fakeCommand('git status', {
|
|
526
526
|
code: 128
|
|
527
527
|
});
|
|
528
528
|
|
|
@@ -541,7 +541,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
541
541
|
return this.waitForInput();
|
|
542
542
|
|
|
543
543
|
case 8:
|
|
544
|
-
_CommandService["default"].
|
|
544
|
+
_CommandService["default"].fakeCommand('git status', {
|
|
545
545
|
code: 0
|
|
546
546
|
});
|
|
547
547
|
|
|
@@ -580,7 +580,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
580
580
|
while (1) {
|
|
581
581
|
switch (_context11.prev = _context11.next) {
|
|
582
582
|
case 0:
|
|
583
|
-
_CommandService["default"].
|
|
583
|
+
_CommandService["default"].fakeCommand('grep api.heroku.com ~/.netrc', {
|
|
584
584
|
code: 1
|
|
585
585
|
});
|
|
586
586
|
|
|
@@ -746,7 +746,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
746
746
|
while (1) {
|
|
747
747
|
switch (_context14.prev = _context14.next) {
|
|
748
748
|
case 0:
|
|
749
|
-
_CommandService["default"].
|
|
749
|
+
_CommandService["default"].fakeCommand('git ls-remote heroku', {
|
|
750
750
|
code: 128
|
|
751
751
|
});
|
|
752
752
|
|
|
@@ -808,7 +808,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
808
808
|
while (1) {
|
|
809
809
|
switch (_context15.prev = _context15.next) {
|
|
810
810
|
case 0:
|
|
811
|
-
_CommandService["default"].
|
|
811
|
+
_CommandService["default"].fakeCommand('git ls-remote heroku', {
|
|
812
812
|
code: 128
|
|
813
813
|
});
|
|
814
814
|
|
|
@@ -877,7 +877,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
877
877
|
while (1) {
|
|
878
878
|
switch (_context16.prev = _context16.next) {
|
|
879
879
|
case 0:
|
|
880
|
-
_CommandService["default"].
|
|
880
|
+
_CommandService["default"].fakeCommand('git ls-remote heroku', {
|
|
881
881
|
code: 128
|
|
882
882
|
});
|
|
883
883
|
|
|
@@ -966,7 +966,7 @@ var DeployingASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(),
|
|
|
966
966
|
while (1) {
|
|
967
967
|
switch (_context17.prev = _context17.next) {
|
|
968
968
|
case 0:
|
|
969
|
-
_CommandService["default"].
|
|
969
|
+
_CommandService["default"].fakeCommand('git status', {
|
|
970
970
|
code: 0,
|
|
971
971
|
stdout: 'Changes not staged for commit'
|
|
972
972
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/__tests__/behavioral/DeployingASkill.test.ts"],"names":["DeployingASkillTest","CommandService","setMockResponse","code","stdout","diskUtil","writeFile","resolvePath","assert","isFunction","Action","execute","FeatureFixture","installCachedFeatures","teamName","process","env","HEROKU_TEAM_NAME","results","isTruthy","errors","isArray","errorAssert","assertError","stage","getSkillFixture","registerCurrentSkill","name","cli","checkHealth","health","isFalsy","deploy","isEqual","status","isLength","deploys","promise","nameReadable","nameCamel","type","waitForInput","ui","sendInput","fastHerokuOptions","stderr","deleteFile","doesInclude","invocations","command","match","testUtil","assertFileByNameInGeneratedFiles","files","contents","readFile","options","AbstractCliTest","shouldBuildAndLint","shouldRunTests"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,mB,WAkDnB,iB,UAKA,iB,UAiBA,iB,UAqBA,iB,UAWA,iB,UA4BA,iB,UAuBA,iB,UAuBA,iB,UA8BA,iB,WA6BA,iB,WAuBA,iB,WA6BA,iB,WA+BA,iB,WAgCA,iB,WAoCA,iB,WA0CA,iB,WAwBA,iB;;;;;;;;;;;;;sGA/bD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAECC,2CAAeC,eAAf,CAA+B,cAA/B,EAA+C;AAC9CC,kBAAAA,IAAI,EAAE;AADwC,iBAA/C;;AAGAF,2CAAeC,eAAf,CAA+B,8BAA/B,EAA+D;AAC9DC,kBAAAA,IAAI,EAAE;AADwD,iBAA/D;;AAGAF,2CAAeC,eAAf,CAA+B,YAA/B,EAA6C;AAC5CC,kBAAAA,IAAI,EAAE;AADsC,iBAA7C;;AAGAF,2CAAeC,eAAf,CAA+B,UAA/B,EAA2C;AAC1CC,kBAAAA,IAA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,uCAAYC,WAAZ,CAAwBL,OAAO,CAACE,MAAR,CAAe,CAAf,CAAxB,EAA2C,eAA3C,EAA4D;AAC3DI,kBAAAA,KAAK,EAAE;AADoD,iBAA5D;;AAnBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;0GAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEO,KAAKZ,cAAL,GAAsBC,qBAAtB,CAA4C,QAA5C,CAFP;;AAAA;AAAA;AAAA,uBAIO,KAAKY,eAAL,GAAuBC,oBAAvB,CAA4C;AACjDC,kBAAAA,IAAI,EAAE;AAD2C,iBAA5C,CAJP;;AAAA;AAAA;AAAA,uBAQuB,KAAKjB,MAAL,CAAY,QAAZ,EAAsB,QAAtB,EAAgCC,OAAhC,CACrB,KAAKiC,iBADgB,CARvB;;AAAA;AAQO1B,gBAAAA,OARP;;AAYCV,6BAAOuB,OAAP,CAAeb,OAAO,CAACE,MAAvB;;AAZD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EAtcgDqC,4B,kEACJ;AAC3C3C,EAAAA,QAAQ,4BAAEC,OAAO,CAACC,GAAR,CAAYC,gBAAd,2EAAkC,EADC;AAE3CyC,EAAAA,kBAAkB,EAAE,KAFuB;AAG3CC,EAAAA,cAAc,EAAE;AAH2B,C","sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport CommandService from '../../services/CommandService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class DeployingASkillTest extends AbstractCliTest {\n\tprivate static readonly fastHerokuOptions = {\n\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\tshouldBuildAndLint: false,\n\t\tshouldRunTests: false,\n\t}\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tCommandService.setMockResponse('which heroku', {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.setMockResponse('grep api.heroku.com ~/.netrc', {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.setMockResponse('git status', {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.setMockResponse('git init', {\n\t\t\tcode: 0,\n\t\t\tstdout: 'Initialized empty Git repository in',\n\t\t})\n\n\t\tCommandService.setMockResponse('git ls-remote heroku', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.setMockResponse('which git', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.setMockResponse('heroku create good-heroku-name', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.setMockResponse('heroku create bad-heroku-name', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tCommandService.setMockResponse('heroku buildpacks:set heroku/nodejs', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.setMockResponse('git push --set-upstream heroku master', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tdiskUtil.writeFile(this.resolvePath('Procfile'), 'web: npm run boot')\n\t}\n\n\t@test()\n\tprotected static async hasDeployAction() {\n\t\tassert.isFunction(this.Action('deploy', 'heroku').execute)\n\t}\n\n\t@test()\n\tprotected static async deployHaltedBecauseNotRegistered() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tdiskUtil.writeFile(this.resolvePath('src/index.ts'), 'aoeustahoesuntao')\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute({\n\t\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.isArray(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'skill',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async deployHaltedWithBadBuild() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'haulted wth bad build',\n\t\t})\n\n\t\tdiskUtil.writeFile(this.resolvePath('src/index.ts'), 'aoeustahoesuntao')\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute({\n\t\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.isArray(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'building',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async healthCheckReportsNotDeployed() {\n\t\tconst cli = await this.FeatureFixture().installCachedFeatures('deploy')\n\t\tconst health = (await cli.checkHealth()) as any\n\n\t\tassert.isFalsy(health.errors)\n\t\tassert.isTruthy(health.deploy)\n\t\tassert.isEqual(health.deploy.status, 'passed')\n\t\tassert.isLength(health.deploy.deploys, 0)\n\t}\n\n\t@test()\n\tprotected static async deployHaltedWithBadTest() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deployWithTests')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'haulted wth bad test',\n\t\t})\n\n\t\tconst promise = this.Action('test', 'create').execute({\n\t\t\tnameReadable: 'Test failed',\n\t\t\tnameCamel: 'testFailed',\n\t\t\ttype: 'behavioral',\n\t\t})\n\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('')\n\n\t\tawait promise\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute({\n\t\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.isArray(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'TEST_FAILED')\n\t}\n\n\t@test()\n\tprotected static async errorsIfHerokuClientNotInstalled() {\n\t\tCommandService.setMockResponse('which heroku', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'heroku not installed',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\t'dependencies[0].name': 'heroku',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async errorsIfGitNotInstalled() {\n\t\tCommandService.setMockResponse('which git', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'git not installed',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\t'dependencies[0].name': 'git',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async errorsIfNotInGitRepo() {\n\t\tCommandService.setMockResponse('git status', {\n\t\t\tcode: 128,\n\t\t\tstderr:\n\t\t\t\t'fatal: not a git repository (or any of the parent directories): .git',\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'not in git repo',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tawait this.ui.sendInput('n')\n\n\t\tconst results = await promise\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'git',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async canCreateGitRepoIfNeeded() {\n\t\tCommandService.setMockResponse('git status', {\n\t\t\tcode: 128,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'creates git repo',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tCommandService.setMockResponse('git status', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static async errorsWhenNotLoggedIntoHerkou() {\n\t\tCommandService.setMockResponse('grep api.heroku.com ~/.netrc', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'not logged into heroku',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'heroku',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async failsWhenDeclineToCreateProcFile() {\n\t\tdiskUtil.deleteFile(this.resolvePath('Procfile'))\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'decline proc file',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'confirm',\n\t\t})\n\t\tawait this.ui.sendInput('n')\n\n\t\tconst results = await promise\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'procfile',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async createsValidProcFile() {\n\t\tdiskUtil.deleteFile(this.resolvePath('Procfile'))\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'valid proc file',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Procfile',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst contents = diskUtil.readFile(match)\n\n\t\tassert.isEqual(contents, 'worker: npm run boot')\n\t}\n\n\t@test()\n\tprotected static async failsWhenDeclineToCreateRemoteBranch() {\n\t\tCommandService.setMockResponse('git ls-remote heroku', {\n\t\t\tcode: 128,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'decline to create remote branch',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'confirm',\n\t\t})\n\t\tawait this.ui.sendInput('n')\n\n\t\tconst results = await promise\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'remote',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async asksForHerokuAppName() {\n\t\tCommandService.setMockResponse('git ls-remote heroku', {\n\t\t\tcode: 128,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'ask for app name',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'prompt',\n\t\t\toptions: {\n\t\t\t\ttype: 'text',\n\t\t\t},\n\t\t})\n\n\t\tawait this.ui.sendInput(`good-heroku-name`)\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static async keepsAskingForAppNameUntilAGoodOneIsSelected() {\n\t\tCommandService.setMockResponse('git ls-remote heroku', {\n\t\t\tcode: 128,\n\t\t})\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'haulted wth bad build',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'confirm',\n\t\t})\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'prompt',\n\t\t\toptions: {\n\t\t\t\ttype: 'text',\n\t\t\t},\n\t\t})\n\t\tawait this.ui.sendInput(`bad-heroku-name`)\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('bad-heroku-name')\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('good-heroku-name')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static async failsWithPendingChangesToCommit() {\n\t\tCommandService.setMockResponse('git status', {\n\t\t\tcode: 0,\n\t\t\tstdout: 'Changes not staged for commit',\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'pending changes to commit',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'git',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async canDeploySkill() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'can deploy',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"file":"DeployingASkill.test.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/__tests__/behavioral/DeployingASkill.test.ts"],"names":["DeployingASkillTest","CommandService","fakeCommand","code","stdout","diskUtil","writeFile","resolvePath","assert","isFunction","Action","execute","FeatureFixture","installCachedFeatures","teamName","process","env","HEROKU_TEAM_NAME","results","isTruthy","errors","isArray","errorAssert","assertError","stage","getSkillFixture","registerCurrentSkill","name","cli","checkHealth","health","isFalsy","deploy","isEqual","status","isLength","deploys","promise","nameReadable","nameCamel","type","waitForInput","ui","sendInput","fastHerokuOptions","stderr","deleteFile","doesInclude","invocations","command","match","testUtil","assertFileByNameInGeneratedFiles","files","contents","readFile","options","AbstractCliTest","shouldBuildAndLint","shouldRunTests"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,mB,WAkDnB,iB,UAKA,iB,UAiBA,iB,UAqBA,iB,UAWA,iB,UA4BA,iB,UAuBA,iB,UAuBA,iB,UA8BA,iB,WA6BA,iB,WAuBA,iB,WA6BA,iB,WA+BA,iB,WAgCA,iB,WAoCA,iB,WA0CA,iB,WAwBA,iB;;;;;;;;;;;;;sGA/bD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAECC,2CAAeC,WAAf,CAA2B,cAA3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KAAKY,eAAL,GAAuBC,oBAAvB,CAA4C;AACjDC,kBAAAA,IAAI,EAAE;AAD2C,iBAA5C,CATP;;AAAA;AAAA;AAAA,uBAauB,KAAKjB,MAAL,CAAY,QAAZ,EAAsB,QAAtB,EAAgCC,OAAhC,CACrB,KAAKiC,iBADgB,CAbvB;;AAAA;AAaO1B,gBAAAA,OAbP;;AAiBCV,6BAAOW,QAAP,CAAgBD,OAAO,CAACE,MAAxB;;AAEAE,uCAAYC,WAAZ,CAAwBL,OAAO,CAACE,MAAR,CAAe,CAAf,CAAxB,EAA2C,eAA3C,EAA4D;AAC3DI,kBAAAA,KAAK,EAAE;AADoD,iBAA5D;;AAnBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;0GAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEO,KAAKZ,cAAL,GAAsBC,qBAAtB,CAA4C,QAA5C,CAFP;;AAAA;AAAA;AAAA,uBAIO,KAAKY,eAAL,GAAuBC,oBAAvB,CAA4C;AACjDC,kBAAAA,IAAI,EAAE;AAD2C,iBAA5C,CAJP;;AAAA;AAAA;AAAA,uBAQuB,KAAKjB,MAAL,CAAY,QAAZ,EAAsB,QAAtB,EAAgCC,OAAhC,CACrB,KAAKiC,iBADgB,CARvB;;AAAA;AAQO1B,gBAAAA,OARP;;AAYCV,6BAAOuB,OAAP,CAAeb,OAAO,CAACE,MAAvB;;AAZD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EAtcgDqC,4B,kEACJ;AAC3C3C,EAAAA,QAAQ,4BAAEC,OAAO,CAACC,GAAR,CAAYC,gBAAd,2EAAkC,EADC;AAE3CyC,EAAAA,kBAAkB,EAAE,KAFuB;AAG3CC,EAAAA,cAAc,EAAE;AAH2B,C","sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport CommandService from '../../services/CommandService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport testUtil from '../../tests/utilities/test.utility'\n\nexport default class DeployingASkillTest extends AbstractCliTest {\n\tprivate static readonly fastHerokuOptions = {\n\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\tshouldBuildAndLint: false,\n\t\tshouldRunTests: false,\n\t}\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tCommandService.fakeCommand('which heroku', {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand('grep api.heroku.com ~/.netrc', {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand('git status', {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand('git init', {\n\t\t\tcode: 0,\n\t\t\tstdout: 'Initialized empty Git repository in',\n\t\t})\n\n\t\tCommandService.fakeCommand('git ls-remote heroku', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.fakeCommand('which git', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.fakeCommand('heroku create good-heroku-name', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.fakeCommand('heroku create bad-heroku-name', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tCommandService.fakeCommand('heroku buildpacks:set heroku/nodejs', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tCommandService.fakeCommand('git push --set-upstream heroku master', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tdiskUtil.writeFile(this.resolvePath('Procfile'), 'web: npm run boot')\n\t}\n\n\t@test()\n\tprotected static async hasDeployAction() {\n\t\tassert.isFunction(this.Action('deploy', 'heroku').execute)\n\t}\n\n\t@test()\n\tprotected static async deployHaltedBecauseNotRegistered() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tdiskUtil.writeFile(this.resolvePath('src/index.ts'), 'aoeustahoesuntao')\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute({\n\t\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.isArray(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'skill',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async deployHaltedWithBadBuild() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'haulted wth bad build',\n\t\t})\n\n\t\tdiskUtil.writeFile(this.resolvePath('src/index.ts'), 'aoeustahoesuntao')\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute({\n\t\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.isArray(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'building',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async healthCheckReportsNotDeployed() {\n\t\tconst cli = await this.FeatureFixture().installCachedFeatures('deploy')\n\t\tconst health = (await cli.checkHealth()) as any\n\n\t\tassert.isFalsy(health.errors)\n\t\tassert.isTruthy(health.deploy)\n\t\tassert.isEqual(health.deploy.status, 'passed')\n\t\tassert.isLength(health.deploy.deploys, 0)\n\t}\n\n\t@test()\n\tprotected static async deployHaltedWithBadTest() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deployWithTests')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'haulted wth bad test',\n\t\t})\n\n\t\tconst promise = this.Action('test', 'create').execute({\n\t\t\tnameReadable: 'Test failed',\n\t\t\tnameCamel: 'testFailed',\n\t\t\ttype: 'behavioral',\n\t\t})\n\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('')\n\n\t\tawait promise\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute({\n\t\t\tteamName: process.env.HEROKU_TEAM_NAME ?? '',\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\t\tassert.isArray(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'TEST_FAILED')\n\t}\n\n\t@test()\n\tprotected static async errorsIfHerokuClientNotInstalled() {\n\t\tCommandService.fakeCommand('which heroku', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'heroku not installed',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\t'dependencies[0].name': 'heroku',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async errorsIfGitNotInstalled() {\n\t\tCommandService.fakeCommand('which git', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'git not installed',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\t'dependencies[0].name': 'git',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async errorsIfNotInGitRepo() {\n\t\tCommandService.fakeCommand('git status', {\n\t\t\tcode: 128,\n\t\t\tstderr:\n\t\t\t\t'fatal: not a git repository (or any of the parent directories): .git',\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'not in git repo',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tawait this.ui.sendInput('n')\n\n\t\tconst results = await promise\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'git',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async canCreateGitRepoIfNeeded() {\n\t\tCommandService.fakeCommand('git status', {\n\t\t\tcode: 128,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'creates git repo',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tCommandService.fakeCommand('git status', {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static async errorsWhenNotLoggedIntoHerkou() {\n\t\tCommandService.fakeCommand('grep api.heroku.com ~/.netrc', {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'not logged into heroku',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'heroku',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async failsWhenDeclineToCreateProcFile() {\n\t\tdiskUtil.deleteFile(this.resolvePath('Procfile'))\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'decline proc file',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'confirm',\n\t\t})\n\t\tawait this.ui.sendInput('n')\n\n\t\tconst results = await promise\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'procfile',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async createsValidProcFile() {\n\t\tdiskUtil.deleteFile(this.resolvePath('Procfile'))\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'valid proc file',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Procfile',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst contents = diskUtil.readFile(match)\n\n\t\tassert.isEqual(contents, 'worker: npm run boot')\n\t}\n\n\t@test()\n\tprotected static async failsWhenDeclineToCreateRemoteBranch() {\n\t\tCommandService.fakeCommand('git ls-remote heroku', {\n\t\t\tcode: 128,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'decline to create remote branch',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'confirm',\n\t\t})\n\t\tawait this.ui.sendInput('n')\n\n\t\tconst results = await promise\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'remote',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async asksForHerokuAppName() {\n\t\tCommandService.fakeCommand('git ls-remote heroku', {\n\t\t\tcode: 128,\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'ask for app name',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'prompt',\n\t\t\toptions: {\n\t\t\t\ttype: 'text',\n\t\t\t},\n\t\t})\n\n\t\tawait this.ui.sendInput(`good-heroku-name`)\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static async keepsAskingForAppNameUntilAGoodOneIsSelected() {\n\t\tCommandService.fakeCommand('git ls-remote heroku', {\n\t\t\tcode: 128,\n\t\t})\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'haulted wth bad build',\n\t\t})\n\n\t\tconst promise = this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'confirm',\n\t\t})\n\n\t\tawait this.ui.sendInput('y')\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.invocations, {\n\t\t\tcommand: 'prompt',\n\t\t\toptions: {\n\t\t\t\ttype: 'text',\n\t\t\t},\n\t\t})\n\t\tawait this.ui.sendInput(`bad-heroku-name`)\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('bad-heroku-name')\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('good-heroku-name')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static async failsWithPendingChangesToCommit() {\n\t\tCommandService.fakeCommand('git status', {\n\t\t\tcode: 0,\n\t\t\tstdout: 'Changes not staged for commit',\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'pending changes to commit',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DEPLOY_FAILED', {\n\t\t\tstage: 'git',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async canDeploySkill() {\n\t\tawait this.FeatureFixture().installCachedFeatures('deploy')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'can deploy',\n\t\t})\n\n\t\tconst results = await this.Action('deploy', 'heroku').execute(\n\t\t\tthis.fastHerokuOptions\n\t\t)\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"file":"DeployingASkill.test.js"}
|
|
@@ -94,7 +94,7 @@ var EnablingAndDisablingCacheTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
|
|
|
94
94
|
while (1) {
|
|
95
95
|
switch (_context2.prev = _context2.next) {
|
|
96
96
|
case 0:
|
|
97
|
-
_CommandService["default"].
|
|
97
|
+
_CommandService["default"].fakeCommand(/which docker/gi, {
|
|
98
98
|
code: 1
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -135,7 +135,7 @@ var EnablingAndDisablingCacheTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
|
|
|
135
135
|
while (1) {
|
|
136
136
|
switch (_context3.prev = _context3.next) {
|
|
137
137
|
case 0:
|
|
138
|
-
_CommandService["default"].
|
|
138
|
+
_CommandService["default"].fakeCommand(/npm config/gi, {
|
|
139
139
|
code: 1
|
|
140
140
|
});
|
|
141
141
|
|
|
@@ -172,15 +172,15 @@ var EnablingAndDisablingCacheTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
|
|
|
172
172
|
while (1) {
|
|
173
173
|
switch (_context4.prev = _context4.next) {
|
|
174
174
|
case 0:
|
|
175
|
-
_CommandService["default"].
|
|
175
|
+
_CommandService["default"].fakeCommand(/which docker/gi, {
|
|
176
176
|
code: 0
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
_CommandService["default"].
|
|
179
|
+
_CommandService["default"].fakeCommand(_constants.ENABLE_NPM_CACHE_COMMAND, {
|
|
180
180
|
code: 0
|
|
181
181
|
});
|
|
182
182
|
|
|
183
|
-
_CommandService["default"].
|
|
183
|
+
_CommandService["default"].fakeCommand(_constants.DISABLE_NPM_CACHE_COMMAND, {
|
|
184
184
|
code: 0
|
|
185
185
|
});
|
|
186
186
|
|
|
@@ -220,7 +220,7 @@ var EnablingAndDisablingCacheTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
|
|
|
220
220
|
while (1) {
|
|
221
221
|
switch (_context5.prev = _context5.next) {
|
|
222
222
|
case 0:
|
|
223
|
-
_CommandService["default"].
|
|
223
|
+
_CommandService["default"].fakeCommand(/which docker/gi, {
|
|
224
224
|
code: 1
|
|
225
225
|
});
|
|
226
226
|
|
|
@@ -261,11 +261,11 @@ var EnablingAndDisablingCacheTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
|
|
|
261
261
|
while (1) {
|
|
262
262
|
switch (_context6.prev = _context6.next) {
|
|
263
263
|
case 0:
|
|
264
|
-
_CommandService["default"].
|
|
264
|
+
_CommandService["default"].fakeCommand(/which docker/gi, {
|
|
265
265
|
code: 0
|
|
266
266
|
});
|
|
267
267
|
|
|
268
|
-
_CommandService["default"].
|
|
268
|
+
_CommandService["default"].fakeCommand(/npm config/gi, {
|
|
269
269
|
code: 1
|
|
270
270
|
});
|
|
271
271
|
|
|
@@ -306,7 +306,7 @@ var EnablingAndDisablingCacheTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
|
|
|
306
306
|
while (1) {
|
|
307
307
|
switch (_context7.prev = _context7.next) {
|
|
308
308
|
case 0:
|
|
309
|
-
_CommandService["default"].
|
|
309
|
+
_CommandService["default"].fakeCommand(/npm config/gi, {
|
|
310
310
|
code: 1,
|
|
311
311
|
stderr: 'tsanoehusnatohu snatoh No such container staoheu saotnhu '
|
|
312
312
|
});
|
|
@@ -344,15 +344,15 @@ var EnablingAndDisablingCacheTest = (_dec = (0, _test.test)(), _dec2 = (0, _test
|
|
|
344
344
|
while (1) {
|
|
345
345
|
switch (_context8.prev = _context8.next) {
|
|
346
346
|
case 0:
|
|
347
|
-
_CommandService["default"].
|
|
347
|
+
_CommandService["default"].fakeCommand(/which docker/gi, {
|
|
348
348
|
code: 0
|
|
349
349
|
});
|
|
350
350
|
|
|
351
|
-
_CommandService["default"].
|
|
351
|
+
_CommandService["default"].fakeCommand(_constants.DISABLE_NPM_CACHE_COMMAND, {
|
|
352
352
|
code: 0
|
|
353
353
|
});
|
|
354
354
|
|
|
355
|
-
_CommandService["default"].
|
|
355
|
+
_CommandService["default"].fakeCommand(_constants.ENABLE_NPM_CACHE_COMMAND, {
|
|
356
356
|
code: 0
|
|
357
357
|
});
|
|
358
358
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/__tests__/behavioral/EnablingAndDisablingCache.test.ts"],"names":["EnablingAndDisablingCacheTest","getFeatureInstaller","isInstalled","assert","isTrue","isFunction","Action","execute","CommandService","
|
|
1
|
+
{"version":3,"sources":["../../../src/__tests__/behavioral/EnablingAndDisablingCache.test.ts"],"names":["EnablingAndDisablingCacheTest","getFeatureInstaller","isInstalled","assert","isTrue","isFunction","Action","execute","CommandService","fakeCommand","code","results","isTruthy","errors","errorAssert","assertError","dependencies","name","ENABLE_NPM_CACHE_COMMAND","DISABLE_NPM_CACHE_COMMAND","isFalsy","stderr","AbstractCliTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;uHAaA;AAAA;AAAA;AAAA;AAAA;AAAA;AAECL,2CAAeC,WAAf,CAA2B,gBAA3B,EAA8C;AAC7CC,kBAAAA,IAAI,EAAE;AADuC,iBAA9C;;AAGAF,2CAAeC,WAAf,CAA2BU,oCAA3B,EAAsD;AACrDT,kBAAAA,IAAI,EAAE;AAD+C,iBAAtD;;AAGAF,2CAAeC,WAAf,CAA2BS,mCAA3B,EAAqD;AACpDR,kBAAAA,IAAI,EAAE;AAD8C,iBAArD;;AARD;AAAA,uBAYO,KAAKJ,MAAL,CAAY,OAAZ,EAAqB,QAArB,EAA+BC,OAA/B,CAAuC,EAAvC,CAZP;;AAAA;AAAA;AAAA,uBAauB,KAAKD,MAAL,CAAY,OAAZ,EAAqB,QAArB,EAA+BC,OAA/B,CAAuC,EAAvC,CAbvB;;AAAA;AAaOI,gBAAAA,OAbP;;AAeCR,6BAAOiB,OAAP,CAAeT,OAAO,CAACE,MAAvB;;AAfD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EAnH0DS,4B","sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport {\n\tDISABLE_NPM_CACHE_COMMAND,\n\tENABLE_NPM_CACHE_COMMAND,\n} from '../../features/cache/constants'\nimport CommandService from '../../services/CommandService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class EnablingAndDisablingCacheTest extends AbstractCliTest {\n\t@test()\n\tprotected static async cacheFeatureIsAlwaysOn() {\n\t\tconst isInstalled = await this.getFeatureInstaller().isInstalled('cache')\n\t\tassert.isTrue(isInstalled)\n\t}\n\n\t@test()\n\tprotected static hasEnableFeature() {\n\t\tassert.isFunction(this.Action('cache', 'enable').execute)\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenEnablingIfDockerIsNotInstalled() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDockerNotEnabled() {\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DOCKER_NOT_STARTED')\n\t}\n\n\t@test()\n\tprotected static async canEnableCache() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(ENABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(DISABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static hasDisableFeature() {\n\t\tassert.isFunction(this.Action('cache', 'disable').execute)\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDisablingIfDockerIsNotInstalled() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDisablingIfDockerIsNotStarted() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorIfCacheIsNotInstalled() {\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t\tstderr: 'tsanoehusnatohu snatoh No such container staoheu saotnhu ',\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'CACHE_NOT_ENABLED')\n\t}\n\n\t@test()\n\tprotected static async canEnableCacheMultipleTimes() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(DISABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(ENABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tawait this.Action('cache', 'enable').execute({})\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"file":"EnablingAndDisablingCache.test.js"}
|
|
@@ -33,6 +33,8 @@ var _testUtils = require("@sprucelabs/test-utils");
|
|
|
33
33
|
|
|
34
34
|
var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
|
|
35
35
|
|
|
36
|
+
var _constants = require("../../tests/constants");
|
|
37
|
+
|
|
36
38
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class;
|
|
37
39
|
|
|
38
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
@@ -409,7 +411,7 @@ var InstallingASkillAtAnOrgTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
409
411
|
switch (_context8.prev = _context8.next) {
|
|
410
412
|
case 0:
|
|
411
413
|
_context8.next = 2;
|
|
412
|
-
return this.people.loginAsDemoPerson(
|
|
414
|
+
return this.people.loginAsDemoPerson(_constants.DEMO_NUMBER_INSTALL_SKILL);
|
|
413
415
|
|
|
414
416
|
case 2:
|
|
415
417
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts"],"names":["InstallingASkillAtAnOrgTest","login","getOrganizationFixture","clearAllOrgs","Cli","assert","isFunction","Action","execute","seedDemoOrg","name","org","FeatureFixture","installCachedFeatures","getSkillFixture","registerCurrentSkill","people","logout","organizationId","id","anonResults","isTruthy","errors","eventAssertUtil","assertError","errorAssert","skill","promise","waitForInput","doesInclude","ui","getLastInvocation","command","assertUtil","stringify","sendInput","results","isFalsy","Store","isSkillInstalledAtOrg","isInstalled","org2","options","type","loginAsDemoPerson","
|
|
1
|
+
{"version":3,"sources":["../../../src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts"],"names":["InstallingASkillAtAnOrgTest","login","getOrganizationFixture","clearAllOrgs","Cli","assert","isFunction","Action","execute","seedDemoOrg","name","org","FeatureFixture","installCachedFeatures","getSkillFixture","registerCurrentSkill","people","logout","organizationId","id","anonResults","isTruthy","errors","eventAssertUtil","assertError","errorAssert","skill","promise","waitForInput","doesInclude","ui","getLastInvocation","command","assertUtil","stringify","sendInput","results","isFalsy","Store","isSkillInstalledAtOrg","isInstal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AAAA,WA9BP;;AAmCCnC,6BAAOgB,QAAP,CAAgBmB,WAAhB;;AAnCD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;iGAsCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBACO,KAAKxB,MAAL,CAAY4B,iBAAZ,CAA8BC,oCAA9B,CADP;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EA7IwDC,4B","sourcesContent":["import { eventAssertUtil } from '@sprucelabs/spruce-event-utils'\nimport { test, assert, assertUtil } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\nimport { DEMO_NUMBER_INSTALL_SKILL } from '../../tests/constants'\n\nexport default class InstallingASkillAtAnOrgTest extends AbstractCliTest {\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tawait this.login()\n\t\tawait this.getOrganizationFixture().clearAllOrgs()\n\t}\n\n\t@test()\n\tprotected static async hasInstallAction() {\n\t\tawait this.Cli()\n\t\tassert.isFunction(this.Action('organization', 'install').execute)\n\t}\n\n\t@test()\n\tprotected static async cantInstallWithoutBeingLoggedIn() {\n\t\tconst org = await this.getOrganizationFixture().seedDemoOrg({\n\t\t\tname: 'new org',\n\t\t})\n\n\t\tawait this.FeatureFixture().installCachedFeatures('organizations')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'my amazing skill',\n\t\t})\n\n\t\tawait this.people.logout()\n\n\t\tawait this.Cli()\n\n\t\tconst anonResults = await this.Action('organization', 'install').execute({\n\t\t\torganizationId: org.id,\n\t\t})\n\n\t\tassert.isTruthy(anonResults.errors)\n\t\teventAssertUtil.assertError(anonResults.errors[0], 'UNAUTHORIZED_ACCESS')\n\t}\n\n\t@test()\n\tprotected static async cantInstallWithoutAnyOrgs() {\n\t\tawait this.FeatureFixture().installCachedFeatures('organizations')\n\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'my amazing skill',\n\t\t})\n\n\t\tconst anonResults = await this.Action('organization', 'install').execute({})\n\n\t\tassert.isTruthy(anonResults.errors)\n\t\terrorAssert.assertError(anonResults.errors[0], 'NO_ORGANIZATIONS_FOUND')\n\t}\n\n\t@test()\n\tprotected static async cantInstallWithoutBeingRegistered() {\n\t\tawait this.FeatureFixture().installCachedFeatures('organizations')\n\n\t\tawait this.getOrganizationFixture().seedDemoOrg({\n\t\t\tname: 'My great org',\n\t\t})\n\n\t\tconst anonResults = await this.Action('organization', 'install').execute({})\n\n\t\tassert.isTruthy(anonResults.errors)\n\t\terrorAssert.assertError(anonResults.errors[0], 'SKILL_NOT_REGISTERED')\n\t}\n\n\t@test()\n\tprotected static async canInstallSkillAtOrg() {\n\t\tawait this.FeatureFixture().installCachedFeatures('organizations')\n\n\t\tconst org = await this.getOrganizationFixture().seedDemoOrg({\n\t\t\tname: 'My great org',\n\t\t})\n\n\t\tconst skill = await this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'my amazing skill',\n\t\t})\n\n\t\tconst promise = this.Action('organization', 'install').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(\n\t\t\tthis.ui.getLastInvocation().command,\n\t\t\t'confirm',\n\t\t\t`ui didn't get back a confirm, got back \\n\\n${assertUtil.stringify(\n\t\t\t\tthis.ui.getLastInvocation()\n\t\t\t)}`\n\t\t)\n\n\t\tawait this.ui.sendInput('')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst isInstalled = await this.Store('organization').isSkillInstalledAtOrg(\n\t\t\tskill.id,\n\t\t\torg.id\n\t\t)\n\n\t\tassert.isTruthy(isInstalled)\n\t}\n\n\t@test()\n\tprotected static async asksYouToSelectOrgWithMoreThanOne() {\n\t\tawait this.FeatureFixture().installCachedFeatures('organizations')\n\n\t\tawait this.getOrganizationFixture().seedDemoOrg({\n\t\t\tname: 'My great org',\n\t\t})\n\n\t\tconst org2 = await this.getOrganizationFixture().seedDemoOrg({\n\t\t\tname: 'My great org',\n\t\t})\n\n\t\tconst skill = await this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'my amazing skill',\n\t\t})\n\n\t\tconst promise = this.Action('organization', 'install').execute({})\n\n\t\tawait this.waitForInput()\n\n\t\tassert.doesInclude(this.ui.getLastInvocation().options, {\n\t\t\ttype: 'select',\n\t\t})\n\n\t\tawait this.ui.sendInput(org2.id)\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst isInstalled = await this.Store('organization').isSkillInstalledAtOrg(\n\t\t\tskill.id,\n\t\t\torg2.id\n\t\t)\n\n\t\tassert.isTruthy(isInstalled)\n\t}\n\n\tprivate static async login() {\n\t\tawait this.people.loginAsDemoPerson(DEMO_NUMBER_INSTALL_SKILL)\n\t}\n}\n"],"file":"InstallingASkillAtAnOrg.test.js"}
|
|
@@ -33,6 +33,8 @@ var _testUtils = require("@sprucelabs/test-utils");
|
|
|
33
33
|
|
|
34
34
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../tests/AbstractSkillTest"));
|
|
35
35
|
|
|
36
|
+
var _constants = require("../../tests/constants");
|
|
37
|
+
|
|
36
38
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2;
|
|
37
39
|
|
|
38
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
@@ -63,7 +65,7 @@ var LoggingInAsASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)()
|
|
|
63
65
|
|
|
64
66
|
case 2:
|
|
65
67
|
_context.next = 4;
|
|
66
|
-
return this.people.loginAsDemoPerson(
|
|
68
|
+
return this.people.loginAsDemoPerson(_constants.DEMO_NUMBER_LOGIN_AS_SKILL);
|
|
67
69
|
|
|
68
70
|
case 4:
|
|
69
71
|
skillFixture = this.getSkillFixture();
|
|
@@ -192,7 +194,7 @@ var LoggingInAsASkillTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)()
|
|
|
192
194
|
switch (_context5.prev = _context5.next) {
|
|
193
195
|
case 0:
|
|
194
196
|
_context5.next = 2;
|
|
195
|
-
return this.people.loginAsDemoPerson(
|
|
197
|
+
return this.people.loginAsDemoPerson(_constants.DEMO_NUMBER_LOGIN_AS_SKILL);
|
|
196
198
|
|
|
197
199
|
case 2:
|
|
198
200
|
person = _context5.sent;
|