@sprucelabs/spruce-conversation-plugin 62.2.24 → 62.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/package.json +17 -17
  2. package/build/__tests__/behavioral/CheckingHealth.test.d.ts +0 -10
  3. package/build/__tests__/behavioral/CheckingHealth.test.js +0 -87
  4. package/build/__tests__/behavioral/KillingASkill.test.d.ts +0 -4
  5. package/build/__tests__/behavioral/KillingASkill.test.js +0 -29
  6. package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.d.ts +0 -13
  7. package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +0 -147
  8. package/build/__tests__/behavioral/RespondingToMessages.test.d.ts +0 -13
  9. package/build/__tests__/behavioral/RespondingToMessages.test.js +0 -134
  10. package/build/__tests__/behavioral/TestingAConversation.test.d.ts +0 -14
  11. package/build/__tests__/behavioral/TestingAConversation.test.js +0 -110
  12. package/build/__tests__/implementation/ConversationCoordinator.test.d.ts +0 -18
  13. package/build/__tests__/implementation/ConversationCoordinator.test.js +0 -185
  14. package/build/__tests__/implementation/MessageGraphicsInterface/EmailField.test.d.ts +0 -7
  15. package/build/__tests__/implementation/MessageGraphicsInterface/EmailField.test.js +0 -73
  16. package/build/__tests__/implementation/MessageGraphicsInterface/MessageGraphicsInterface.test.d.ts +0 -4
  17. package/build/__tests__/implementation/MessageGraphicsInterface/MessageGraphicsInterface.test.js +0 -42
  18. package/build/__tests__/implementation/MessageGraphicsInterface/MockMessageBeforeAndAfterEach.test.d.ts +0 -5
  19. package/build/__tests__/implementation/MessageGraphicsInterface/MockMessageBeforeAndAfterEach.test.js +0 -62
  20. package/build/__tests__/implementation/MessageGraphicsInterface/MockMessageInterface.test.d.ts +0 -18
  21. package/build/__tests__/implementation/MessageGraphicsInterface/MockMessageInterface.test.js +0 -168
  22. package/build/__tests__/implementation/MessageGraphicsInterface/SelectField.test.d.ts +0 -7
  23. package/build/__tests__/implementation/MessageGraphicsInterface/SelectField.test.js +0 -71
  24. package/build/__tests__/implementation/MessageGraphicsInterface/TextField.test.d.ts +0 -6
  25. package/build/__tests__/implementation/MessageGraphicsInterface/TextField.test.js +0 -48
  26. package/build/__tests__/implementation/ScriptTester.test.d.ts +0 -19
  27. package/build/__tests__/implementation/ScriptTester.test.js +0 -461
  28. package/build/__tests__/implementation/SuggesterUtil.test.d.ts +0 -7
  29. package/build/__tests__/implementation/SuggesterUtil.test.js +0 -63
  30. package/build/__tests__/implementation/TopicLoader.test.d.ts +0 -8
  31. package/build/__tests__/implementation/TopicLoader.test.js +0 -66
  32. package/build/__tests__/implementation/TopicScriptPlayer.test.d.ts +0 -23
  33. package/build/__tests__/implementation/TopicScriptPlayer.test.js +0 -436
  34. package/build/__tests__/implementation/TopicSuggester.test.d.ts +0 -8
  35. package/build/__tests__/implementation/TopicSuggester.test.js +0 -137
  36. package/build/__tests__/testDirsAndFiles/bad-empty/conversations/bookAppointment.topic.d.ts +0 -0
  37. package/build/__tests__/testDirsAndFiles/bad-empty/conversations/bookAppointment.topic.js +0 -1
  38. package/build/__tests__/testDirsAndFiles/bad-missing-params/conversations/bookAppointment.topic.d.ts +0 -2
  39. package/build/__tests__/testDirsAndFiles/bad-missing-params/conversations/bookAppointment.topic.js +0 -4
  40. package/build/__tests__/testDirsAndFiles/bad-skill/build/.spruce/events/listeners.d.ts +0 -2
  41. package/build/__tests__/testDirsAndFiles/bad-skill/build/.spruce/events/listeners.js +0 -3
  42. package/build/__tests__/testDirsAndFiles/bad-skill/build/conversations/bookAppointment.topic.d.ts +0 -2
  43. package/build/__tests__/testDirsAndFiles/bad-skill/build/conversations/bookAppointment.topic.js +0 -4
  44. package/build/__tests__/testDirsAndFiles/empty-skill/build/.spruce/events/listeners.d.ts +0 -2
  45. package/build/__tests__/testDirsAndFiles/empty-skill/build/.spruce/events/listeners.js +0 -3
  46. package/build/__tests__/testDirsAndFiles/good/conversations/bookAppointment.topic.d.ts +0 -3
  47. package/build/__tests__/testDirsAndFiles/good/conversations/bookAppointment.topic.js +0 -8
  48. package/build/__tests__/testDirsAndFiles/good/conversations/cancelAppointment.topic.d.ts +0 -3
  49. package/build/__tests__/testDirsAndFiles/good/conversations/cancelAppointment.topic.js +0 -12
  50. package/build/__tests__/testDirsAndFiles/skill/build/.spruce/events/listeners.d.ts +0 -2
  51. package/build/__tests__/testDirsAndFiles/skill/build/.spruce/events/listeners.js +0 -3
  52. package/build/__tests__/testDirsAndFiles/skill/build/conversations/bookAppointment.topic.d.ts +0 -3
  53. package/build/__tests__/testDirsAndFiles/skill/build/conversations/bookAppointment.topic.js +0 -8
  54. package/build/__tests__/testDirsAndFiles/skill/build/conversations/cancelAppointment.topic.d.ts +0 -3
  55. package/build/__tests__/testDirsAndFiles/skill/build/conversations/cancelAppointment.topic.js +0 -12
  56. package/build/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColor.topic.d.ts +0 -3
  57. package/build/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColor.topic.js +0 -21
  58. package/build/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColorTopicChanger.topic.d.ts +0 -3
  59. package/build/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColorTopicChanger.topic.js +0 -21
  60. package/build/__tests__/testDirsAndFiles/skill/build/conversations/mixedStringsAndCallbacks.topic.d.ts +0 -3
  61. package/build/__tests__/testDirsAndFiles/skill/build/conversations/mixedStringsAndCallbacks.topic.js +0 -29
  62. package/build/__tests__/testDirsAndFiles/skill-assertions/build/.spruce/events/listeners.d.ts +0 -2
  63. package/build/__tests__/testDirsAndFiles/skill-assertions/build/.spruce/events/listeners.js +0 -3
  64. package/build/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptCallbackOptions.topic.d.ts +0 -3
  65. package/build/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptCallbackOptions.topic.js +0 -22
  66. package/build/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptOnlyCalledOnce.topic.d.ts +0 -3
  67. package/build/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptOnlyCalledOnce.topic.js +0 -14
  68. package/build/__tests__/testDirsAndFiles/skill-with-one-topic/build/.spruce/events/listeners.d.ts +0 -2
  69. package/build/__tests__/testDirsAndFiles/skill-with-one-topic/build/.spruce/events/listeners.js +0 -3
  70. package/build/__tests__/testDirsAndFiles/skill-with-one-topic/build/conversations/bookAppointment.topic.d.ts +0 -3
  71. package/build/__tests__/testDirsAndFiles/skill-with-one-topic/build/conversations/bookAppointment.topic.js +0 -8
  72. package/build/__tests__/testDirsAndFiles/skill-with-script-that-throws/build/.spruce/events/listeners.d.ts +0 -2
  73. package/build/__tests__/testDirsAndFiles/skill-with-script-that-throws/build/.spruce/events/listeners.js +0 -3
  74. package/build/__tests__/testDirsAndFiles/skill-with-script-that-throws/build/conversations/cancelAppointment.topic.d.ts +0 -3
  75. package/build/__tests__/testDirsAndFiles/skill-with-script-that-throws/build/conversations/cancelAppointment.topic.js +0 -16
  76. package/build/esm/__tests__/behavioral/CheckingHealth.test.d.ts +0 -10
  77. package/build/esm/__tests__/behavioral/CheckingHealth.test.js +0 -104
  78. package/build/esm/__tests__/behavioral/KillingASkill.test.d.ts +0 -4
  79. package/build/esm/__tests__/behavioral/KillingASkill.test.js +0 -34
  80. package/build/esm/__tests__/behavioral/RegisteringConversationsOnBoot.test.d.ts +0 -13
  81. package/build/esm/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +0 -171
  82. package/build/esm/__tests__/behavioral/RespondingToMessages.test.d.ts +0 -13
  83. package/build/esm/__tests__/behavioral/RespondingToMessages.test.js +0 -158
  84. package/build/esm/__tests__/behavioral/TestingAConversation.test.d.ts +0 -14
  85. package/build/esm/__tests__/behavioral/TestingAConversation.test.js +0 -137
  86. package/build/esm/__tests__/implementation/ConversationCoordinator.test.d.ts +0 -18
  87. package/build/esm/__tests__/implementation/ConversationCoordinator.test.js +0 -214
  88. package/build/esm/__tests__/implementation/MessageGraphicsInterface/EmailField.test.d.ts +0 -7
  89. package/build/esm/__tests__/implementation/MessageGraphicsInterface/EmailField.test.js +0 -84
  90. package/build/esm/__tests__/implementation/MessageGraphicsInterface/MessageGraphicsInterface.test.d.ts +0 -4
  91. package/build/esm/__tests__/implementation/MessageGraphicsInterface/MessageGraphicsInterface.test.js +0 -47
  92. package/build/esm/__tests__/implementation/MessageGraphicsInterface/MockMessageBeforeAndAfterEach.test.d.ts +0 -5
  93. package/build/esm/__tests__/implementation/MessageGraphicsInterface/MockMessageBeforeAndAfterEach.test.js +0 -47
  94. package/build/esm/__tests__/implementation/MessageGraphicsInterface/MockMessageInterface.test.d.ts +0 -18
  95. package/build/esm/__tests__/implementation/MessageGraphicsInterface/MockMessageInterface.test.js +0 -172
  96. package/build/esm/__tests__/implementation/MessageGraphicsInterface/SelectField.test.d.ts +0 -7
  97. package/build/esm/__tests__/implementation/MessageGraphicsInterface/SelectField.test.js +0 -80
  98. package/build/esm/__tests__/implementation/MessageGraphicsInterface/TextField.test.d.ts +0 -6
  99. package/build/esm/__tests__/implementation/MessageGraphicsInterface/TextField.test.js +0 -57
  100. package/build/esm/__tests__/implementation/ScriptTester.test.d.ts +0 -19
  101. package/build/esm/__tests__/implementation/ScriptTester.test.js +0 -470
  102. package/build/esm/__tests__/implementation/SuggesterUtil.test.d.ts +0 -7
  103. package/build/esm/__tests__/implementation/SuggesterUtil.test.js +0 -74
  104. package/build/esm/__tests__/implementation/TopicLoader.test.d.ts +0 -8
  105. package/build/esm/__tests__/implementation/TopicLoader.test.js +0 -79
  106. package/build/esm/__tests__/implementation/TopicScriptPlayer.test.d.ts +0 -23
  107. package/build/esm/__tests__/implementation/TopicScriptPlayer.test.js +0 -477
  108. package/build/esm/__tests__/implementation/TopicSuggester.test.d.ts +0 -8
  109. package/build/esm/__tests__/implementation/TopicSuggester.test.js +0 -130
  110. package/build/esm/__tests__/testDirsAndFiles/bad-empty/conversations/bookAppointment.topic.d.ts +0 -0
  111. package/build/esm/__tests__/testDirsAndFiles/bad-empty/conversations/bookAppointment.topic.js +0 -1
  112. package/build/esm/__tests__/testDirsAndFiles/bad-missing-params/conversations/bookAppointment.topic.d.ts +0 -2
  113. package/build/esm/__tests__/testDirsAndFiles/bad-missing-params/conversations/bookAppointment.topic.js +0 -2
  114. package/build/esm/__tests__/testDirsAndFiles/bad-skill/build/conversations/bookAppointment.topic.d.ts +0 -2
  115. package/build/esm/__tests__/testDirsAndFiles/bad-skill/build/conversations/bookAppointment.topic.js +0 -2
  116. package/build/esm/__tests__/testDirsAndFiles/good/conversations/bookAppointment.topic.d.ts +0 -3
  117. package/build/esm/__tests__/testDirsAndFiles/good/conversations/bookAppointment.topic.js +0 -6
  118. package/build/esm/__tests__/testDirsAndFiles/good/conversations/cancelAppointment.topic.d.ts +0 -3
  119. package/build/esm/__tests__/testDirsAndFiles/good/conversations/cancelAppointment.topic.js +0 -10
  120. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/bookAppointment.topic.d.ts +0 -3
  121. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/bookAppointment.topic.js +0 -6
  122. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/cancelAppointment.topic.d.ts +0 -3
  123. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/cancelAppointment.topic.js +0 -10
  124. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColor.topic.d.ts +0 -3
  125. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColor.topic.js +0 -28
  126. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColorTopicChanger.topic.d.ts +0 -3
  127. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/favoriteColorTopicChanger.topic.js +0 -28
  128. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/mixedStringsAndCallbacks.topic.d.ts +0 -3
  129. package/build/esm/__tests__/testDirsAndFiles/skill/build/conversations/mixedStringsAndCallbacks.topic.js +0 -36
  130. package/build/esm/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptCallbackOptions.topic.d.ts +0 -3
  131. package/build/esm/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptCallbackOptions.topic.js +0 -29
  132. package/build/esm/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptOnlyCalledOnce.topic.d.ts +0 -3
  133. package/build/esm/__tests__/testDirsAndFiles/skill-assertions/build/conversations/assertsScriptOnlyCalledOnce.topic.js +0 -21
  134. package/build/esm/__tests__/testDirsAndFiles/skill-with-one-topic/build/conversations/bookAppointment.topic.d.ts +0 -3
  135. package/build/esm/__tests__/testDirsAndFiles/skill-with-one-topic/build/conversations/bookAppointment.topic.js +0 -6
  136. package/build/esm/__tests__/testDirsAndFiles/skill-with-script-that-throws/build/conversations/cancelAppointment.topic.d.ts +0 -3
  137. package/build/esm/__tests__/testDirsAndFiles/skill-with-script-that-throws/build/conversations/cancelAppointment.topic.js +0 -14
@@ -1,185 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const spruce_test_fixtures_1 = require("@sprucelabs/spruce-test-fixtures");
13
- const test_utils_1 = require("@sprucelabs/test-utils");
14
- const test_utils_2 = require("@sprucelabs/test-utils");
15
- const ConversationCoordinator_1 = require("../../conversations/ConversationCoordinator");
16
- const AbstractConversationTest_1 = __importDefault(require("../../tests/AbstractConversationTest"));
17
- class TopicCoordinatorTest extends AbstractConversationTest_1.default {
18
- static async beforeEach() {
19
- await super.beforeEach();
20
- this.sentMessages = [];
21
- this.coordinator = (await ConversationCoordinator_1.ConversationCoordinator.Coordinator({
22
- lineDelay: 0,
23
- sendMessageHandler: async (message) => {
24
- this.sentMessages.push(message);
25
- },
26
- topicLookupPath: this.resolveTestPath('skill', 'build'),
27
- getContext: () => this.skillContext,
28
- Class: SpyCoordinator,
29
- }));
30
- }
31
- static async canCreateTopicCoordinator() {
32
- test_utils_1.assert.isTruthy(this.coordinator);
33
- }
34
- static async hasHandleMessage() {
35
- test_utils_1.assert.isFunction(this.coordinator.handleMessage);
36
- }
37
- static async handledMessageMustHaveASource() {
38
- const err = await test_utils_1.assert.doesThrowAsync(() => this.coordinator.handleMessage(this.buildMessage({ body: 'waka waka' })));
39
- test_utils_2.errorAssert.assertError(err, 'MISSING_PARAMETERS', {
40
- parameters: ['source.personId'],
41
- });
42
- }
43
- static async respondsWithSuggestedTopicsToFirstMessage() {
44
- const results = await this.coordinator.handleMessage(this.buildMessage({
45
- body: 'help me book!',
46
- source: { personId: '1234' },
47
- }));
48
- test_utils_1.assert.isArray(results.suggestedTopics);
49
- test_utils_1.assert.isLength(results.suggestedTopics, 3);
50
- }
51
- static async handlesNoSkillWithTopics() {
52
- const coordinator = await ConversationCoordinator_1.ConversationCoordinator.Coordinator({
53
- topicLookupPath: this.cwd,
54
- sendMessageHandler: async () => { },
55
- getContext: () => this.skillContext,
56
- });
57
- const results = await coordinator.handleMessage(this.buildMessage({
58
- body: 'help me book!',
59
- source: { personId: '1234' },
60
- }));
61
- test_utils_1.assert.isArray(results.suggestedTopics);
62
- test_utils_1.assert.isLength(results.suggestedTopics, 0);
63
- }
64
- static async throwsWhenSentBadTopic() {
65
- const err = await test_utils_1.assert.doesThrowAsync(() => this.coordinator.handleMessage(this.buildMessage({ body: '1', source: { personId: '1234' } }), 'aoeu'));
66
- test_utils_2.errorAssert.assertError(err, 'TOPIC_NOT_FOUND', {
67
- suppliedTopic: 'aoeu',
68
- validTopics: [
69
- 'bookAppointment',
70
- 'cancelAppointment',
71
- 'favoriteColor',
72
- 'favoriteColorTopicChanger',
73
- 'mixedStringsAndCallbacks',
74
- ],
75
- });
76
- }
77
- static async playsScriptWhenTopicIsSelected() {
78
- await this.coordinator.handleMessage(this.buildMessage({ body: '1', source: { personId: '1234' } }), 'bookAppointment');
79
- test_utils_1.assert.isLength(this.sentMessages, 2);
80
- test_utils_1.assert.isEqual(this.sentMessages[0].body, 'Sweet, lets book!');
81
- }
82
- static async canHandlePromptsInScript() {
83
- var _a;
84
- void this.coordinator.handleMessage(this.buildMessage({ body: '1', source: { personId: '1234' } }), 'favoriteColor');
85
- await this.wait(10);
86
- test_utils_1.assert.isLength(this.sentMessages, 1);
87
- test_utils_1.assert.isEqual(this.sentMessages[0].body, 'what is your favorite color?');
88
- void this.coordinator.handleMessage(this.buildMessage({ body: 'blue', source: { personId: '1234' } }), 'favoriteColor');
89
- await this.wait(10);
90
- test_utils_1.assert.isLength(this.sentMessages, 2);
91
- test_utils_1.assert.isEqual(this.sentMessages[this.sentMessages.length - 1].body, 'blue');
92
- void this.coordinator.handleMessage(this.buildMessage({ body: 'blue', source: { personId: '1234' } }), 'bookAppointment');
93
- await this.wait(10);
94
- test_utils_1.assert.isLength(this.sentMessages, 4);
95
- test_utils_1.assert.isEqual((_a = this.sentMessages.pop()) === null || _a === void 0 ? void 0 : _a.body, 'Lemme find your appointment!');
96
- }
97
- static async canPlaceMixedScriptsUntilTheEndAndStartsOver() {
98
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
99
- await this.coordinator.handleMessage(this.buildMessage({ body: '1', source: { personId: '1234' } }), 'mixedStringsAndCallbacks');
100
- await this.wait(10);
101
- test_utils_1.assert.isLength(this.sentMessages, 2);
102
- test_utils_1.assert.isEqual((_a = this.sentMessages[0]) === null || _a === void 0 ? void 0 : _a.body, 'string 1');
103
- test_utils_1.assert.isEqual((_b = this.sentMessages[1]) === null || _b === void 0 ? void 0 : _b.body, 'prompt 1');
104
- this.sentMessages = [];
105
- await this.coordinator.handleMessage(this.buildMessage({
106
- body: 'answer 1',
107
- source: { personId: '1234' },
108
- }), 'mixedStringsAndCallbacks');
109
- await this.wait(100);
110
- test_utils_1.assert.isLength(this.sentMessages, 3);
111
- test_utils_1.assert.isEqual((_c = this.sentMessages[0]) === null || _c === void 0 ? void 0 : _c.body, 'answer 1');
112
- test_utils_1.assert.isEqual((_d = this.sentMessages[1]) === null || _d === void 0 ? void 0 : _d.body, 'string 2');
113
- test_utils_1.assert.isEqual((_e = this.sentMessages[2]) === null || _e === void 0 ? void 0 : _e.body, 'prompt 2');
114
- this.sentMessages = [];
115
- await this.coordinator.handleMessage(this.buildMessage({
116
- body: 'answer 2',
117
- source: { personId: '1234' },
118
- }), 'mixedStringsAndCallbacks');
119
- test_utils_1.assert.isLength(this.sentMessages, 2);
120
- test_utils_1.assert.isEqual((_f = this.sentMessages[0]) === null || _f === void 0 ? void 0 : _f.body, 'answer 2');
121
- test_utils_1.assert.isEqual((_g = this.sentMessages[1]) === null || _g === void 0 ? void 0 : _g.body, 'and done');
122
- this.sentMessages = [];
123
- await this.coordinator.handleMessage(this.buildMessage({
124
- body: 'answer 1',
125
- source: { personId: '1234' },
126
- }), 'mixedStringsAndCallbacks');
127
- await this.wait(100);
128
- test_utils_1.assert.isLength(this.sentMessages, 2);
129
- test_utils_1.assert.isEqual((_h = this.sentMessages[0]) === null || _h === void 0 ? void 0 : _h.body, 'string 1');
130
- test_utils_1.assert.isEqual((_j = this.sentMessages[1]) === null || _j === void 0 ? void 0 : _j.body, 'prompt 1');
131
- }
132
- static async passesThroughContextGetter(context) {
133
- await this.coordinator.handleMessage(this.buildMessage({
134
- body: 'answer 2',
135
- source: { personId: '1234' },
136
- }), 'bookAppointment');
137
- this.skillContext = context;
138
- const player = this.coordinator.getPlayer();
139
- test_utils_1.assert.isTruthy(player);
140
- //@ts-ignore
141
- const actual = player.getContext();
142
- test_utils_1.assert.isEqualDeep(actual, this.skillContext);
143
- }
144
- }
145
- TopicCoordinatorTest.sentMessages = [];
146
- TopicCoordinatorTest.skillContext = {
147
- client: spruce_test_fixtures_1.fake.getClient(),
148
- };
149
- exports.default = TopicCoordinatorTest;
150
- __decorate([
151
- (0, test_utils_1.test)()
152
- ], TopicCoordinatorTest, "canCreateTopicCoordinator", null);
153
- __decorate([
154
- (0, test_utils_1.test)()
155
- ], TopicCoordinatorTest, "hasHandleMessage", null);
156
- __decorate([
157
- (0, test_utils_1.test)()
158
- ], TopicCoordinatorTest, "handledMessageMustHaveASource", null);
159
- __decorate([
160
- (0, test_utils_1.test)()
161
- ], TopicCoordinatorTest, "respondsWithSuggestedTopicsToFirstMessage", null);
162
- __decorate([
163
- (0, test_utils_1.test)()
164
- ], TopicCoordinatorTest, "handlesNoSkillWithTopics", null);
165
- __decorate([
166
- (0, test_utils_1.test)()
167
- ], TopicCoordinatorTest, "throwsWhenSentBadTopic", null);
168
- __decorate([
169
- (0, test_utils_1.test)()
170
- ], TopicCoordinatorTest, "playsScriptWhenTopicIsSelected", null);
171
- __decorate([
172
- (0, test_utils_1.test)()
173
- ], TopicCoordinatorTest, "canHandlePromptsInScript", null);
174
- __decorate([
175
- (0, test_utils_1.test)()
176
- ], TopicCoordinatorTest, "canPlaceMixedScriptsUntilTheEndAndStartsOver", null);
177
- __decorate([
178
- (0, test_utils_1.test)('can passthrough context 1', { hello: 'world' }),
179
- (0, test_utils_1.test)('can passthrough context 2', { go: 'team' })
180
- ], TopicCoordinatorTest, "passesThroughContextGetter", null);
181
- class SpyCoordinator extends ConversationCoordinator_1.ConversationCoordinator {
182
- getPlayer() {
183
- return this.player;
184
- }
185
- }
@@ -1,7 +0,0 @@
1
- import AbstractGraphicsInterfaceTest from '../../../tests/AbstractGraphicsInterfaceTest';
2
- export default class TextFieldTest extends AbstractGraphicsInterfaceTest {
3
- protected static promptSendsLabel(): Promise<void>;
4
- protected static noPromptSendsNoMessage(): Promise<void>;
5
- protected static respondingWithBadEmailGivesYouAnotherChance(): Promise<void>;
6
- protected static respondingWithBadEmail2TimesErrors(): Promise<void>;
7
- }
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_utils_1 = require("@sprucelabs/test-utils");
13
- const EmailFieldHandler_1 = __importDefault(require("../../../interfaces/fieldHandlers/EmailFieldHandler"));
14
- const AbstractGraphicsInterfaceTest_1 = __importDefault(require("../../../tests/AbstractGraphicsInterfaceTest"));
15
- class TextFieldTest extends AbstractGraphicsInterfaceTest_1.default {
16
- static async promptSendsLabel() {
17
- void this.ui.prompt({
18
- type: 'email',
19
- label: 'Tell me about your life.',
20
- });
21
- test_utils_1.assert.doesInclude(this.sentMessages, {
22
- body: 'Tell me about your life.',
23
- });
24
- }
25
- static async noPromptSendsNoMessage() {
26
- void this.ui.prompt({
27
- type: 'email',
28
- });
29
- test_utils_1.assert.isLength(this.sentMessages, 0);
30
- }
31
- static async respondingWithBadEmailGivesYouAnotherChance() {
32
- EmailFieldHandler_1.default.repairs = ['repair', 'repair'];
33
- let wasHit = false;
34
- void this.ui
35
- .prompt({
36
- type: 'email',
37
- label: 'What is your email?',
38
- })
39
- .then(() => {
40
- wasHit = true;
41
- });
42
- test_utils_1.assert.isLength(this.sentMessages, 1);
43
- test_utils_1.assert.doesInclude(this.sentMessages, { body: 'What is your email?' });
44
- await this.sendMessage('aoeuaoeu');
45
- test_utils_1.assert.isLength(this.sentMessages, 2);
46
- test_utils_1.assert.doesInclude(this.sentMessages, { body: 'repair' });
47
- test_utils_1.assert.isFalse(wasHit);
48
- }
49
- static async respondingWithBadEmail2TimesErrors() {
50
- const promise = this.ui.prompt({
51
- type: 'email',
52
- label: 'What is your email?',
53
- });
54
- test_utils_1.assert.isLength(this.sentMessages, 1);
55
- test_utils_1.assert.doesInclude(this.sentMessages, { body: 'What is your email?' });
56
- await this.sendMessage('aoeuaoeu');
57
- await this.sendMessage('aoeuaoeu');
58
- await test_utils_1.assert.doesThrowAsync(() => promise);
59
- }
60
- }
61
- exports.default = TextFieldTest;
62
- __decorate([
63
- (0, test_utils_1.test)()
64
- ], TextFieldTest, "promptSendsLabel", null);
65
- __decorate([
66
- (0, test_utils_1.test)()
67
- ], TextFieldTest, "noPromptSendsNoMessage", null);
68
- __decorate([
69
- (0, test_utils_1.test)()
70
- ], TextFieldTest, "respondingWithBadEmailGivesYouAnotherChance", null);
71
- __decorate([
72
- (0, test_utils_1.test)()
73
- ], TextFieldTest, "respondingWithBadEmail2TimesErrors", null);
@@ -1,4 +0,0 @@
1
- import AbstractGraphicsInterfaceTest from '../../../tests/AbstractGraphicsInterfaceTest';
2
- export default class MessageGraphicsInterfaceTest extends AbstractGraphicsInterfaceTest {
3
- protected static selectAsksAgainWithBadResponse(): Promise<void>;
4
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_utils_1 = require("@sprucelabs/test-utils");
13
- const test_utils_2 = require("@sprucelabs/test-utils");
14
- const AbstractGraphicsInterfaceTest_1 = __importDefault(require("../../../tests/AbstractGraphicsInterfaceTest"));
15
- class MessageGraphicsInterfaceTest extends AbstractGraphicsInterfaceTest_1.default {
16
- static async selectAsksAgainWithBadResponse() {
17
- const promise = this.ui.prompt({
18
- type: 'select',
19
- label: 'What would you like to do?',
20
- isRequired: true,
21
- options: {
22
- choices: [
23
- {
24
- label: 'Book appointment',
25
- value: 'bookAppointment',
26
- },
27
- {
28
- label: 'Cancel appointment',
29
- value: 'cancelAppointment',
30
- },
31
- ],
32
- },
33
- });
34
- await this.sendMessage('get me out of here!');
35
- const err = await test_utils_1.assert.doesThrowAsync(async () => await promise);
36
- test_utils_2.errorAssert.assertError(err, 'ABORT');
37
- }
38
- }
39
- exports.default = MessageGraphicsInterfaceTest;
40
- __decorate([
41
- (0, test_utils_1.test)()
42
- ], MessageGraphicsInterfaceTest, "selectAsksAgainWithBadResponse", null);
@@ -1,5 +0,0 @@
1
- import AbstractSpruceTest from '@sprucelabs/test-utils';
2
- export default class SpyMessageBeforeAndAfterEachTest extends AbstractSpruceTest {
3
- protected static throwsIfInstantiatingTwoWithoutCallingAfterEach(): Promise<void>;
4
- protected static throwsIfDanglingPrompt(): Promise<void>;
5
- }
@@ -1,62 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- var __importDefault = (this && this.__importDefault) || function (mod) {
32
- return (mod && mod.__esModule) ? mod : { "default": mod };
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- const spruce_test_fixtures_1 = require("@sprucelabs/spruce-test-fixtures");
36
- const test_utils_1 = __importStar(require("@sprucelabs/test-utils"));
37
- const MockMessageInterface_1 = __importDefault(require("../../../interfaces/MockMessageInterface"));
38
- let SpyMessageBeforeAndAfterEachTest = class SpyMessageBeforeAndAfterEachTest extends test_utils_1.default {
39
- static async throwsIfInstantiatingTwoWithoutCallingAfterEach() {
40
- MockMessageInterface_1.default.Ui();
41
- test_utils_1.assert.doesThrow(() => MockMessageInterface_1.default.Ui());
42
- MockMessageInterface_1.default.afterEach();
43
- MockMessageInterface_1.default.Ui();
44
- }
45
- static async throwsIfDanglingPrompt() {
46
- MockMessageInterface_1.default.afterEach();
47
- const ui = MockMessageInterface_1.default.Ui();
48
- void ui.prompt({ type: 'number' });
49
- ui.renderLine('Hey there!');
50
- test_utils_1.assert.doesThrow(() => MockMessageInterface_1.default.afterEach());
51
- }
52
- };
53
- __decorate([
54
- (0, test_utils_1.test)()
55
- ], SpyMessageBeforeAndAfterEachTest, "throwsIfInstantiatingTwoWithoutCallingAfterEach", null);
56
- __decorate([
57
- (0, test_utils_1.test)()
58
- ], SpyMessageBeforeAndAfterEachTest, "throwsIfDanglingPrompt", null);
59
- SpyMessageBeforeAndAfterEachTest = __decorate([
60
- spruce_test_fixtures_1.fake.login()
61
- ], SpyMessageBeforeAndAfterEachTest);
62
- exports.default = SpyMessageBeforeAndAfterEachTest;
@@ -1,18 +0,0 @@
1
- import AbstractSpruceTest from '@sprucelabs/test-utils';
2
- export default class SpyMessageInterfaceTest extends AbstractSpruceTest {
3
- private static ui;
4
- protected static beforeEach(): Promise<void>;
5
- protected static afterEach(): Promise<void>;
6
- protected static knowsIfDidntPromp(): Promise<void>;
7
- protected static holdsUntilPromptIsAnswered(): Promise<void>;
8
- protected static tracksPrompts(): Promise<void>;
9
- protected static throwsIfRenderedAfterPrompt(): Promise<void>;
10
- protected static canAssertSelectChoices(): Promise<void>;
11
- protected static canAssertDifferentSelectChoices(): Promise<void>;
12
- protected static canAssertIfRequired(): Promise<void>;
13
- private static assertPromptedWithChoices;
14
- private static promptWithChoices;
15
- private static resetUi;
16
- private static prompt;
17
- private static assertNotJustPromptedFor;
18
- }
@@ -1,168 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- var __importDefault = (this && this.__importDefault) || function (mod) {
32
- return (mod && mod.__esModule) ? mod : { "default": mod };
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- const test_utils_1 = __importStar(require("@sprucelabs/test-utils"));
36
- const MockMessageInterface_1 = __importDefault(require("../../../interfaces/MockMessageInterface"));
37
- class SpyMessageInterfaceTest extends test_utils_1.default {
38
- static async beforeEach() {
39
- await super.beforeEach();
40
- this.ui = MockMessageInterface_1.default.Ui();
41
- }
42
- static async afterEach() {
43
- await super.afterEach();
44
- MockMessageInterface_1.default.afterEach();
45
- }
46
- static async knowsIfDidntPromp() {
47
- this.assertNotJustPromptedFor('number');
48
- }
49
- static async holdsUntilPromptIsAnswered() {
50
- const promise = this.prompt({ type: 'text' });
51
- const expected = (0, test_utils_1.generateId)();
52
- this.ui.answerPrompt(expected);
53
- const answer = await promise;
54
- test_utils_1.assert.isEqual(answer, expected);
55
- }
56
- static async tracksPrompts() {
57
- void this.prompt({
58
- type: 'number',
59
- isRequired: true,
60
- });
61
- this.ui.assertJustPromptedFor('number');
62
- this.assertNotJustPromptedFor('text');
63
- this.resetUi();
64
- }
65
- static async throwsIfRenderedAfterPrompt() {
66
- void this.prompt({
67
- type: 'number',
68
- isRequired: true,
69
- });
70
- this.ui.renderLine('go dogs go!');
71
- this.assertNotJustPromptedFor('number');
72
- this.resetUi();
73
- }
74
- static async canAssertSelectChoices() {
75
- this.promptWithChoices([
76
- {
77
- label: 'Hey',
78
- value: 'hello',
79
- },
80
- ]);
81
- test_utils_1.assert.doesThrow(() => this.assertPromptedWithChoices([
82
- {
83
- value: 'what the!?',
84
- },
85
- ]));
86
- this.assertPromptedWithChoices([
87
- {
88
- value: 'hello',
89
- },
90
- ]);
91
- this.resetUi();
92
- }
93
- static async canAssertDifferentSelectChoices() {
94
- const value = (0, test_utils_1.generateId)();
95
- this.promptWithChoices([
96
- {
97
- value,
98
- label: 'What theee!!!!??',
99
- },
100
- { value: 'hello', label: 'Hello!' },
101
- ]);
102
- this.assertPromptedWithChoices([
103
- {
104
- value,
105
- },
106
- {
107
- value: 'hello',
108
- },
109
- ]);
110
- this.resetUi();
111
- }
112
- static async canAssertIfRequired() {
113
- void this.prompt({
114
- type: 'number',
115
- options: {
116
- min: 0,
117
- max: 100,
118
- },
119
- });
120
- test_utils_1.assert.doesThrow(() => this.ui.assertJustPromptedFor('number', { min: 10, max: 20 }));
121
- this.ui.assertJustPromptedFor('number', { min: 0, max: 100 });
122
- this.resetUi();
123
- }
124
- static assertPromptedWithChoices(expected) {
125
- return this.ui.assertJustPromptedFor('select', {
126
- choices: expected,
127
- });
128
- }
129
- static promptWithChoices(choices) {
130
- void this.prompt({
131
- type: 'select',
132
- options: {
133
- choices,
134
- },
135
- });
136
- }
137
- static resetUi() {
138
- this.ui.reset();
139
- }
140
- static prompt(definition) {
141
- return this.ui.prompt(definition);
142
- }
143
- static assertNotJustPromptedFor(type) {
144
- test_utils_1.assert.doesThrow(() => this.ui.assertJustPromptedFor(type));
145
- }
146
- }
147
- exports.default = SpyMessageInterfaceTest;
148
- __decorate([
149
- (0, test_utils_1.test)()
150
- ], SpyMessageInterfaceTest, "knowsIfDidntPromp", null);
151
- __decorate([
152
- (0, test_utils_1.test)()
153
- ], SpyMessageInterfaceTest, "holdsUntilPromptIsAnswered", null);
154
- __decorate([
155
- (0, test_utils_1.test)()
156
- ], SpyMessageInterfaceTest, "tracksPrompts", null);
157
- __decorate([
158
- (0, test_utils_1.test)()
159
- ], SpyMessageInterfaceTest, "throwsIfRenderedAfterPrompt", null);
160
- __decorate([
161
- (0, test_utils_1.test)()
162
- ], SpyMessageInterfaceTest, "canAssertSelectChoices", null);
163
- __decorate([
164
- (0, test_utils_1.test)()
165
- ], SpyMessageInterfaceTest, "canAssertDifferentSelectChoices", null);
166
- __decorate([
167
- (0, test_utils_1.test)()
168
- ], SpyMessageInterfaceTest, "canAssertIfRequired", null);
@@ -1,7 +0,0 @@
1
- import AbstractGraphicsInterfaceTest from '../../../tests/AbstractGraphicsInterfaceTest';
2
- export default class MessageGraphicsInterfaceTest extends AbstractGraphicsInterfaceTest {
3
- protected static respondingWithNumberSelectsOptions(): Promise<void>;
4
- protected static respondingWithBadNumberAsksYouToSelectAgain(): Promise<void>;
5
- protected static respondingWithCloseMatchSelectsChoice(): Promise<void>;
6
- private static renderAppointmentSelect;
7
- }
@@ -1,71 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_utils_1 = require("@sprucelabs/test-utils");
13
- const AbstractGraphicsInterfaceTest_1 = __importDefault(require("../../../tests/AbstractGraphicsInterfaceTest"));
14
- class MessageGraphicsInterfaceTest extends AbstractGraphicsInterfaceTest_1.default {
15
- static async respondingWithNumberSelectsOptions() {
16
- const promise = this.renderAppointmentSelect();
17
- await this.sendMessage('1');
18
- const results = await promise;
19
- test_utils_1.assert.isEqual(results, 'bookAppointment');
20
- }
21
- static async respondingWithBadNumberAsksYouToSelectAgain() {
22
- void this.renderAppointmentSelect();
23
- await this.sendMessage('5');
24
- await this.sendMessage('5');
25
- test_utils_1.assert.doesInclude(this.sentMessages, { body: 'invalid-value-repair' });
26
- test_utils_1.assert.doesInclude(this.sentMessages, { body: 'invalid-value-repair2' });
27
- const last = this.sentMessages.pop();
28
- test_utils_1.assert.isTruthy(last === null || last === void 0 ? void 0 : last.choices);
29
- }
30
- static async respondingWithCloseMatchSelectsChoice() {
31
- const promise = this.renderAppointmentSelect();
32
- await this.sendMessage('book please');
33
- const selection = await promise;
34
- test_utils_1.assert.isEqual(selection, 'bookAppointment');
35
- }
36
- static renderAppointmentSelect() {
37
- const choices = [
38
- {
39
- label: 'Book appointment',
40
- value: 'bookAppointment',
41
- },
42
- {
43
- label: 'Cancel appointment',
44
- value: 'cancelAppointment',
45
- },
46
- ];
47
- const response = this.ui.prompt({
48
- type: 'select',
49
- label: 'What would you like to do?',
50
- isRequired: true,
51
- options: {
52
- choices,
53
- },
54
- });
55
- test_utils_1.assert.doesInclude(this.sentMessages, {
56
- body: 'What would you like to do?',
57
- choices,
58
- });
59
- return response;
60
- }
61
- }
62
- exports.default = MessageGraphicsInterfaceTest;
63
- __decorate([
64
- (0, test_utils_1.test)()
65
- ], MessageGraphicsInterfaceTest, "respondingWithNumberSelectsOptions", null);
66
- __decorate([
67
- (0, test_utils_1.test)()
68
- ], MessageGraphicsInterfaceTest, "respondingWithBadNumberAsksYouToSelectAgain", null);
69
- __decorate([
70
- (0, test_utils_1.test)()
71
- ], MessageGraphicsInterfaceTest, "respondingWithCloseMatchSelectsChoice", null);
@@ -1,6 +0,0 @@
1
- import AbstractGraphicsInterfaceTest from '../../../tests/AbstractGraphicsInterfaceTest';
2
- export default class TextFieldTest extends AbstractGraphicsInterfaceTest {
3
- protected static promptSendsLabel(): Promise<void>;
4
- protected static noPromptSendsNoMessage(): Promise<void>;
5
- protected static canRespondToPrompt(): Promise<void>;
6
- }