@sprucelabs/spruce-cli 24.0.0 → 24.1.0

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 (105) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/__tests__/behavioral/conversations/CreatingAConversationTopic.test.js +2 -2
  3. package/build/__tests__/behavioral/conversations/CreatingAConversationTopic.test.js.map +1 -1
  4. package/build/__tests__/behavioral/conversations/RegisteringConversationsOnBoot.test.js +1 -1
  5. package/build/__tests__/behavioral/conversations/RegisteringConversationsOnBoot.test.js.map +1 -1
  6. package/build/__tests__/behavioral/conversations/TestingAConversation.test.js +5 -5
  7. package/build/__tests__/behavioral/conversations/TestingAConversation.test.js.map +1 -1
  8. package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
  9. package/build/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.d.ts +11 -0
  10. package/build/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.js +49 -0
  11. package/build/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.js.map +1 -0
  12. package/build/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.d.ts +5 -0
  13. package/build/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.js +34 -0
  14. package/build/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.js.map +1 -0
  15. package/build/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.d.ts +12 -0
  16. package/build/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.js +88 -0
  17. package/build/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.js.map +1 -0
  18. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.d.ts +13 -0
  19. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.js +109 -0
  20. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.js.map +1 -0
  21. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.d.ts +4 -0
  22. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.js +29 -0
  23. package/build/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.js.map +1 -0
  24. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.d.ts +26 -0
  25. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.js +259 -0
  26. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.js.map +1 -0
  27. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.d.ts +26 -0
  28. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.js +202 -0
  29. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.js.map +1 -0
  30. package/build/__tests__/behavioral/tests/migrationToInstance/support/AbstractInstanceTest.txt +24 -0
  31. package/build/__tests__/behavioral/tests/migrationToInstance/support/AbstractStaticTest.txt +24 -0
  32. package/build/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest.txt +36 -0
  33. package/build/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest2.txt +63 -0
  34. package/build/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest3.txt +222 -0
  35. package/build/__tests__/behavioral/tests/migrationToInstance/support/StaticTest.txt +34 -0
  36. package/build/__tests__/behavioral/tests/migrationToInstance/support/StaticTest2.txt +62 -0
  37. package/build/__tests__/behavioral/tests/migrationToInstance/support/StaticTest3.txt +221 -0
  38. package/build/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.d.ts +2 -0
  39. package/build/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.js +51 -0
  40. package/build/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.js.map +1 -0
  41. package/build/__tests__/behavioral/versions/ResolvingVersions.test.js +0 -3
  42. package/build/__tests__/behavioral/versions/ResolvingVersions.test.js.map +1 -1
  43. package/build/__tests__/implementation/OrganizationStore.test.js +2 -2
  44. package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
  45. package/build/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/AnotherStaticTest.test.ts +33 -0
  46. package/build/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/ShouldBeIgnored.ts +0 -0
  47. package/build/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/StaticTest1.test.ts +33 -0
  48. package/build/__tests__/testDirsAndFiles/static_test_migration_2/src/DoNotInclude.ts +0 -0
  49. package/build/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AStaticTest.test.ts +33 -0
  50. package/build/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AnotherStaticTest1.test.ts +33 -0
  51. package/build/__tests__/testDirsAndFiles/static_test_migration_3/NotAFileThatShouldBeMigrated.ts +0 -0
  52. package/build/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AStaticTest2.test.ts +17 -0
  53. package/build/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AbstractWhateverTest.ts +3 -0
  54. package/build/features/test/actions/CreateAction.d.ts +1 -0
  55. package/build/features/test/actions/CreateAction.js +13 -0
  56. package/build/features/test/actions/CreateAction.js.map +1 -1
  57. package/build/features/test/actions/MigrateAction.d.ts +17 -0
  58. package/build/features/test/actions/MigrateAction.js +39 -0
  59. package/build/features/test/actions/MigrateAction.js.map +1 -0
  60. package/build/tests/staticToInstanceMigration/StaticTestFinder.d.ts +8 -0
  61. package/build/tests/staticToInstanceMigration/StaticTestFinder.js +23 -0
  62. package/build/tests/staticToInstanceMigration/StaticTestFinder.js.map +1 -0
  63. package/build/tests/staticToInstanceMigration/StaticToInstanceMigrator.d.ts +58 -0
  64. package/build/tests/staticToInstanceMigration/StaticToInstanceMigrator.js +48 -0
  65. package/build/tests/staticToInstanceMigration/StaticToInstanceMigrator.js.map +1 -0
  66. package/build/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.d.ts +12 -0
  67. package/build/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.js +138 -0
  68. package/build/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.js.map +1 -0
  69. package/package.json +27 -27
  70. package/src/__tests__/behavioral/conversations/CreatingAConversationTopic.test.ts +2 -2
  71. package/src/__tests__/behavioral/conversations/RegisteringConversationsOnBoot.test.ts +1 -1
  72. package/src/__tests__/behavioral/conversations/TestingAConversation.test.ts +5 -5
  73. package/src/__tests__/behavioral/organization/CreatingAnOrg.test.ts +0 -1
  74. package/src/__tests__/behavioral/tests/migrationToInstance/AbstractInstanceTest.ts +77 -0
  75. package/src/__tests__/behavioral/tests/migrationToInstance/InstanceBasedTesting.test.ts +19 -0
  76. package/src/__tests__/behavioral/tests/migrationToInstance/MigratingTests.test.ts +99 -0
  77. package/src/__tests__/behavioral/tests/migrationToInstance/StaticTestFinder.test.ts +72 -0
  78. package/src/__tests__/behavioral/tests/migrationToInstance/StaticTestsWhenAlreadyExists.test.ts +31 -0
  79. package/src/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.ts +252 -0
  80. package/src/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceTestFileMigrator.test.ts +193 -0
  81. package/src/__tests__/behavioral/tests/migrationToInstance/support/AbstractInstanceTest.txt +24 -0
  82. package/src/__tests__/behavioral/tests/migrationToInstance/support/AbstractStaticTest.txt +24 -0
  83. package/src/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest.txt +36 -0
  84. package/src/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest2.txt +63 -0
  85. package/src/__tests__/behavioral/tests/migrationToInstance/support/InstanceTest3.txt +222 -0
  86. package/src/__tests__/behavioral/tests/migrationToInstance/support/StaticTest.txt +34 -0
  87. package/src/__tests__/behavioral/tests/migrationToInstance/support/StaticTest2.txt +62 -0
  88. package/src/__tests__/behavioral/tests/migrationToInstance/support/StaticTest3.txt +221 -0
  89. package/src/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.ts +50 -0
  90. package/src/__tests__/behavioral/versions/ResolvingVersions.test.ts +1 -3
  91. package/src/__tests__/implementation/OrganizationStore.test.ts +6 -2
  92. package/src/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/AnotherStaticTest.test.ts +33 -0
  93. package/src/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/ShouldBeIgnored.ts +0 -0
  94. package/src/__tests__/testDirsAndFiles/static_test_migration_1/src/__tests__/StaticTest1.test.ts +33 -0
  95. package/src/__tests__/testDirsAndFiles/static_test_migration_2/src/DoNotInclude.ts +0 -0
  96. package/src/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AStaticTest.test.ts +33 -0
  97. package/src/__tests__/testDirsAndFiles/static_test_migration_2/src/__tests__/AnotherStaticTest1.test.ts +33 -0
  98. package/src/__tests__/testDirsAndFiles/static_test_migration_3/NotAFileThatShouldBeMigrated.ts +0 -0
  99. package/src/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AStaticTest2.test.ts +17 -0
  100. package/src/__tests__/testDirsAndFiles/static_test_migration_3/src/__tests__/AbstractWhateverTest.ts +3 -0
  101. package/src/features/test/actions/CreateAction.ts +17 -0
  102. package/src/features/test/actions/MigrateAction.ts +41 -0
  103. package/src/tests/staticToInstanceMigration/StaticTestFinder.ts +25 -0
  104. package/src/tests/staticToInstanceMigration/StaticToInstanceMigrator.ts +73 -0
  105. package/src/tests/staticToInstanceMigration/StaticToInstanceTestFileMigrator.ts +197 -0
@@ -0,0 +1,222 @@
1
+ import {
2
+ activeRecordCardAssert,
3
+ buttonAssert,
4
+ interactor,
5
+ MockActiveRecordCard,
6
+ vcAssert,
7
+ } from '@sprucelabs/heartwood-view-controllers'
8
+ import { eventFaker, fake } from '@sprucelabs/spruce-test-fixtures'
9
+ import { test, suite, generateId, assert } from '@sprucelabs/test-utils'
10
+ import { PublicHomeIntegration } from '../../google.types'
11
+ import RootSkillViewController from '../../skillViewControllers/Root.svc'
12
+ import AddHomeIntegrationCardViewController from '../../viewControllers/AddHomeIntegrationCard.vc'
13
+ import AbstractGoogleTest from '../support/AbstractGoogleTest'
14
+ import { DeleteHomeIntergrationTargetAndPayload } from '../support/EventFaker'
15
+ import SpyAddHomeIntegrationCard from './homeIntegrations/SpyAddHomeIntegrationCard'
16
+
17
+ @fake.login()
18
+ @suite()
19
+ export default class RootSkillViewTest extends AbstractGoogleTest {
20
+ private vc!: SpyRootSkillView
21
+ private fakedIntegrations: PublicHomeIntegration[] = []
22
+ protected names: string[] = []
23
+
24
+ protected async beforeEach(): Promise<void> {
25
+ await super.beforeEach()
26
+
27
+ this.fakedIntegrations = []
28
+ this.names = []
29
+
30
+ this.views.setController(
31
+ 'google.add-home-integration-card',
32
+ SpyAddHomeIntegrationCard
33
+ )
34
+ this.views.setController('active-record-card', MockActiveRecordCard)
35
+ this.views.setController('google.root', SpyRootSkillView)
36
+ this.vc = this.views.Controller('google.root', {}) as SpyRootSkillView
37
+
38
+ await this.eventFaker.fakeListHomeIntegrations(() => {
39
+ return this.fakedIntegrations
40
+ })
41
+
42
+ await this.eventFaker.fakeDeleteHomeIntegration()
43
+ }
44
+
45
+ @test()
46
+ protected async rendersACard() {
47
+ vcAssert.assertSkillViewRendersCard(this.vc, 'home-cloud-integrations')
48
+ }
49
+
50
+ @test()
51
+ protected async cardRendersList() {
52
+ activeRecordCardAssert.skillViewRendersActiveRecordCard(this.vc)
53
+ }
54
+
55
+ @test()
56
+ protected async requiresLogin() {
57
+ await vcAssert.assertLoginIsRequired(this.vc)
58
+ }
59
+
60
+ @test()
61
+ protected async returnsAListOfIntegrations() {
62
+ const integration = this.seedIntegration()
63
+ await this.load()
64
+ this.assertRendersIntegrationRow(integration.id)
65
+ }
66
+
67
+ @test()
68
+ protected async homeIntegrationsCardRendersExpectedButtons() {
69
+ buttonAssert.cardRendersButtons(this.homeIntegrationsCardVc, [
70
+ 'instructions',
71
+ 'add',
72
+ ])
73
+ }
74
+
75
+ @test()
76
+ protected async clickingAddIntegrationRendersDialog() {
77
+ await this.loadClickAddAndAssertRendersDialog()
78
+ }
79
+
80
+ @test()
81
+ protected async callingOnDoneInAddCardHidesDialog() {
82
+ const { addCardVc, dialogVc } =
83
+ await this.loadClickAddAndAssertRendersDialog()
84
+ await addCardVc.simulateClickDone()
85
+
86
+ assert.isFalse(dialogVc.getIsVisible())
87
+ }
88
+
89
+ @test()
90
+ protected async eachRowRendersDeleteButton() {
91
+ const integration = await this.seedOneIntegrationAndLoad()
92
+
93
+ this.homeIntegrationsCardVc.assertRowRendersButton(
94
+ integration.id,
95
+ 'delete'
96
+ )
97
+ }
98
+
99
+ @test()
100
+ protected async clickingDeleteButtonRendersAlert() {
101
+ await this.seedLoadClickDeleteAndAssertConfirm()
102
+ }
103
+
104
+ @test()
105
+ protected async clickingDeleteAndConfirmingRemovesRow() {
106
+ const integration = await this.seedLoadClickDeleteAndConfirm()
107
+ this.homeIntegrationsCardVc.assertDoesNotRenderRow(integration.id)
108
+ }
109
+
110
+ @test()
111
+ protected async doesNotRefreshListIfUserCancels() {
112
+ const int = await this.seedLoadClickDeleteAndDecline()
113
+
114
+ this.assertRendersIntegrationRow(int.id)
115
+ }
116
+
117
+ @test()
118
+ protected async confirmingDeleteShouldEmitDeleteEvent() {
119
+ let passedTarget:
120
+ | DeleteHomeIntergrationTargetAndPayload['target']
121
+ | undefined
122
+
123
+ await this.eventFaker.fakeDeleteHomeIntegration(({ target }) => {
124
+ passedTarget = target
125
+ })
126
+
127
+ const integration = await this.seedLoadClickDeleteAndConfirm()
128
+
129
+ assert.isEqualDeep(passedTarget, {
130
+ integrationId: integration.id,
131
+ })
132
+ }
133
+
134
+ @test()
135
+ protected async doesNotEmitEventIfDeclined() {
136
+ await eventFaker.makeEventThrow(
137
+ 'google.delete-home-integration::v2025_02_08'
138
+ )
139
+
140
+ await this.seedLoadClickDeleteAndDecline()
141
+ }
142
+
143
+ private async loadClickAddAndAssertRendersDialog() {
144
+ await this.load()
145
+ const dialogVc = await vcAssert.assertRendersDialog(this.vc, () =>
146
+ interactor.clickButton(this.homeIntegrationsCardVc, 'add')
147
+ )
148
+
149
+ const addCardVc = vcAssert.assertRendersAsInstanceOf(
150
+ dialogVc,
151
+ AddHomeIntegrationCardViewController
152
+ ) as SpyAddHomeIntegrationCard
153
+ return { dialogVc, addCardVc }
154
+ }
155
+
156
+ private async seedLoadClickDeleteAndConfirm() {
157
+ const { confirmVc, integration } =
158
+ await this.seedLoadClickDeleteAndAssertConfirm()
159
+
160
+ await confirmVc.accept()
161
+
162
+ return integration
163
+ }
164
+
165
+ private async seedLoadClickDeleteAndDecline() {
166
+ const { confirmVc, integration } =
167
+ await this.seedLoadClickDeleteAndAssertConfirm()
168
+
169
+ const int = integration
170
+
171
+ await confirmVc.decline()
172
+ return int
173
+ }
174
+
175
+ private assertRendersIntegrationRow(id: string) {
176
+ this.homeIntegrationsCardVc.assertRendersRow(id)
177
+ }
178
+
179
+ private async seedLoadClickDeleteAndAssertConfirm() {
180
+ const integration = await this.seedOneIntegrationAndLoad()
181
+
182
+ const confirmVc = await vcAssert.assertRendersConfirm(this.vc, () =>
183
+ interactor.clickButtonInRow(this.listVc, integration.id, 'delete')
184
+ )
185
+ return { confirmVc, integration }
186
+ }
187
+
188
+ private get listVc() {
189
+ return this.homeIntegrationsCardVc.getListVc()
190
+ }
191
+
192
+ private async seedOneIntegrationAndLoad() {
193
+ const integration = this.seedIntegration()
194
+ await this.load()
195
+ return integration
196
+ }
197
+
198
+ private seedIntegration() {
199
+ const integration: PublicHomeIntegration = {
200
+ description: generateId(),
201
+ id: generateId(),
202
+ name: generateId(),
203
+ }
204
+
205
+ this.fakedIntegrations.push(integration)
206
+ return integration
207
+ }
208
+
209
+ private async load() {
210
+ await this.views.load(this.vc)
211
+ }
212
+
213
+ private get homeIntegrationsCardVc() {
214
+ return this.vc.getHomeIntegrationsCardVc()
215
+ }
216
+ }
217
+
218
+ class SpyRootSkillView extends RootSkillViewController {
219
+ public getHomeIntegrationsCardVc() {
220
+ return this.activeRecordCardVc as MockActiveRecordCard
221
+ }
222
+ }
@@ -0,0 +1,34 @@
1
+ import { assertOptions } from '@sprucelabs/schema'
2
+ import { fake } from '@sprucelabs/spruce-test-fixtures'
3
+ import AbstractSpruceTest, {
4
+ test,
5
+ assert,
6
+ errorAssert,
7
+ } from '@sprucelabs/test-utils'
8
+
9
+ @fake.login()
10
+ export default class StaticTestFinderTest extends AbstractSpruceTest {
11
+ @test()
12
+ protected static async throwsWithMissing() {
13
+ const finder = StaticTestFinder.Finder()
14
+ const err = await assert.doesThrowAsync(() => finder.find())
15
+ errorAssert.assertError(err, 'MISSING_PARAMETERS', {
16
+ parameters: ['lookupDir'],
17
+ })
18
+ }
19
+
20
+ @test()
21
+ protected static async yourNextTest() {
22
+ assert.isTrue(false)
23
+ }
24
+ }
25
+
26
+ class StaticTestFinder {
27
+ public static Finder() {
28
+ return new this()
29
+ }
30
+
31
+ public async find() {
32
+ assertOptions({}, ['lookupDir'])
33
+ }
34
+ }
@@ -0,0 +1,62 @@
1
+ import { fake, seed } from '@sprucelabs/spruce-test-fixtures'
2
+ import { assert, test } from '@sprucelabs/test-utils'
3
+ import { HomeIntegration, PublicHomeIntegration } from '../../../google.types'
4
+ import AbstractGoogleTest from '../../support/AbstractGoogleTest'
5
+
6
+ @fake.login()
7
+ export default class ListHomeIntegrationsLIstenerTest extends AbstractGoogleTest {
8
+ protected static async beforeEach(): Promise<void> {
9
+ await super.beforeEach()
10
+ await this.bootSkill()
11
+ }
12
+
13
+ protected static async afterEach(): Promise<void> {
14
+ }
15
+
16
+ @test()
17
+ protected static async skillIsListening() {
18
+ await this.emit()
19
+ }
20
+
21
+ @test()
22
+ @seed('homeIntegrations', 1)
23
+ protected static async canReturnFirstHomeIntegration() {
24
+ const expected = await this.getFirstHomeIntegration()
25
+ const integrations = await this.emit()
26
+ assert.isLength(integrations, 1)
27
+ const first = integrations[0]
28
+ this.assertIntegrationEqualsExpected(first, expected)
29
+ }
30
+
31
+ @test()
32
+ @seed('homeIntegrations', 2)
33
+ protected static async canReturnMultipleHomeIntegrations() {
34
+ const expected = await this.homeIntegrations.find(
35
+ {},
36
+ {},
37
+ { shouldIncludePrivateFields: true }
38
+ )
39
+ const integrations = await this.emit()
40
+ assert.isLength(integrations, 2)
41
+ this.assertIntegrationEqualsExpected(integrations[0], expected[0])
42
+ this.assertIntegrationEqualsExpected(integrations[1], expected[1])
43
+ }
44
+
45
+ private static assertIntegrationEqualsExpected(
46
+ first: PublicHomeIntegration,
47
+ expected: HomeIntegration
48
+ ) {
49
+ assert.isEqual(first.id, expected.id)
50
+ assert.isEqual(first.name, expected.name)
51
+ assert.isEqual(first.description, expected.description)
52
+ }
53
+
54
+ private static async emit() {
55
+ const [{ integrations }] =
56
+ await this.fakedClient.emitAndFlattenResponses(
57
+ 'google.list-home-integrations::v2025_02_08'
58
+ )
59
+
60
+ return integrations
61
+ }
62
+ }
@@ -0,0 +1,221 @@
1
+ import {
2
+ activeRecordCardAssert,
3
+ buttonAssert,
4
+ interactor,
5
+ MockActiveRecordCard,
6
+ vcAssert,
7
+ } from '@sprucelabs/heartwood-view-controllers'
8
+ import { eventFaker, fake } from '@sprucelabs/spruce-test-fixtures'
9
+ import { test, generateId, assert } from '@sprucelabs/test-utils'
10
+ import { PublicHomeIntegration } from '../../google.types'
11
+ import RootSkillViewController from '../../skillViewControllers/Root.svc'
12
+ import AddHomeIntegrationCardViewController from '../../viewControllers/AddHomeIntegrationCard.vc'
13
+ import AbstractGoogleTest from '../support/AbstractGoogleTest'
14
+ import { DeleteHomeIntergrationTargetAndPayload } from '../support/EventFaker'
15
+ import SpyAddHomeIntegrationCard from './homeIntegrations/SpyAddHomeIntegrationCard'
16
+
17
+ @fake.login()
18
+ export default class RootSkillViewTest extends AbstractGoogleTest {
19
+ private static vc: SpyRootSkillView
20
+ private static fakedIntegrations: PublicHomeIntegration[] = []
21
+ protected static names: string[] = []
22
+
23
+ protected static async beforeEach(): Promise<void> {
24
+ await super.beforeEach()
25
+
26
+ this.fakedIntegrations = []
27
+ this.names = []
28
+
29
+ this.views.setController(
30
+ 'google.add-home-integration-card',
31
+ SpyAddHomeIntegrationCard
32
+ )
33
+ this.views.setController('active-record-card', MockActiveRecordCard)
34
+ this.views.setController('google.root', SpyRootSkillView)
35
+ this.vc = this.views.Controller('google.root', {}) as SpyRootSkillView
36
+
37
+ await this.eventFaker.fakeListHomeIntegrations(() => {
38
+ return this.fakedIntegrations
39
+ })
40
+
41
+ await this.eventFaker.fakeDeleteHomeIntegration()
42
+ }
43
+
44
+ @test()
45
+ protected static async rendersACard() {
46
+ vcAssert.assertSkillViewRendersCard(this.vc, 'home-cloud-integrations')
47
+ }
48
+
49
+ @test()
50
+ protected static async cardRendersList() {
51
+ activeRecordCardAssert.skillViewRendersActiveRecordCard(this.vc)
52
+ }
53
+
54
+ @test()
55
+ protected static async requiresLogin() {
56
+ await vcAssert.assertLoginIsRequired(this.vc)
57
+ }
58
+
59
+ @test()
60
+ protected static async returnsAListOfIntegrations() {
61
+ const integration = this.seedIntegration()
62
+ await this.load()
63
+ this.assertRendersIntegrationRow(integration.id)
64
+ }
65
+
66
+ @test()
67
+ protected static async homeIntegrationsCardRendersExpectedButtons() {
68
+ buttonAssert.cardRendersButtons(this.homeIntegrationsCardVc, [
69
+ 'instructions',
70
+ 'add',
71
+ ])
72
+ }
73
+
74
+ @test()
75
+ protected static async clickingAddIntegrationRendersDialog() {
76
+ await this.loadClickAddAndAssertRendersDialog()
77
+ }
78
+
79
+ @test()
80
+ protected static async callingOnDoneInAddCardHidesDialog() {
81
+ const { addCardVc, dialogVc } =
82
+ await this.loadClickAddAndAssertRendersDialog()
83
+ await addCardVc.simulateClickDone()
84
+
85
+ assert.isFalse(dialogVc.getIsVisible())
86
+ }
87
+
88
+ @test()
89
+ protected static async eachRowRendersDeleteButton() {
90
+ const integration = await this.seedOneIntegrationAndLoad()
91
+
92
+ this.homeIntegrationsCardVc.assertRowRendersButton(
93
+ integration.id,
94
+ 'delete'
95
+ )
96
+ }
97
+
98
+ @test()
99
+ protected static async clickingDeleteButtonRendersAlert() {
100
+ await this.seedLoadClickDeleteAndAssertConfirm()
101
+ }
102
+
103
+ @test()
104
+ protected static async clickingDeleteAndConfirmingRemovesRow() {
105
+ const integration = await this.seedLoadClickDeleteAndConfirm()
106
+ this.homeIntegrationsCardVc.assertDoesNotRenderRow(integration.id)
107
+ }
108
+
109
+ @test()
110
+ protected static async doesNotRefreshListIfUserCancels() {
111
+ const int = await this.seedLoadClickDeleteAndDecline()
112
+
113
+ this.assertRendersIntegrationRow(int.id)
114
+ }
115
+
116
+ @test()
117
+ protected static async confirmingDeleteShouldEmitDeleteEvent() {
118
+ let passedTarget:
119
+ | DeleteHomeIntergrationTargetAndPayload['target']
120
+ | undefined
121
+
122
+ await this.eventFaker.fakeDeleteHomeIntegration(({ target }) => {
123
+ passedTarget = target
124
+ })
125
+
126
+ const integration = await this.seedLoadClickDeleteAndConfirm()
127
+
128
+ assert.isEqualDeep(passedTarget, {
129
+ integrationId: integration.id,
130
+ })
131
+ }
132
+
133
+ @test()
134
+ protected static async doesNotEmitEventIfDeclined() {
135
+ await eventFaker.makeEventThrow(
136
+ 'google.delete-home-integration::v2025_02_08'
137
+ )
138
+
139
+ await this.seedLoadClickDeleteAndDecline()
140
+ }
141
+
142
+ private static async loadClickAddAndAssertRendersDialog() {
143
+ await this.load()
144
+ const dialogVc = await vcAssert.assertRendersDialog(this.vc, () =>
145
+ interactor.clickButton(this.homeIntegrationsCardVc, 'add')
146
+ )
147
+
148
+ const addCardVc = vcAssert.assertRendersAsInstanceOf(
149
+ dialogVc,
150
+ AddHomeIntegrationCardViewController
151
+ ) as SpyAddHomeIntegrationCard
152
+ return { dialogVc, addCardVc }
153
+ }
154
+
155
+ private static async seedLoadClickDeleteAndConfirm() {
156
+ const { confirmVc, integration } =
157
+ await this.seedLoadClickDeleteAndAssertConfirm()
158
+
159
+ await confirmVc.accept()
160
+
161
+ return integration
162
+ }
163
+
164
+ private static async seedLoadClickDeleteAndDecline() {
165
+ const { confirmVc, integration } =
166
+ await this.seedLoadClickDeleteAndAssertConfirm()
167
+
168
+ const int = integration
169
+
170
+ await confirmVc.decline()
171
+ return int
172
+ }
173
+
174
+ private static assertRendersIntegrationRow(id: string) {
175
+ this.homeIntegrationsCardVc.assertRendersRow(id)
176
+ }
177
+
178
+ private static async seedLoadClickDeleteAndAssertConfirm() {
179
+ const integration = await this.seedOneIntegrationAndLoad()
180
+
181
+ const confirmVc = await vcAssert.assertRendersConfirm(this.vc, () =>
182
+ interactor.clickButtonInRow(this.listVc, integration.id, 'delete')
183
+ )
184
+ return { confirmVc, integration }
185
+ }
186
+
187
+ private static get listVc() {
188
+ return this.homeIntegrationsCardVc.getListVc()
189
+ }
190
+
191
+ private static async seedOneIntegrationAndLoad() {
192
+ const integration = this.seedIntegration()
193
+ await this.load()
194
+ return integration
195
+ }
196
+
197
+ private static seedIntegration() {
198
+ const integration: PublicHomeIntegration = {
199
+ description: generateId(),
200
+ id: generateId(),
201
+ name: generateId(),
202
+ }
203
+
204
+ this.fakedIntegrations.push(integration)
205
+ return integration
206
+ }
207
+
208
+ private static async load() {
209
+ await this.views.load(this.vc)
210
+ }
211
+
212
+ private static get homeIntegrationsCardVc() {
213
+ return this.vc.getHomeIntegrationsCardVc()
214
+ }
215
+ }
216
+
217
+ class SpyRootSkillView extends RootSkillViewController {
218
+ public getHomeIntegrationsCardVc() {
219
+ return this.activeRecordCardVc as MockActiveRecordCard
220
+ }
221
+ }
@@ -0,0 +1,2 @@
1
+ export declare function generateExpectedInstanceTestContents(name: string): string;
2
+ export declare function generateExpectedStaticTestContents(name: string): string;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateExpectedInstanceTestContents = generateExpectedInstanceTestContents;
4
+ exports.generateExpectedStaticTestContents = generateExpectedStaticTestContents;
5
+ const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
6
+ function generateExpectedInstanceTestContents(name) {
7
+ const pascal = spruce_skill_utils_1.namesUtil.toPascal(name);
8
+ const camel = spruce_skill_utils_1.namesUtil.toCamel(name);
9
+ return `import { fake } from '@sprucelabs/spruce-test-fixtures'
10
+ import AbstractSpruceTest, { test, suite, assert } from '@sprucelabs/test-utils'
11
+
12
+ @fake.login()
13
+ @suite()
14
+ export default class ${pascal}Test extends AbstractSpruceTest {
15
+ @test()
16
+ protected async canCreate${pascal}() {
17
+ const ${camel} = new ${pascal}()
18
+ assert.isTruthy(${camel})
19
+ }
20
+
21
+ @test()
22
+ protected async yourNextTest() {
23
+ assert.isTrue(false)
24
+ }
25
+ }
26
+
27
+ class ${pascal} {}`;
28
+ }
29
+ function generateExpectedStaticTestContents(name) {
30
+ const pascal = spruce_skill_utils_1.namesUtil.toPascal(name);
31
+ const camel = spruce_skill_utils_1.namesUtil.toCamel(name);
32
+ return `import { fake } from '@sprucelabs/spruce-test-fixtures'
33
+ import AbstractSpruceTest, { test, assert } from '@sprucelabs/test-utils'
34
+
35
+ @fake.login()
36
+ export default class ${pascal}Test extends AbstractSpruceTest {
37
+ @test()
38
+ protected static async canCreate${pascal}() {
39
+ const ${camel} = new ${pascal}()
40
+ assert.isTruthy(${camel})
41
+ }
42
+
43
+ @test()
44
+ protected static async yourNextTest() {
45
+ assert.isTrue(false)
46
+ }
47
+ }
48
+
49
+ class ${pascal} {}`;
50
+ }
51
+ //# sourceMappingURL=testFileContentsGenerators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testFileContentsGenerators.js","sourceRoot":"","sources":["../../../../../src/__tests__/behavioral/tests/migrationToInstance/testFileContentsGenerators.ts"],"names":[],"mappings":";;AAEA,oFAuBC;AAED,gFAsBC;AAjDD,uEAA0D;AAE1D,SAAgB,oCAAoC,CAAC,IAAY;IAC7D,MAAM,MAAM,GAAG,8BAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACvC,MAAM,KAAK,GAAG,8BAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAErC,OAAO;;;;;uBAKY,MAAM;;4BAED,MAAM;UACxB,KAAK,UAAU,MAAM;oBACX,KAAK;;;;;;;;;QASjB,MAAM,KAAK,CAAA;AACnB,CAAC;AAED,SAAgB,kCAAkC,CAAC,IAAY;IAC3D,MAAM,MAAM,GAAG,8BAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACvC,MAAM,KAAK,GAAG,8BAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAErC,OAAO;;;;uBAIY,MAAM;;mCAEM,MAAM;UAC/B,KAAK,UAAU,MAAM;oBACX,KAAK;;;;;;;;;QASjB,MAAM,KAAK,CAAA;AACnB,CAAC"}
@@ -42,16 +42,13 @@ class ResolvingVersionsTest extends AbstractSkillTest_1.default {
42
42
  this.assertSavedVersionEquals(version);
43
43
  }
44
44
  static async addsVersionFromPackageJsonWhenChoosingDifferentVersion() {
45
- debugger;
46
45
  await this.resolveAndAssertChoices([
47
46
  this.newVersionChoice,
48
47
  this.buildVersionChoice('v2023_09_16'),
49
48
  ]);
50
49
  }
51
50
  static async doesNotAddVersionToChoicesIfDirMatchesVersion() {
52
- debugger;
53
51
  this.createVersionDir('v2023_09_16');
54
- debugger;
55
52
  await this.resolveAndAssertChoices([
56
53
  this.newVersionChoice,
57
54
  this.buildVersionChoice('v2023_09_16'),
@@ -1 +1 @@
1
- {"version":3,"file":"ResolvingVersions.test.js","sourceRoot":"","sources":["../../../../src/__tests__/behavioral/versions/ResolvingVersions.test.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,uEAIuC;AACvC,uDAAkE;AAClE,wFAA+D;AAC/D,yFAAgE;AAEhE,MAAqB,qBAAsB,SAAQ,2BAAiB;IACtD,MAAM,CAAC,aAAa,GAAG,QAAQ,CAAA;IACjC,MAAM,CAAC,GAAG,CAAY;IACtB,MAAM,CAAC,QAAQ,CAAiB;IAE9B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;8DAIN;AAGsB;IADtB,IAAA,iBAAI,GAAE;uFAIN;AAGsB;IADtB,IAAA,iBAAI,GAAE;yFAON;AAGsB;IADtB,IAAA,iBAAI,GAAE;gFASN;AAGsB;IADtB,IAAA,iBAAI,GAAE;qFAYN;AAGsB;IADtB,IAAA,iBAAI,GAAE;gFASN"}
1
+ {"version":3,"file":"ResolvingVersions.test.js","sourceRoot":"","sources":["../../../../src/__tests__/behavioral/versions/ResolvingVersions.test.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,uEAIuC;AACvC,uDAAkE;AAClE,wFAA+D;AAC/D,yFAAgE;AAEhE,MAAqB,qBAAsB,SAAQ,2BAAiB;IACtD,MAAM,CAAC,aAAa,GAAG,QAAQ,CAAA;IACjC,MAAM,CAAC,GAAG,CAAY;IACtB,MAAM,CAAC,QAAQ,CAAiB;IAE9B,MAAM,CAAC,KAAK,CAAC,UAAU;QAC7B,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;QACxB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAC9B,IAAI,CAAC,QAAQ,GAAG,yBAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/D,CAAC;IAES,MAAM,CAAC,KAAK,CAAC,SAAS;QAC5B,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAA;QACf,MAAM,KAAK,CAAC,SAAS,EAAE,CAAA;IAC3B,CAAC;IAGsB,AAAb,MAAM,CAAC,KAAK,CAAC,yBAAyB;QAC5C,YAAY;QACZ,MAAM,GAAG,GAAG,mBAAM,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,yBAAe,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC9D,wBAAW,CAAC,WAAW,CAAC,GAAG,EAAE,oBAAoB,EAAE;YAC/C,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;SAC5B,CAAC,CAAA;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,CAAA;IAClB,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,mBAAmC;QACnE,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CACrC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EACvB,mBAAmB,CACtB,CAAA;IACL,CAAC;IAEO,MAAM,CAAC,wBAAwB,CAAC,OAAe;QACnD,mBAAM,CAAC,OAAO,CACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,EAClC,OAAO,EACP,qEAAqE,CACxE,CAAA;IACL,CAAC;;AApIL,wCAqIC;AApH0B;IADtB,IAAA,iBAAI,GAAE;4DAON;AAGsB;IADtB,IAAA,iBAAI,GAAE;8DAIN;AAGsB;IADtB,IAAA,iBAAI,GAAE;uFAIN;AAGsB;IADtB,IAAA,iBAAI,GAAE;yFAMN;AAGsB;IADtB,IAAA,iBAAI,GAAE;gFAQN;AAGsB;IADtB,IAAA,iBAAI,GAAE;qFAYN;AAGsB;IADtB,IAAA,iBAAI,GAAE;gFASN"}
@@ -72,12 +72,12 @@ __decorate([
72
72
  (0, test_utils_1.test)()
73
73
  ], OrganizationStoreTest, "skillIsNotInstalledByDefault", null);
74
74
  __decorate([
75
- (0, test_utils_1.test)()
75
+ test_utils_1.test.skip('conflicting with "InstallingASkillAtAnOrg which is deleting orgs')
76
76
  ], OrganizationStoreTest, "canDeleteOrg", null);
77
77
  __decorate([
78
78
  (0, test_utils_1.test)()
79
79
  ], OrganizationStoreTest, "installSkill", null);
80
80
  __decorate([
81
- (0, test_utils_1.test)()
81
+ test_utils_1.test.skip('is conflicting with "InstallingASkillAtAnOrg" which is deleting orgs')
82
82
  ], OrganizationStoreTest, "canGetMyOrgs", null);
83
83
  //# sourceMappingURL=OrganizationStore.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrganizationStore.test.js","sourceRoot":"","sources":["../../../src/__tests__/implementation/OrganizationStore.test.ts"],"names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AE,YAAY;SACrB,CAAC,CAAA;QAEF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,oBAAoB,EAAE,CAAA;QACpE,mBAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QAC9B,mBAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC9B,mBAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAClC,CAAC;CACJ;AAtFD,wCAsFC;AApF0B;IADtB,IAAA,iBAAI,GAAE;iDAGN;AAGsB;IADtB,IAAA,iBAAI,GAAE;+DAiBN;AAGsB;IADtB,IAAA,iBAAI,GAAE;+CAiBN;AAGsB;IADtB,IAAA,iBAAI,GAAE;+CAqBN;AAGsB;IADtB,IAAA,iBAAI,GAAE;+CAkBN"}
1
+ {"version":3,"file":"OrganizationStore.test.js","sourceRoot":"","sources":["../../../src/__tests__/implementation/OrganizationStore.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uDAAqD;AACrD,kFAAyD;AAEzD,MAAqB,qBAAsB,SAAQ,yBAAe;IAEvC,AAAb,MAAM,CAAC,KAAK,CAAC,cAAc;QACjC,mBAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAA;IAC/C,CAAC;IAGsB,AAAb,MAAM,CAAC,KAAK,CAAC,4BAA4B;QAC/C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAA;QAElE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC,WAAW,CAAC;YACxD,IAAI,EAAE,YAAY;SACrB,CAAC,CAAA;QAEF,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC,oBAAoB,CAAC;YAC5D,IAAI,EAAE,aAAa;SACtB,CAAC,CAAA;QAEF,MA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