@sprucelabs/spruce-cli 15.2.17 → 15.2.20
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/.spruce/events/events.contract.d.ts +102 -4
- package/build/.spruce/events/events.contract.js +3 -1
- package/build/.spruce/events/events.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.d.ts +15 -0
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js +18 -3
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.d.ts +21 -4
- package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.js +24 -7
- package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.d.ts +18 -1
- package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.js +21 -4
- package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/listViews.v2021_02_11.contract.d.ts +39 -0
- package/build/.spruce/events/heartwood/listViews.v2021_02_11.contract.js +53 -0
- package/build/.spruce/events/heartwood/listViews.v2021_02_11.contract.js.map +1 -0
- package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.d.ts +11 -0
- package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.js +13 -2
- package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.d.ts +0 -7
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.js +38 -403
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill2.test.d.ts +7 -15
- package/build/__tests__/behavioral/skill/UpgradingASkill2.test.js +218 -341
- package/build/__tests__/behavioral/skill/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill3.test.d.ts +16 -5
- package/build/__tests__/behavioral/skill/UpgradingASkill3.test.js +416 -141
- package/build/__tests__/behavioral/skill/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill4.test.d.ts +5 -8
- package/build/__tests__/behavioral/skill/UpgradingASkill4.test.js +147 -205
- package/build/__tests__/behavioral/skill/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill5.test.d.ts +11 -0
- package/build/__tests__/behavioral/skill/UpgradingASkill5.test.js +357 -0
- package/build/__tests__/behavioral/skill/UpgradingASkill5.test.js.map +1 -0
- package/build/__tests__/behavioral/tests/CreatingATest.test.d.ts +3 -0
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +142 -45
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/package.json +73 -35
- package/src/.spruce/events/events.contract.ts +6 -0
- package/src/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.ts +15 -0
- package/src/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.ts +21 -4
- package/src/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.ts +18 -1
- package/src/.spruce/events/heartwood/listViews.v2021_02_11.contract.ts +47 -0
- package/src/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.ts +11 -0
- package/src/__tests__/behavioral/skill/UpgradingASkill.test.ts +0 -184
- package/src/__tests__/behavioral/skill/UpgradingASkill2.test.ts +120 -157
- package/src/__tests__/behavioral/skill/UpgradingASkill3.test.ts +184 -78
- package/src/__tests__/behavioral/skill/UpgradingASkill4.test.ts +90 -91
- package/src/__tests__/behavioral/skill/UpgradingASkill5.test.ts +128 -0
- package/src/__tests__/behavioral/tests/CreatingATest.test.ts +29 -12
|
@@ -35,13 +35,13 @@ var _test2 = _interopRequireDefault(require("../../../tests/utilities/test.utili
|
|
|
35
35
|
|
|
36
36
|
var _uiAssert = _interopRequireDefault(require("../../../tests/utilities/uiAssert.utility"));
|
|
37
37
|
|
|
38
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class;
|
|
38
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class;
|
|
39
39
|
|
|
40
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); }; }
|
|
41
41
|
|
|
42
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
43
|
|
|
44
|
-
var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)('can create behavioral test with AbstractSpruceFixtureTest', 'AbstractSpruceFixtureTest'), _dec4 = (0, _test.test)('can create behavioral test with AbstractStoreTest', 'AbstractStoreTest (requires install)'), _dec5 = (0, _test.test)('finds folders inside behavioral', 'behavioral'), _dec6 = (0, _test.test)('finds folders inside implementation', 'implementation'), _dec7 = (0, _test.test)(), _dec8 = (0, _test.test)('can select
|
|
44
|
+
var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3 = (0, _test.test)('can create behavioral test with AbstractSpruceFixtureTest', 'AbstractSpruceFixtureTest'), _dec4 = (0, _test.test)('can create behavioral test with AbstractStoreTest', 'AbstractStoreTest (requires install)'), _dec5 = (0, _test.test)('finds folders inside behavioral', 'behavioral'), _dec6 = (0, _test.test)('finds folders inside implementation', 'implementation'), _dec7 = (0, _test.test)(), _dec8 = (0, _test.test)('can select sub dir 1', 'test'), _dec9 = (0, _test.test)('can select sub dir 2', 'test-2'), _dec10 = (0, _test.test)(), _dec11 = (0, _test.test)(), (_class = /*#__PURE__*/function (_AbstractTestTest) {
|
|
45
45
|
(0, _inherits2["default"])(CreatingBehavioralTestsTest, _AbstractTestTest);
|
|
46
46
|
|
|
47
47
|
var _super = _createSuper(CreatingBehavioralTestsTest);
|
|
@@ -120,8 +120,7 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
120
120
|
var _canCreateBehavioralTest = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(testName) {
|
|
121
121
|
var _this = this;
|
|
122
122
|
|
|
123
|
-
var
|
|
124
|
-
|
|
123
|
+
var match;
|
|
125
124
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
126
125
|
while (1) {
|
|
127
126
|
switch (_context3.prev = _context3.next) {
|
|
@@ -129,31 +128,23 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
129
128
|
_LintService["default"].enableLinting();
|
|
130
129
|
|
|
131
130
|
_context3.next = 3;
|
|
132
|
-
return this.
|
|
131
|
+
return this.createTestAndGetFile(testName);
|
|
133
132
|
|
|
134
133
|
case 3:
|
|
135
|
-
|
|
136
|
-
promise = _yield$this$installAn.promise;
|
|
137
|
-
this.selectOptionBasedOnLabel(testName);
|
|
138
|
-
_context3.next = 8;
|
|
139
|
-
return promise;
|
|
140
|
-
|
|
141
|
-
case 8:
|
|
142
|
-
response = _context3.sent;
|
|
143
|
-
match = _test2["default"].assertFileByNameInGeneratedFiles('CanBookAppointment.test.ts', response.files);
|
|
134
|
+
match = _context3.sent;
|
|
144
135
|
|
|
145
136
|
_test.assert.doesInclude(match, 'behavioral');
|
|
146
137
|
|
|
147
|
-
_context3.next =
|
|
138
|
+
_context3.next = 7;
|
|
148
139
|
return this.Service('build').build();
|
|
149
140
|
|
|
150
|
-
case
|
|
151
|
-
_context3.next =
|
|
141
|
+
case 7:
|
|
142
|
+
_context3.next = 9;
|
|
152
143
|
return _test.assert.doesThrowAsync(function () {
|
|
153
144
|
return _this.Service('command').execute('yarn test');
|
|
154
145
|
}, /false[\s\S]*?does not equal[\s\S]*?true/gi);
|
|
155
146
|
|
|
156
|
-
case
|
|
147
|
+
case 9:
|
|
157
148
|
case "end":
|
|
158
149
|
return _context3.stop();
|
|
159
150
|
}
|
|
@@ -171,7 +162,7 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
171
162
|
key: "promptsToSelectFolderIfInsideTestDir",
|
|
172
163
|
value: function () {
|
|
173
164
|
var _promptsToSelectFolderIfInsideTestDir = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(testType) {
|
|
174
|
-
var _yield$this$
|
|
165
|
+
var _yield$this$installAn, promise;
|
|
175
166
|
|
|
176
167
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
177
168
|
while (1) {
|
|
@@ -186,8 +177,8 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
186
177
|
return this.installAndStartTestActionAndWaitForInput(testType);
|
|
187
178
|
|
|
188
179
|
case 5:
|
|
189
|
-
_yield$this$
|
|
190
|
-
promise = _yield$this$
|
|
180
|
+
_yield$this$installAn = _context4.sent;
|
|
181
|
+
promise = _yield$this$installAn.promise;
|
|
191
182
|
|
|
192
183
|
_uiAssert["default"].assertSelectRenderChoice(this.ui, '.', testType);
|
|
193
184
|
|
|
@@ -222,7 +213,7 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
222
213
|
key: "listsManyDirsIfExistInsideTestDir",
|
|
223
214
|
value: function () {
|
|
224
215
|
var _listsManyDirsIfExistInsideTestDir = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
225
|
-
var dirs, _i, _dirs, dir, _yield$this$
|
|
216
|
+
var dirs, _i, _dirs, dir, _yield$this$installAn2, promise, _i2, _dirs2, _dir;
|
|
226
217
|
|
|
227
218
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
228
219
|
while (1) {
|
|
@@ -243,8 +234,8 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
243
234
|
return this.installAndStartTestActionAndWaitForInput();
|
|
244
235
|
|
|
245
236
|
case 6:
|
|
246
|
-
_yield$this$
|
|
247
|
-
promise = _yield$this$
|
|
237
|
+
_yield$this$installAn2 = _context5.sent;
|
|
238
|
+
promise = _yield$this$installAn2.promise;
|
|
248
239
|
|
|
249
240
|
for (_i2 = 0, _dirs2 = dirs; _i2 < _dirs2.length; _i2++) {
|
|
250
241
|
_dir = _dirs2[_i2];
|
|
@@ -283,7 +274,7 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
283
274
|
var _selectingAnOptionRendersToSubDir = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(dirName) {
|
|
284
275
|
var _results$files, _results$files$;
|
|
285
276
|
|
|
286
|
-
var _yield$this$
|
|
277
|
+
var _yield$this$installAn3, promise, results, expectedPath;
|
|
287
278
|
|
|
288
279
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
289
280
|
while (1) {
|
|
@@ -298,8 +289,8 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
298
289
|
return this.installAndStartTestActionAndWaitForInput('behavioral');
|
|
299
290
|
|
|
300
291
|
case 5:
|
|
301
|
-
_yield$this$
|
|
302
|
-
promise = _yield$this$
|
|
292
|
+
_yield$this$installAn3 = _context6.sent;
|
|
293
|
+
promise = _yield$this$installAn3.promise;
|
|
303
294
|
_context6.next = 9;
|
|
304
295
|
return this.ui.sendInput("".concat(dirName));
|
|
305
296
|
|
|
@@ -371,6 +362,38 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
371
362
|
|
|
372
363
|
return doesNotListFiles;
|
|
373
364
|
}()
|
|
365
|
+
}, {
|
|
366
|
+
key: "allTestsComeFakedToStart",
|
|
367
|
+
value: function () {
|
|
368
|
+
var _allTestsComeFakedToStart = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
369
|
+
var testFile, contents;
|
|
370
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
371
|
+
while (1) {
|
|
372
|
+
switch (_context8.prev = _context8.next) {
|
|
373
|
+
case 0:
|
|
374
|
+
_context8.next = 2;
|
|
375
|
+
return this.createTestAndGetFile();
|
|
376
|
+
|
|
377
|
+
case 2:
|
|
378
|
+
testFile = _context8.sent;
|
|
379
|
+
contents = _spruceSkillUtils.diskUtil.readFile(testFile);
|
|
380
|
+
|
|
381
|
+
_test.assert.doesInclude(contents, 'fake.login()');
|
|
382
|
+
|
|
383
|
+
case 5:
|
|
384
|
+
case "end":
|
|
385
|
+
return _context8.stop();
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}, _callee8, this);
|
|
389
|
+
}));
|
|
390
|
+
|
|
391
|
+
function allTestsComeFakedToStart() {
|
|
392
|
+
return _allTestsComeFakedToStart.apply(this, arguments);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return allTestsComeFakedToStart;
|
|
396
|
+
}()
|
|
374
397
|
}, {
|
|
375
398
|
key: "createTestSubDir",
|
|
376
399
|
value: function createTestSubDir() {
|
|
@@ -387,19 +410,62 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
387
410
|
|
|
388
411
|
return this.resolvePath.apply(this, ['src', '__tests__'].concat(testDirs));
|
|
389
412
|
}
|
|
413
|
+
}, {
|
|
414
|
+
key: "createTest",
|
|
415
|
+
value: function () {
|
|
416
|
+
var _createTest = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
|
417
|
+
var testName,
|
|
418
|
+
_yield$this$installAn4,
|
|
419
|
+
promise,
|
|
420
|
+
response,
|
|
421
|
+
_args9 = arguments;
|
|
422
|
+
|
|
423
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
424
|
+
while (1) {
|
|
425
|
+
switch (_context9.prev = _context9.next) {
|
|
426
|
+
case 0:
|
|
427
|
+
testName = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : 'AbstractSpruceFixtureTest';
|
|
428
|
+
_context9.next = 3;
|
|
429
|
+
return this.installAndStartTestActionAndWaitForInput();
|
|
430
|
+
|
|
431
|
+
case 3:
|
|
432
|
+
_yield$this$installAn4 = _context9.sent;
|
|
433
|
+
promise = _yield$this$installAn4.promise;
|
|
434
|
+
this.selectOptionBasedOnLabel(testName);
|
|
435
|
+
_context9.next = 8;
|
|
436
|
+
return promise;
|
|
437
|
+
|
|
438
|
+
case 8:
|
|
439
|
+
response = _context9.sent;
|
|
440
|
+
return _context9.abrupt("return", response);
|
|
441
|
+
|
|
442
|
+
case 10:
|
|
443
|
+
case "end":
|
|
444
|
+
return _context9.stop();
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}, _callee9, this);
|
|
448
|
+
}));
|
|
449
|
+
|
|
450
|
+
function createTest() {
|
|
451
|
+
return _createTest.apply(this, arguments);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
return createTest;
|
|
455
|
+
}()
|
|
390
456
|
}, {
|
|
391
457
|
key: "installAndStartTestActionAndWaitForInput",
|
|
392
458
|
value: function () {
|
|
393
|
-
var _installAndStartTestActionAndWaitForInput = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
459
|
+
var _installAndStartTestActionAndWaitForInput = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
394
460
|
var testType,
|
|
395
461
|
promise,
|
|
396
|
-
|
|
397
|
-
return _regenerator["default"].wrap(function
|
|
462
|
+
_args10 = arguments;
|
|
463
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
398
464
|
while (1) {
|
|
399
|
-
switch (
|
|
465
|
+
switch (_context10.prev = _context10.next) {
|
|
400
466
|
case 0:
|
|
401
|
-
testType =
|
|
402
|
-
|
|
467
|
+
testType = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : 'behavioral';
|
|
468
|
+
_context10.next = 3;
|
|
403
469
|
return this.installTests();
|
|
404
470
|
|
|
405
471
|
case 3:
|
|
@@ -409,20 +475,20 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
409
475
|
nameCamel: 'canBookAppointment',
|
|
410
476
|
namePascal: 'CanBookAppointment'
|
|
411
477
|
});
|
|
412
|
-
|
|
478
|
+
_context10.next = 6;
|
|
413
479
|
return this.waitForInput();
|
|
414
480
|
|
|
415
481
|
case 6:
|
|
416
|
-
return
|
|
482
|
+
return _context10.abrupt("return", {
|
|
417
483
|
promise: promise
|
|
418
484
|
});
|
|
419
485
|
|
|
420
486
|
case 7:
|
|
421
487
|
case "end":
|
|
422
|
-
return
|
|
488
|
+
return _context10.stop();
|
|
423
489
|
}
|
|
424
490
|
}
|
|
425
|
-
},
|
|
491
|
+
}, _callee10, this);
|
|
426
492
|
}));
|
|
427
493
|
|
|
428
494
|
function installAndStartTestActionAndWaitForInput() {
|
|
@@ -434,24 +500,24 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
434
500
|
}, {
|
|
435
501
|
key: "waitAndSelectSubClass",
|
|
436
502
|
value: function () {
|
|
437
|
-
var _waitAndSelectSubClass = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
438
|
-
return _regenerator["default"].wrap(function
|
|
503
|
+
var _waitAndSelectSubClass = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(selectedSubClass) {
|
|
504
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
439
505
|
while (1) {
|
|
440
|
-
switch (
|
|
506
|
+
switch (_context11.prev = _context11.next) {
|
|
441
507
|
case 0:
|
|
442
|
-
|
|
508
|
+
_context11.next = 2;
|
|
443
509
|
return this.waitForInput();
|
|
444
510
|
|
|
445
511
|
case 2:
|
|
446
|
-
|
|
512
|
+
_context11.next = 4;
|
|
447
513
|
return this.ui.sendInput(selectedSubClass !== null && selectedSubClass !== void 0 ? selectedSubClass : '');
|
|
448
514
|
|
|
449
515
|
case 4:
|
|
450
516
|
case "end":
|
|
451
|
-
return
|
|
517
|
+
return _context11.stop();
|
|
452
518
|
}
|
|
453
519
|
}
|
|
454
|
-
},
|
|
520
|
+
}, _callee11, this);
|
|
455
521
|
}));
|
|
456
522
|
|
|
457
523
|
function waitAndSelectSubClass(_x4) {
|
|
@@ -460,8 +526,39 @@ var CreatingBehavioralTestsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.t
|
|
|
460
526
|
|
|
461
527
|
return waitAndSelectSubClass;
|
|
462
528
|
}()
|
|
529
|
+
}, {
|
|
530
|
+
key: "createTestAndGetFile",
|
|
531
|
+
value: function () {
|
|
532
|
+
var _createTestAndGetFile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(testName) {
|
|
533
|
+
var response, match;
|
|
534
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
535
|
+
while (1) {
|
|
536
|
+
switch (_context12.prev = _context12.next) {
|
|
537
|
+
case 0:
|
|
538
|
+
_context12.next = 2;
|
|
539
|
+
return this.createTest(testName);
|
|
540
|
+
|
|
541
|
+
case 2:
|
|
542
|
+
response = _context12.sent;
|
|
543
|
+
match = _test2["default"].assertFileByNameInGeneratedFiles('CanBookAppointment.test.ts', response.files);
|
|
544
|
+
return _context12.abrupt("return", match);
|
|
545
|
+
|
|
546
|
+
case 5:
|
|
547
|
+
case "end":
|
|
548
|
+
return _context12.stop();
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}, _callee12, this);
|
|
552
|
+
}));
|
|
553
|
+
|
|
554
|
+
function createTestAndGetFile(_x5) {
|
|
555
|
+
return _createTestAndGetFile.apply(this, arguments);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
return createTestAndGetFile;
|
|
559
|
+
}()
|
|
463
560
|
}]);
|
|
464
561
|
return CreatingBehavioralTestsTest;
|
|
465
|
-
}(_AbstractTestTest2["default"]), ((0, _applyDecoratedDescriptor2["default"])(_class, "hasCreateAction", [_dec], Object.getOwnPropertyDescriptor(_class, "hasCreateAction"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "requiresInstallIfFeatureNotInstalled", [_dec2], Object.getOwnPropertyDescriptor(_class, "requiresInstallIfFeatureNotInstalled"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateBehavioralTest", [_dec3, _dec4], Object.getOwnPropertyDescriptor(_class, "canCreateBehavioralTest"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "promptsToSelectFolderIfInsideTestDir", [_dec5, _dec6], Object.getOwnPropertyDescriptor(_class, "promptsToSelectFolderIfInsideTestDir"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "listsManyDirsIfExistInsideTestDir", [_dec7], Object.getOwnPropertyDescriptor(_class, "listsManyDirsIfExistInsideTestDir"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "selectingAnOptionRendersToSubDir", [_dec8, _dec9], Object.getOwnPropertyDescriptor(_class, "selectingAnOptionRendersToSubDir"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "doesNotListFiles", [_dec10], Object.getOwnPropertyDescriptor(_class, "doesNotListFiles"), _class)), _class));
|
|
562
|
+
}(_AbstractTestTest2["default"]), ((0, _applyDecoratedDescriptor2["default"])(_class, "hasCreateAction", [_dec], Object.getOwnPropertyDescriptor(_class, "hasCreateAction"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "requiresInstallIfFeatureNotInstalled", [_dec2], Object.getOwnPropertyDescriptor(_class, "requiresInstallIfFeatureNotInstalled"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateBehavioralTest", [_dec3, _dec4], Object.getOwnPropertyDescriptor(_class, "canCreateBehavioralTest"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "promptsToSelectFolderIfInsideTestDir", [_dec5, _dec6], Object.getOwnPropertyDescriptor(_class, "promptsToSelectFolderIfInsideTestDir"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "listsManyDirsIfExistInsideTestDir", [_dec7], Object.getOwnPropertyDescriptor(_class, "listsManyDirsIfExistInsideTestDir"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "selectingAnOptionRendersToSubDir", [_dec8, _dec9], Object.getOwnPropertyDescriptor(_class, "selectingAnOptionRendersToSubDir"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "doesNotListFiles", [_dec10], Object.getOwnPropertyDescriptor(_class, "doesNotListFiles"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "allTestsComeFakedToStart", [_dec11], Object.getOwnPropertyDescriptor(_class, "allTestsComeFakedToStart"), _class)), _class));
|
|
466
563
|
exports["default"] = CreatingBehavioralTestsTest;
|
|
467
564
|
//# sourceMappingURL=CreatingATest.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/__tests__/behavioral/tests/CreatingATest.test.ts"],"names":["CreatingBehavioralTestsTest","assert","isFunction","Action","execute","installTests","testFeature","getFeatureInstaller","getFeature","buildParentClassCandidates","candidates","doesInclude","label","name","testName","LintService","enableLinting","installAndStartTestActionAndWaitForInput","promise","selectOptionBasedOnLabel","response","match","testUtil","assertFileByNameInGeneratedFiles","files","Service","build","doesThrowAsync","testType","createTestSubDir","uiAssert","assertSelectRenderChoice","ui","sendInput","waitAndSelectSubClass","dirs","dir","dirName","results","expectedPath","resolvePath","isEqual","path","file","resolveTestDir","diskUtil","writeFile","assertSelectDidNotRenderChoice","reset","newDir","createDir","testDirs","type","nameReadable","nameCamel","namePascal","waitForInput","selectedSubClass","AbstractTestTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,2B,WACnB,iB,UAKA,iB,UAaA,gBACA,2DADA,EAEA,2BAFA,C,UAIA,gBACA,mDADA,EAEA,sCAFA,C,UA2BA,gBAAK,iCAAL,EAAwC,YAAxC,C,UACA,gBAAK,qCAAL,EAA4C,gBAA5C,C,UAqBA,iB,UAuBA,gBAAK,qBAAL,EAA4B,MAA5B,C,UACA,gBAAK,qBAAL,EAA4B,QAA5B,C,WA0BA,iB;;;;;;;;;;;;;2GAzHD;AAAA;AAAA;AAAA;AAAA;AAECC,6BAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,MAAZ,EAAoB,QAApB,EAA8BC,OAAhD;;AAFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;gIAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAEO,KAAKC,YAAL,CAAkB,mBAAlB,CAFP;;AAAA;AAIOC,gBAAAA,WAJP,GAIqB,KAAKC,mBAAL,GAA2BC,UAA3B,CAAsC,MAAtC,CAJrB;AAAA;AAAA,uBAK0BF,WAAW,CAACG,0BAAZ,EAL1B;;AAAA;AAKOC,gBAAAA,UALP;;AAOCT,6BAAOU,WAAP,CAAmBD,UAAnB,EAA+B;AAC9BE,kBAAAA,KAAK,EAAE,8CADuB;AAE9BC,kBAAAA,IAAI,EAAE;AAFwB,iBAA/B;;AAPD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;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B,CAAsC;AACrDgD,kBAAAA,IAAI,EAAExB,QAD+C;AAErDyB,kBAAAA,YAAY,EAAE,sBAFuC;AAGrDC,kBAAAA,SAAS,EAAE,oBAH0C;AAIrDC,kBAAAA,UAAU,EAAE;AAJyC,iBAAtC,CAJjB;AAAA;AAAA,uBAWO,KAAKC,YAAL,EAXP;;AAAA;AAAA,kDAYQ;AAAEtC,kBAAAA,OAAO,EAAPA;AAAF,iBAZR;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;iHAeA,kBAA2CuC,gBAA3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBACO,KAAKD,YAAL,EADP;;AAAA;AAAA;AAAA,uBAEO,KAAKxB,EAAL,CAAQC,SAAR,CAAkBwB,gBAAlB,aAAkBA,gBAAlB,cAAkBA,gBAAlB,GAAsC,EAAtC,CAFP;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EArKwDC,6B","sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport LintService from '../../../services/LintService'\nimport AbstractTestTest from '../../../tests/AbstractTestTest'\nimport testUtil from '../../../tests/utilities/test.utility'\nimport uiAssert from '../../../tests/utilities/uiAssert.utility'\n\nexport default class CreatingBehavioralTestsTest extends AbstractTestTest {\n\t@test()\n\tprotected static async hasCreateAction() {\n\t\tassert.isFunction(this.Action('test', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async requiresInstallIfFeatureNotInstalled() {\n\t\tawait this.installTests('testsInNodeModule')\n\n\t\tconst testFeature = this.getFeatureInstaller().getFeature('test')\n\t\tconst candidates = await testFeature.buildParentClassCandidates()\n\n\t\tassert.doesInclude(candidates, {\n\t\t\tlabel: 'AbstractSpruceFixtureTest (requires install)',\n\t\t\tname: 'AbstractSpruceFixtureTest',\n\t\t})\n\t}\n\n\t@test(\n\t\t'can create behavioral test with AbstractSpruceFixtureTest',\n\t\t'AbstractSpruceFixtureTest'\n\t)\n\t@test(\n\t\t'can create behavioral test with AbstractStoreTest',\n\t\t'AbstractStoreTest (requires install)'\n\t)\n\tprotected static async canCreateBehavioralTest(testName: string) {\n\t\tLintService.enableLinting()\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput()\n\n\t\tthis.selectOptionBasedOnLabel(testName)\n\n\t\tconst response = await promise\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'CanBookAppointment.test.ts',\n\t\t\tresponse.files\n\t\t)\n\n\t\tassert.doesInclude(match, 'behavioral')\n\n\t\tawait this.Service('build').build()\n\n\t\tawait assert.doesThrowAsync(\n\t\t\t() => this.Service('command').execute('yarn test'),\n\t\t\t/false.*?does not equal.*?true/gis\n\t\t)\n\t}\n\n\t@test('finds folders inside behavioral', 'behavioral')\n\t@test('finds folders inside implementation', 'implementation')\n\tprotected static async promptsToSelectFolderIfInsideTestDir(\n\t\ttestType: string\n\t) {\n\t\tawait this.installTests()\n\n\t\tthis.createTestSubDir(testType, 'dummy1')\n\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput(\n\t\t\ttestType\n\t\t)\n\n\t\tuiAssert.assertSelectRenderChoice(this.ui, '.', testType)\n\t\tuiAssert.assertSelectRenderChoice(this.ui, `dummy1`, `${testType}/dummy1`)\n\n\t\tawait this.ui.sendInput('.')\n\t\tawait this.waitAndSelectSubClass()\n\n\t\tawait promise\n\t}\n\n\t@test()\n\tprotected static async listsManyDirsIfExistInsideTestDir() {\n\t\tawait this.installTests()\n\n\t\tconst dirs = ['dir1', 'dir2', 'dir3']\n\n\t\tfor (const dir of dirs) {\n\t\t\tthis.createTestSubDir('behavioral', dir)\n\t\t}\n\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput()\n\n\t\tfor (const dir of dirs) {\n\t\t\tuiAssert.assertSelectRenderChoice(this.ui, `${dir}`, `behavioral/${dir}`)\n\t\t}\n\n\t\tawait this.ui.sendInput('.')\n\n\t\tawait this.waitAndSelectSubClass()\n\n\t\tawait promise\n\t}\n\n\t@test('can select subdir 1', 'test')\n\t@test('can select subdir 2', 'test-2')\n\tprotected static async selectingAnOptionRendersToSubDir(dirName: string) {\n\t\tawait this.installTests()\n\t\tthis.createTestSubDir('behavioral', dirName)\n\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput(\n\t\t\t'behavioral'\n\t\t)\n\n\t\tawait this.ui.sendInput(`${dirName}`)\n\n\t\tawait this.waitAndSelectSubClass()\n\n\t\tconst results = await promise\n\n\t\tconst expectedPath = this.resolvePath(\n\t\t\t'src',\n\t\t\t'__tests__',\n\t\t\t'behavioral',\n\t\t\tdirName,\n\t\t\t'CanBookAppointment.test.ts'\n\t\t)\n\n\t\tassert.isEqual(expectedPath, results.files?.[0]?.path)\n\t}\n\n\t@test()\n\tprotected static async doesNotListFiles() {\n\t\tawait this.installTests()\n\t\tthis.createTestSubDir('behavioral', 'subdir')\n\n\t\tconst file = this.resolveTestDir('behavioral', 'test.ts')\n\t\tdiskUtil.writeFile(file, 'what the!?')\n\n\t\tawait this.installAndStartTestActionAndWaitForInput()\n\n\t\tuiAssert.assertSelectDidNotRenderChoice(\n\t\t\tthis.ui,\n\t\t\t'test',\n\t\t\t`behavioral/test/test.ts`\n\t\t)\n\n\t\tthis.ui.reset()\n\t}\n\n\tprivate static createTestSubDir(...testDirs: string[]) {\n\t\tconst newDir = this.resolveTestDir(...testDirs)\n\t\tdiskUtil.createDir(newDir)\n\t}\n\n\tprivate static resolveTestDir(...testDirs: string[]) {\n\t\treturn this.resolvePath('src', '__tests__', ...testDirs)\n\t}\n\n\tprivate static async installAndStartTestActionAndWaitForInput(\n\t\ttestType = 'behavioral'\n\t) {\n\t\tawait this.installTests()\n\t\tconst promise = this.Action('test', 'create').execute({\n\t\t\ttype: testType,\n\t\t\tnameReadable: 'Can book appointment',\n\t\t\tnameCamel: 'canBookAppointment',\n\t\t\tnamePascal: 'CanBookAppointment',\n\t\t})\n\n\t\tawait this.waitForInput()\n\t\treturn { promise }\n\t}\n\n\tprivate static async waitAndSelectSubClass(selectedSubClass?: string) {\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput(selectedSubClass ?? '')\n\t}\n}\n"],"file":"CreatingATest.test.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/__tests__/behavioral/tests/CreatingATest.test.ts"],"names":["CreatingBehavioralTestsTest","assert","isFunction","Action","execute","installTests","testFeature","getFeatureInstaller","getFeature","buildParentClassCandidates","candidates","doesInclude","label","name","testName","LintService","enableLinting","createTestAndGetFile","match","Service","build","doesThrowAsync","testType","createTestSubDir","installAndStartTestActionAndWaitForInput","promise","uiAssert","assertSelectRenderChoice","ui","sendInput","waitAndSelectSubClass","dirs","dir","dirName","results","expectedPath","resolvePath","isEqual","files","path","file","resolveTestDir","diskUtil","writeFile","assertSelectDidNotRenderChoice","reset","testFile","contents","readFile","newDir","createDir","testDirs","selectOptionBasedOnLabel","response","type","nameReadable","nameCamel","namePascal","waitForInput","selectedSubClass","createTest","testUtil","assertFileByNameInGeneratedFiles","AbstractTestTest"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,2B,WACnB,iB,UAKA,iB,UAaA,gBACA,2DADA,EAEA,2BAFA,C,UAIA,gBACA,mDADA,EAEA,sCAFA,C,UAkBA,gBAAK,iCAAL,EAAwC,YAAxC,C,UACA,gBAAK,qCAAL,EAA4C,gBAA5C,C,UAqBA,iB,UAuBA,gBAAK,sBAAL,EAA6B,MAA7B,C,UACA,gBAAK,sBAAL,EAA6B,QAA7B,C,WA0BA,iB,WAmBA,iB;;;;;;;;;;;;;2GAnID;AAAA;AAAA;AAAA;AAAA;AAECC,6BAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,MAAZ,EAAoB,QAApB,EAA8BC,OAAhD;;AAFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;g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AA2CkC,gBAA3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBACO,KAAKD,YAAL,EADP;;AAAA;AAAA;AAAA,uBAEO,KAAK9B,EAAL,CAAQC,SAAR,CAAkB8B,gBAAlB,aAAkBA,gBAAlB,cAAkBA,gBAAlB,GAAsC,EAAtC,CAFP;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;gHAKA,mBAA0C7C,QAA1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBACwB,KAAK8C,UAAL,CAAgB9C,QAAhB,CADxB;;AAAA;AACOuC,gBAAAA,QADP;AAGOnC,gBAAAA,KAHP,GAGe2C,kBAASC,gCAAT,CACb,4BADa,EAEbT,QAAQ,CAACf,KAFI,CAHf;AAAA,mDAOQpB,KAPR;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;EAjLwD6C,6B","sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport LintService from '../../../services/LintService'\nimport AbstractTestTest from '../../../tests/AbstractTestTest'\nimport testUtil from '../../../tests/utilities/test.utility'\nimport uiAssert from '../../../tests/utilities/uiAssert.utility'\n\nexport default class CreatingBehavioralTestsTest extends AbstractTestTest {\n\t@test()\n\tprotected static async hasCreateAction() {\n\t\tassert.isFunction(this.Action('test', 'create').execute)\n\t}\n\n\t@test()\n\tprotected static async requiresInstallIfFeatureNotInstalled() {\n\t\tawait this.installTests('testsInNodeModule')\n\n\t\tconst testFeature = this.getFeatureInstaller().getFeature('test')\n\t\tconst candidates = await testFeature.buildParentClassCandidates()\n\n\t\tassert.doesInclude(candidates, {\n\t\t\tlabel: 'AbstractSpruceFixtureTest (requires install)',\n\t\t\tname: 'AbstractSpruceFixtureTest',\n\t\t})\n\t}\n\n\t@test(\n\t\t'can create behavioral test with AbstractSpruceFixtureTest',\n\t\t'AbstractSpruceFixtureTest'\n\t)\n\t@test(\n\t\t'can create behavioral test with AbstractStoreTest',\n\t\t'AbstractStoreTest (requires install)'\n\t)\n\tprotected static async canCreateBehavioralTest(testName: string) {\n\t\tLintService.enableLinting()\n\t\tconst match = await this.createTestAndGetFile(testName)\n\n\t\tassert.doesInclude(match, 'behavioral')\n\n\t\tawait this.Service('build').build()\n\n\t\tawait assert.doesThrowAsync(\n\t\t\t() => this.Service('command').execute('yarn test'),\n\t\t\t/false.*?does not equal.*?true/gis\n\t\t)\n\t}\n\n\t@test('finds folders inside behavioral', 'behavioral')\n\t@test('finds folders inside implementation', 'implementation')\n\tprotected static async promptsToSelectFolderIfInsideTestDir(\n\t\ttestType: string\n\t) {\n\t\tawait this.installTests()\n\n\t\tthis.createTestSubDir(testType, 'dummy1')\n\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput(\n\t\t\ttestType\n\t\t)\n\n\t\tuiAssert.assertSelectRenderChoice(this.ui, '.', testType)\n\t\tuiAssert.assertSelectRenderChoice(this.ui, `dummy1`, `${testType}/dummy1`)\n\n\t\tawait this.ui.sendInput('.')\n\t\tawait this.waitAndSelectSubClass()\n\n\t\tawait promise\n\t}\n\n\t@test()\n\tprotected static async listsManyDirsIfExistInsideTestDir() {\n\t\tawait this.installTests()\n\n\t\tconst dirs = ['dir1', 'dir2', 'dir3']\n\n\t\tfor (const dir of dirs) {\n\t\t\tthis.createTestSubDir('behavioral', dir)\n\t\t}\n\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput()\n\n\t\tfor (const dir of dirs) {\n\t\t\tuiAssert.assertSelectRenderChoice(this.ui, `${dir}`, `behavioral/${dir}`)\n\t\t}\n\n\t\tawait this.ui.sendInput('.')\n\n\t\tawait this.waitAndSelectSubClass()\n\n\t\tawait promise\n\t}\n\n\t@test('can select sub dir 1', 'test')\n\t@test('can select sub dir 2', 'test-2')\n\tprotected static async selectingAnOptionRendersToSubDir(dirName: string) {\n\t\tawait this.installTests()\n\t\tthis.createTestSubDir('behavioral', dirName)\n\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput(\n\t\t\t'behavioral'\n\t\t)\n\n\t\tawait this.ui.sendInput(`${dirName}`)\n\n\t\tawait this.waitAndSelectSubClass()\n\n\t\tconst results = await promise\n\n\t\tconst expectedPath = this.resolvePath(\n\t\t\t'src',\n\t\t\t'__tests__',\n\t\t\t'behavioral',\n\t\t\tdirName,\n\t\t\t'CanBookAppointment.test.ts'\n\t\t)\n\n\t\tassert.isEqual(expectedPath, results.files?.[0]?.path)\n\t}\n\n\t@test()\n\tprotected static async doesNotListFiles() {\n\t\tawait this.installTests()\n\t\tthis.createTestSubDir('behavioral', 'subdir')\n\n\t\tconst file = this.resolveTestDir('behavioral', 'test.ts')\n\t\tdiskUtil.writeFile(file, 'what the!?')\n\n\t\tawait this.installAndStartTestActionAndWaitForInput()\n\n\t\tuiAssert.assertSelectDidNotRenderChoice(\n\t\t\tthis.ui,\n\t\t\t'test',\n\t\t\t`behavioral/test/test.ts`\n\t\t)\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async allTestsComeFakedToStart() {\n\t\tconst testFile = await this.createTestAndGetFile()\n\t\tconst contents = diskUtil.readFile(testFile)\n\t\tassert.doesInclude(contents, 'fake.login()')\n\t}\n\n\tprivate static createTestSubDir(...testDirs: string[]) {\n\t\tconst newDir = this.resolveTestDir(...testDirs)\n\t\tdiskUtil.createDir(newDir)\n\t}\n\n\tprivate static resolveTestDir(...testDirs: string[]) {\n\t\treturn this.resolvePath('src', '__tests__', ...testDirs)\n\t}\n\n\tprivate static async createTest(testName = 'AbstractSpruceFixtureTest') {\n\t\tconst { promise } = await this.installAndStartTestActionAndWaitForInput()\n\n\t\tthis.selectOptionBasedOnLabel(testName)\n\n\t\tconst response = await promise\n\t\treturn response\n\t}\n\n\tprivate static async installAndStartTestActionAndWaitForInput(\n\t\ttestType = 'behavioral'\n\t) {\n\t\tawait this.installTests()\n\t\tconst promise = this.Action('test', 'create').execute({\n\t\t\ttype: testType,\n\t\t\tnameReadable: 'Can book appointment',\n\t\t\tnameCamel: 'canBookAppointment',\n\t\t\tnamePascal: 'CanBookAppointment',\n\t\t})\n\n\t\tawait this.waitForInput()\n\t\treturn { promise }\n\t}\n\n\tprivate static async waitAndSelectSubClass(selectedSubClass?: string) {\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput(selectedSubClass ?? '')\n\t}\n\n\tprivate static async createTestAndGetFile(testName?: string) {\n\t\tconst response = await this.createTest(testName)\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'CanBookAppointment.test.ts',\n\t\t\tresponse.files\n\t\t)\n\t\treturn match\n\t}\n}\n"],"file":"CreatingATest.test.js"}
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"version": "15.2.
|
|
22
|
+
"version": "15.2.20",
|
|
23
23
|
"bin": {
|
|
24
24
|
"spruce": "./build/index.js"
|
|
25
25
|
},
|
|
@@ -77,22 +77,22 @@
|
|
|
77
77
|
"@babel/plugin-proposal-decorators": "7.17.8",
|
|
78
78
|
"@babel/runtime": "7.17.8",
|
|
79
79
|
"@jest/reporters": "27.5.1",
|
|
80
|
-
"@sprucelabs/error": "5.0.
|
|
81
|
-
"@sprucelabs/heartwood-view-controllers": "70.6
|
|
82
|
-
"@sprucelabs/jest-json-reporter": "6.0.
|
|
83
|
-
"@sprucelabs/mercury-client": "22.
|
|
84
|
-
"@sprucelabs/mercury-event-emitter": "22.
|
|
85
|
-
"@sprucelabs/mercury-types": "27.0.
|
|
86
|
-
"@sprucelabs/schema": "27.1.
|
|
87
|
-
"@sprucelabs/spruce-core-schemas": "25.0.
|
|
88
|
-
"@sprucelabs/spruce-event-plugin": "30.
|
|
89
|
-
"@sprucelabs/spruce-event-utils": "19.1.
|
|
90
|
-
"@sprucelabs/spruce-skill-booter": "30.
|
|
91
|
-
"@sprucelabs/spruce-skill-utils": "25.0.
|
|
92
|
-
"@sprucelabs/spruce-templates": "^15.2.
|
|
80
|
+
"@sprucelabs/error": "5.0.432",
|
|
81
|
+
"@sprucelabs/heartwood-view-controllers": "70.9.6",
|
|
82
|
+
"@sprucelabs/jest-json-reporter": "6.0.352",
|
|
83
|
+
"@sprucelabs/mercury-client": "22.2.18",
|
|
84
|
+
"@sprucelabs/mercury-event-emitter": "22.2.18",
|
|
85
|
+
"@sprucelabs/mercury-types": "27.0.200",
|
|
86
|
+
"@sprucelabs/schema": "27.1.38",
|
|
87
|
+
"@sprucelabs/spruce-core-schemas": "25.0.61",
|
|
88
|
+
"@sprucelabs/spruce-event-plugin": "30.3.18",
|
|
89
|
+
"@sprucelabs/spruce-event-utils": "19.1.53",
|
|
90
|
+
"@sprucelabs/spruce-skill-booter": "30.3.18",
|
|
91
|
+
"@sprucelabs/spruce-skill-utils": "25.0.57",
|
|
92
|
+
"@sprucelabs/spruce-templates": "^15.2.20",
|
|
93
93
|
"@typescript-eslint/eslint-plugin": "5.14.0",
|
|
94
94
|
"@typescript-eslint/parser": "5.14.0",
|
|
95
|
-
"cfonts": "2.10.
|
|
95
|
+
"cfonts": "2.10.1",
|
|
96
96
|
"chalk": "4.1.2",
|
|
97
97
|
"chokidar": "3.5.3",
|
|
98
98
|
"cli-table3": "0.6.1",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"gifwrap": "0.10.1",
|
|
104
104
|
"globby": "11.0.4",
|
|
105
105
|
"inflection": "1.13.2",
|
|
106
|
-
"inquirer": "8.2.
|
|
106
|
+
"inquirer": "8.2.2",
|
|
107
107
|
"inquirer-file-tree-selection-prompt": "1.0.18",
|
|
108
108
|
"js-tetris-cli": "0.0.3",
|
|
109
109
|
"jsonwebtoken": "8.5.1",
|
|
@@ -120,26 +120,43 @@
|
|
|
120
120
|
"uuid": "8.3.2"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
|
-
"@
|
|
124
|
-
"@
|
|
125
|
-
"@
|
|
126
|
-
"@
|
|
127
|
-
"@sprucelabs/
|
|
128
|
-
"@sprucelabs/
|
|
129
|
-
"@sprucelabs/
|
|
130
|
-
"@sprucelabs/
|
|
131
|
-
"@sprucelabs/
|
|
132
|
-
"@sprucelabs/
|
|
123
|
+
"@babel/cli": "7.17.6",
|
|
124
|
+
"@babel/plugin-proposal-decorators": "7.17.8",
|
|
125
|
+
"@babel/runtime": "7.17.8",
|
|
126
|
+
"@jest/reporters": "27.5.1",
|
|
127
|
+
"@sprucelabs/data-stores": "9.0.64",
|
|
128
|
+
"@sprucelabs/error": "5.0.432",
|
|
129
|
+
"@sprucelabs/heartwood-view-controllers": "70.9.3",
|
|
130
|
+
"@sprucelabs/jest-json-reporter": "6.0.352",
|
|
131
|
+
"@sprucelabs/jest-sheets-reporter": "1.3.38",
|
|
132
|
+
"@sprucelabs/mercury-client": "22.2.17",
|
|
133
|
+
"@sprucelabs/mercury-core-events": "3.1.52",
|
|
134
|
+
"@sprucelabs/mercury-event-emitter": "22.2.17",
|
|
135
|
+
"@sprucelabs/mercury-types": "27.0.200",
|
|
136
|
+
"@sprucelabs/resolve-path-aliases": "1.1.21",
|
|
137
|
+
"@sprucelabs/schema": "27.1.38",
|
|
138
|
+
"@sprucelabs/spruce-conversation-plugin": "30.3.18",
|
|
139
|
+
"@sprucelabs/spruce-core-schemas": "25.0.61",
|
|
140
|
+
"@sprucelabs/spruce-deploy-plugin": "30.3.18",
|
|
141
|
+
"@sprucelabs/spruce-event-plugin": "30.3.16",
|
|
142
|
+
"@sprucelabs/spruce-event-utils": "19.1.52",
|
|
143
|
+
"@sprucelabs/spruce-skill-booter": "30.3.16",
|
|
144
|
+
"@sprucelabs/spruce-skill-utils": "25.0.56",
|
|
145
|
+
"@sprucelabs/spruce-store-plugin": "30.3.18",
|
|
146
|
+
"@sprucelabs/spruce-templates": "15.2.19",
|
|
147
|
+
"@sprucelabs/spruce-test-fixtures": "30.3.18",
|
|
148
|
+
"@sprucelabs/test": "7.7.298",
|
|
149
|
+
"@sprucelabs/test-utils": "3.0.510",
|
|
133
150
|
"@types/blessed": "0.1.19",
|
|
134
151
|
"@types/eslint": "8.4.1",
|
|
135
152
|
"@types/fs-extra": "9.0.13",
|
|
136
153
|
"@types/inflection": "1.13.0",
|
|
137
|
-
"@types/inquirer": "8.2.
|
|
154
|
+
"@types/inquirer": "8.2.1",
|
|
138
155
|
"@types/jsonwebtoken": "8.5.8",
|
|
139
|
-
"@types/lodash": "4.14.
|
|
156
|
+
"@types/lodash": "4.14.181",
|
|
140
157
|
"@types/md5": "2.3.2",
|
|
141
158
|
"@types/mkdirp": "1.0.2",
|
|
142
|
-
"@types/node": "17.0.
|
|
159
|
+
"@types/node": "17.0.23",
|
|
143
160
|
"@types/promise.allsettled": "1.0.3",
|
|
144
161
|
"@types/ps-node": "0.1.1",
|
|
145
162
|
"@types/rimraf": "3.0.2",
|
|
@@ -149,25 +166,46 @@
|
|
|
149
166
|
"@types/superagent": "4.1.15",
|
|
150
167
|
"@types/terminal-kit": "1.28.4",
|
|
151
168
|
"@types/uuid": "8.3.4",
|
|
169
|
+
"@typescript-eslint/eslint-plugin": "5.17.0",
|
|
170
|
+
"@typescript-eslint/parser": "5.17.0",
|
|
171
|
+
"add": "2.0.6",
|
|
172
|
+
"cfonts": "2.10.1",
|
|
173
|
+
"chokidar": "3.5.3",
|
|
152
174
|
"chokidar-cli": "3.0.0",
|
|
175
|
+
"cli-table3": "0.6.1",
|
|
153
176
|
"concurrently": "7.0.0",
|
|
154
177
|
"conventional-changelog-sprucelabs": "1.1.2",
|
|
178
|
+
"core-js": "3.21.1",
|
|
155
179
|
"dotenv": "16.0.0",
|
|
156
|
-
"eslint": "8.
|
|
180
|
+
"eslint": "8.12.0",
|
|
157
181
|
"eslint-config-spruce": "10.11.2",
|
|
158
182
|
"find-process": "1.4.7",
|
|
183
|
+
"fs-extra": "10.0.1",
|
|
184
|
+
"inflection": "1.13.2",
|
|
185
|
+
"inquirer": "8.2.2",
|
|
186
|
+
"inquirer-file-tree-selection-prompt": "1.0.18",
|
|
159
187
|
"jest": "27.5.1",
|
|
160
188
|
"jest-circus": "27.5.1",
|
|
161
189
|
"jest-junit": "13.0.0",
|
|
162
190
|
"jest-reporters": "0.0.2",
|
|
163
|
-
"
|
|
191
|
+
"js-tetris-cli": "0.0.3",
|
|
192
|
+
"jsonwebtoken": "8.5.1",
|
|
193
|
+
"lodash-es": "4.17.21",
|
|
194
|
+
"md5": "2.3.0",
|
|
195
|
+
"open": "8.4.0",
|
|
196
|
+
"prettier": "2.6.1",
|
|
164
197
|
"ps-node": "0.1.6",
|
|
165
198
|
"rimraf": "3.0.2",
|
|
166
|
-
"
|
|
199
|
+
"semver": "7.3.5",
|
|
200
|
+
"string-argv": "0.3.1",
|
|
201
|
+
"tree-kill": "1.2.2",
|
|
202
|
+
"ts-jest": "27.1.4",
|
|
167
203
|
"ts-node": "10.7.0",
|
|
168
204
|
"tsc-watch": "4.6.2",
|
|
169
|
-
"tsconfig-paths": "3.14.
|
|
170
|
-
"
|
|
205
|
+
"tsconfig-paths": "3.14.1",
|
|
206
|
+
"tsutils": "3.21.0",
|
|
207
|
+
"typescript": "4.6.3",
|
|
208
|
+
"uuid": "8.3.2"
|
|
171
209
|
},
|
|
172
210
|
"testSkillCache": {
|
|
173
211
|
"everything": [
|
|
@@ -598,5 +636,5 @@
|
|
|
598
636
|
"ora"
|
|
599
637
|
]
|
|
600
638
|
},
|
|
601
|
-
"gitHead": "
|
|
639
|
+
"gitHead": "89e566b94e6c7ec1c1838437d43fa3831fce768d"
|
|
602
640
|
}
|
|
@@ -8,6 +8,9 @@ import heartwoodGenerateUrlEventContract_v2021_02_11, {
|
|
|
8
8
|
import heartwoodGetSkillViewsEventContract_v2021_02_11, {
|
|
9
9
|
GetSkillViewsEventContract as HeartwoodGetSkillViewsEventContract_v2021_02_11,
|
|
10
10
|
} from '#spruce/events/heartwood/getSkillViews.v2021_02_11.contract'
|
|
11
|
+
import heartwoodListViewsEventContract_v2021_02_11, {
|
|
12
|
+
ListViewsEventContract as HeartwoodListViewsEventContract_v2021_02_11,
|
|
13
|
+
} from '#spruce/events/heartwood/listViews.v2021_02_11.contract'
|
|
11
14
|
import heartwoodRegisterSkillViewsEventContract_v2021_02_11, {
|
|
12
15
|
RegisterSkillViewsEventContract as HeartwoodRegisterSkillViewsEventContract_v2021_02_11,
|
|
13
16
|
} from '#spruce/events/heartwood/registerSkillViews.v2021_02_11.contract'
|
|
@@ -16,6 +19,7 @@ export default [
|
|
|
16
19
|
heartwoodDidRegisterSkillViewsEventContract_v2021_02_11,
|
|
17
20
|
heartwoodGenerateUrlEventContract_v2021_02_11,
|
|
18
21
|
heartwoodGetSkillViewsEventContract_v2021_02_11,
|
|
22
|
+
heartwoodListViewsEventContract_v2021_02_11,
|
|
19
23
|
heartwoodRegisterSkillViewsEventContract_v2021_02_11,
|
|
20
24
|
...coreEventContracts,
|
|
21
25
|
]
|
|
@@ -28,6 +32,8 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
|
28
32
|
|
|
29
33
|
'heartwood.get-skill-views::v2021_02_11': HeartwoodGetSkillViewsEventContract_v2021_02_11['eventSignatures']['heartwood.get-skill-views::v2021_02_11']
|
|
30
34
|
|
|
35
|
+
'heartwood.list-views::v2021_02_11': HeartwoodListViewsEventContract_v2021_02_11['eventSignatures']['heartwood.list-views::v2021_02_11']
|
|
36
|
+
|
|
31
37
|
'heartwood.register-skill-views::v2021_02_11': HeartwoodRegisterSkillViewsEventContract_v2021_02_11['eventSignatures']['heartwood.register-skill-views::v2021_02_11']
|
|
32
38
|
}
|
|
33
39
|
}
|
|
@@ -11,16 +11,31 @@ const didRegisterSkillViewsEventContract = buildEventContract({
|
|
|
11
11
|
listenPermissionContract: buildPermissionContract({
|
|
12
12
|
id: 'didRegisterSkillViewsListenPermissions',
|
|
13
13
|
name: 'did register skill views',
|
|
14
|
+
description: null,
|
|
14
15
|
requireAllPermissions: false,
|
|
15
16
|
permissions: [
|
|
16
17
|
{
|
|
17
18
|
id: 'can-listen-to-did-register-skill-views',
|
|
18
19
|
name: 'Know when skill views are registered',
|
|
20
|
+
description: null,
|
|
21
|
+
requireAllStatuses: null,
|
|
19
22
|
defaults: {
|
|
23
|
+
skill: null,
|
|
24
|
+
owner: null,
|
|
25
|
+
groupManager: null,
|
|
26
|
+
manager: null,
|
|
27
|
+
teammate: null,
|
|
28
|
+
anonymous: null,
|
|
20
29
|
loggedIn: {
|
|
21
30
|
default: true,
|
|
31
|
+
clockedIn: null,
|
|
32
|
+
clockedOut: null,
|
|
33
|
+
onPrem: null,
|
|
34
|
+
offPrem: null,
|
|
22
35
|
},
|
|
36
|
+
guest: null,
|
|
23
37
|
},
|
|
38
|
+
can: null,
|
|
24
39
|
},
|
|
25
40
|
],
|
|
26
41
|
}),
|