@auto-engineer/server-generator-apollo-emmett 0.13.0 → 0.13.1
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/src/codegen/extract/commands.d.ts +7 -14
- package/dist/src/codegen/extract/commands.d.ts.map +1 -1
- package/dist/src/codegen/extract/commands.js.map +1 -1
- package/dist/src/codegen/extract/data-sink.d.ts +1 -1
- package/dist/src/codegen/extract/data-sink.d.ts.map +1 -1
- package/dist/src/codegen/extract/data-sink.js +9 -31
- package/dist/src/codegen/extract/data-sink.js.map +1 -1
- package/dist/src/codegen/extract/events.d.ts +4 -8
- package/dist/src/codegen/extract/events.d.ts.map +1 -1
- package/dist/src/codegen/extract/events.js.map +1 -1
- package/dist/src/codegen/extract/gwt.d.ts +2 -2
- package/dist/src/codegen/extract/gwt.d.ts.map +1 -1
- package/dist/src/codegen/extract/gwt.js +6 -21
- package/dist/src/codegen/extract/gwt.js.map +1 -1
- package/dist/src/codegen/extract/messages.d.ts +4 -4
- package/dist/src/codegen/extract/messages.d.ts.map +1 -1
- package/dist/src/codegen/extract/messages.js +24 -47
- package/dist/src/codegen/extract/messages.js.map +1 -1
- package/dist/src/codegen/extract/query.d.ts +5 -7
- package/dist/src/codegen/extract/query.d.ts.map +1 -1
- package/dist/src/codegen/extract/query.js +10 -8
- package/dist/src/codegen/extract/query.js.map +1 -1
- package/dist/src/codegen/extract/slice-normalizer.d.ts +29 -0
- package/dist/src/codegen/extract/slice-normalizer.d.ts.map +1 -0
- package/dist/src/codegen/extract/slice-normalizer.js +48 -0
- package/dist/src/codegen/extract/slice-normalizer.js.map +1 -0
- package/dist/src/codegen/extract/step-converter.d.ts +17 -0
- package/dist/src/codegen/extract/step-converter.d.ts.map +1 -0
- package/dist/src/codegen/extract/step-converter.js +82 -0
- package/dist/src/codegen/extract/step-converter.js.map +1 -0
- package/dist/src/codegen/extract/step-types.d.ts +30 -0
- package/dist/src/codegen/extract/step-types.d.ts.map +1 -0
- package/dist/src/codegen/extract/step-types.js +16 -0
- package/dist/src/codegen/extract/step-types.js.map +1 -0
- package/dist/src/codegen/scaffoldFromSchema.d.ts.map +1 -1
- package/dist/src/codegen/scaffoldFromSchema.js +7 -29
- package/dist/src/codegen/scaffoldFromSchema.js.map +1 -1
- package/dist/src/codegen/templates/command/commands.specs.ts +33 -28
- package/dist/src/codegen/templates/command/decide.specs.specs.ts +153 -138
- package/dist/src/codegen/templates/command/decide.specs.ts +169 -146
- package/dist/src/codegen/templates/command/events.specs.ts +43 -38
- package/dist/src/codegen/templates/command/evolve.specs.ts +38 -33
- package/dist/src/codegen/templates/command/handle.specs.ts +71 -61
- package/dist/src/codegen/templates/command/mutation.resolver.specs.ts +122 -102
- package/dist/src/codegen/templates/command/register.specs.ts +39 -34
- package/dist/src/codegen/templates/command/state.specs.ts +39 -34
- package/dist/src/codegen/templates/query/projection.specs.specs.ts +399 -359
- package/dist/src/codegen/templates/query/projection.specs.ts +242 -216
- package/dist/src/codegen/templates/query/projection.specs.ts.ejs +38 -12
- package/dist/src/codegen/templates/query/query.resolver.specs.ts +59 -51
- package/dist/src/codegen/templates/query/state.specs.ts +1 -1
- package/dist/src/codegen/templates/react/react.specs.specs.ts +93 -85
- package/dist/src/codegen/templates/react/react.specs.ts +135 -122
- package/dist/src/codegen/templates/react/register.specs.ts +135 -122
- package/dist/src/codegen/test-data/specVariant1.d.ts.map +1 -1
- package/dist/src/codegen/test-data/specVariant1.js +101 -90
- package/dist/src/codegen/test-data/specVariant1.js.map +1 -1
- package/dist/src/codegen/types.d.ts +5 -7
- package/dist/src/codegen/types.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/codegen/extract/commands.ts +7 -8
- package/src/codegen/extract/data-sink.ts +16 -43
- package/src/codegen/extract/events.ts +4 -5
- package/src/codegen/extract/gwt.ts +12 -29
- package/src/codegen/extract/messages.ts +43 -70
- package/src/codegen/extract/query.ts +14 -12
- package/src/codegen/extract/slice-normalizer.ts +88 -0
- package/src/codegen/extract/step-converter.ts +124 -0
- package/src/codegen/extract/step-types.ts +52 -0
- package/src/codegen/scaffoldFromSchema.ts +8 -45
- package/src/codegen/templates/command/commands.specs.ts +33 -28
- package/src/codegen/templates/command/decide.specs.specs.ts +153 -138
- package/src/codegen/templates/command/decide.specs.ts +169 -146
- package/src/codegen/templates/command/events.specs.ts +43 -38
- package/src/codegen/templates/command/evolve.specs.ts +38 -33
- package/src/codegen/templates/command/handle.specs.ts +71 -61
- package/src/codegen/templates/command/mutation.resolver.specs.ts +122 -102
- package/src/codegen/templates/command/register.specs.ts +39 -34
- package/src/codegen/templates/command/state.specs.ts +39 -34
- package/src/codegen/templates/query/projection.specs.specs.ts +399 -359
- package/src/codegen/templates/query/projection.specs.ts +242 -216
- package/src/codegen/templates/query/projection.specs.ts.ejs +38 -12
- package/src/codegen/templates/query/query.resolver.specs.ts +59 -51
- package/src/codegen/templates/query/state.specs.ts +1 -1
- package/src/codegen/templates/react/react.specs.specs.ts +93 -85
- package/src/codegen/templates/react/react.specs.ts +135 -122
- package/src/codegen/templates/react/register.specs.ts +135 -122
- package/src/codegen/test-data/specVariant1.ts +101 -90
- package/src/codegen/types.ts +6 -4
|
@@ -17,56 +17,63 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
17
17
|
client: { specs: [] },
|
|
18
18
|
server: {
|
|
19
19
|
description: '',
|
|
20
|
-
specs:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
specs: [
|
|
21
|
+
{
|
|
22
|
+
type: 'gherkin',
|
|
23
|
+
feature: 'CreateListing command',
|
|
24
|
+
rules: [
|
|
25
|
+
{
|
|
26
|
+
name: 'Should handle listing operations',
|
|
27
|
+
examples: [
|
|
28
|
+
{
|
|
29
|
+
name: 'User creates listing successfully',
|
|
30
|
+
steps: [
|
|
31
|
+
{
|
|
32
|
+
keyword: 'When',
|
|
33
|
+
text: 'CreateListing',
|
|
34
|
+
docString: {
|
|
35
|
+
propertyId: 'listing_123',
|
|
36
|
+
title: 'Sea View Flat',
|
|
37
|
+
pricePerNight: 120,
|
|
38
|
+
location: 'Brighton',
|
|
39
|
+
maxGuests: 4,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
keyword: 'Then',
|
|
44
|
+
text: 'ListingCreated',
|
|
45
|
+
docString: {
|
|
46
|
+
propertyId: 'listing_123',
|
|
47
|
+
title: 'Sea View Flat',
|
|
48
|
+
pricePerNight: 120,
|
|
49
|
+
location: 'Brighton',
|
|
50
|
+
maxGuests: 4,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
37
54
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
{
|
|
56
|
+
name: 'User removes listing successfully',
|
|
57
|
+
steps: [
|
|
58
|
+
{
|
|
59
|
+
keyword: 'When',
|
|
60
|
+
text: 'RemoveListing',
|
|
61
|
+
docString: {
|
|
62
|
+
propertyId: 'listing_123',
|
|
63
|
+
},
|
|
47
64
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
commandRef: 'RemoveListing',
|
|
55
|
-
exampleData: {
|
|
56
|
-
propertyId: 'listing_123',
|
|
57
|
-
},
|
|
65
|
+
{
|
|
66
|
+
keyword: 'Then',
|
|
67
|
+
text: 'ListingRemoved',
|
|
68
|
+
docString: {},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
58
71
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
],
|
|
70
77
|
},
|
|
71
78
|
},
|
|
72
79
|
{
|
|
@@ -89,43 +96,46 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
89
96
|
},
|
|
90
97
|
},
|
|
91
98
|
],
|
|
92
|
-
specs:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
specs: [
|
|
100
|
+
{
|
|
101
|
+
type: 'gherkin',
|
|
102
|
+
feature: 'Search listings query',
|
|
103
|
+
rules: [
|
|
104
|
+
{
|
|
105
|
+
name: 'Should project listings correctly',
|
|
106
|
+
examples: [
|
|
107
|
+
{
|
|
108
|
+
name: 'Listing created shows in search results',
|
|
109
|
+
steps: [
|
|
110
|
+
{
|
|
111
|
+
keyword: 'When',
|
|
112
|
+
text: 'ListingCreated',
|
|
113
|
+
docString: {
|
|
114
|
+
propertyId: 'listing_123',
|
|
115
|
+
title: 'Sea View Flat',
|
|
116
|
+
pricePerNight: 120,
|
|
117
|
+
location: 'Brighton',
|
|
118
|
+
maxGuests: 4,
|
|
119
|
+
},
|
|
109
120
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
maxGuests: 4,
|
|
121
|
+
{
|
|
122
|
+
keyword: 'Then',
|
|
123
|
+
text: 'AvailableListings',
|
|
124
|
+
docString: {
|
|
125
|
+
propertyId: 'listing_123',
|
|
126
|
+
title: 'Sea View Flat',
|
|
127
|
+
pricePerNight: 120,
|
|
128
|
+
location: 'Brighton',
|
|
129
|
+
maxGuests: 4,
|
|
130
|
+
},
|
|
121
131
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
129
139
|
},
|
|
130
140
|
},
|
|
131
141
|
],
|
|
@@ -264,60 +274,62 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
264
274
|
},
|
|
265
275
|
},
|
|
266
276
|
],
|
|
267
|
-
specs:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
277
|
+
specs: [
|
|
278
|
+
{
|
|
279
|
+
type: 'gherkin',
|
|
280
|
+
feature: '',
|
|
281
|
+
rules: [
|
|
282
|
+
{
|
|
283
|
+
name: 'questionnaires show current progress',
|
|
284
|
+
examples: [
|
|
285
|
+
{
|
|
286
|
+
name: 'a question has already been answered',
|
|
287
|
+
steps: [
|
|
288
|
+
{
|
|
289
|
+
keyword: 'Given',
|
|
290
|
+
text: 'QuestionnaireLinkSent',
|
|
291
|
+
docString: {
|
|
292
|
+
questionnaireId: 'q-001',
|
|
293
|
+
participantId: 'participant-abc',
|
|
294
|
+
link: 'https://app.example.com/q/q-001?participant=participant-abc',
|
|
295
|
+
sentAt: '2030-01-01T09:00:00.000Z',
|
|
296
|
+
},
|
|
283
297
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
savedAt: '2030-01-01T09:05:00.000Z',
|
|
298
|
+
{
|
|
299
|
+
keyword: 'When',
|
|
300
|
+
text: 'QuestionAnswered',
|
|
301
|
+
docString: {
|
|
302
|
+
questionnaireId: 'q-001',
|
|
303
|
+
participantId: 'participant-abc',
|
|
304
|
+
questionId: 'q1',
|
|
305
|
+
answer: 'Yes',
|
|
306
|
+
savedAt: '2030-01-01T09:05:00.000Z',
|
|
307
|
+
},
|
|
295
308
|
},
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
],
|
|
309
|
+
{
|
|
310
|
+
keyword: 'Then',
|
|
311
|
+
text: 'QuestionnaireProgress',
|
|
312
|
+
docString: {
|
|
313
|
+
questionnaireId: 'q-001',
|
|
314
|
+
participantId: 'participant-abc',
|
|
315
|
+
status: 'in_progress',
|
|
316
|
+
currentQuestionId: 'q2',
|
|
317
|
+
remainingQuestions: ['q2', 'q3'],
|
|
318
|
+
answers: [
|
|
319
|
+
{
|
|
320
|
+
questionId: 'q1',
|
|
321
|
+
value: 'Yes',
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
},
|
|
313
325
|
},
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
326
|
+
],
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
],
|
|
321
333
|
},
|
|
322
334
|
},
|
|
323
335
|
],
|
|
@@ -390,37 +402,42 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
390
402
|
client: { specs: [] },
|
|
391
403
|
server: {
|
|
392
404
|
description: '',
|
|
393
|
-
specs:
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
exampleData: {
|
|
412
|
-
questionnaireId: 'q-001',
|
|
413
|
-
participantId: 'participant-abc',
|
|
414
|
-
link: 'https://app.example.com/q/q-001?participant=participant-abc',
|
|
415
|
-
sentAt: new Date('2030-01-01T09:00:00Z'),
|
|
405
|
+
specs: [
|
|
406
|
+
{
|
|
407
|
+
type: 'gherkin',
|
|
408
|
+
feature: 'Sends questionnaire link',
|
|
409
|
+
rules: [
|
|
410
|
+
{
|
|
411
|
+
name: 'sends questionnaire link to participant',
|
|
412
|
+
examples: [
|
|
413
|
+
{
|
|
414
|
+
name: 'sends link successfully',
|
|
415
|
+
steps: [
|
|
416
|
+
{
|
|
417
|
+
keyword: 'When',
|
|
418
|
+
text: 'SendQuestionnaireLink',
|
|
419
|
+
docString: {
|
|
420
|
+
questionnaireId: 'q-001',
|
|
421
|
+
participantId: 'participant-abc',
|
|
422
|
+
},
|
|
416
423
|
},
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
+
{
|
|
425
|
+
keyword: 'Then',
|
|
426
|
+
text: 'QuestionnaireLinkSent',
|
|
427
|
+
docString: {
|
|
428
|
+
questionnaireId: 'q-001',
|
|
429
|
+
participantId: 'participant-abc',
|
|
430
|
+
link: 'https://app.example.com/q/q-001?participant=participant-abc',
|
|
431
|
+
sentAt: new Date('2030-01-01T09:00:00Z'),
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
},
|
|
436
|
+
],
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
},
|
|
440
|
+
],
|
|
424
441
|
},
|
|
425
442
|
},
|
|
426
443
|
{
|
|
@@ -429,40 +446,45 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
429
446
|
client: { specs: [] },
|
|
430
447
|
server: {
|
|
431
448
|
description: '',
|
|
432
|
-
specs:
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
exampleData: {
|
|
453
|
-
questionnaireId: 'q-001',
|
|
454
|
-
participantId: 'participant-abc',
|
|
455
|
-
questionId: 'q1',
|
|
456
|
-
answer: 'Yes',
|
|
457
|
-
savedAt: new Date('2030-01-01T09:05:00Z'),
|
|
449
|
+
specs: [
|
|
450
|
+
{
|
|
451
|
+
type: 'gherkin',
|
|
452
|
+
feature: 'Submits questionnaire answer',
|
|
453
|
+
rules: [
|
|
454
|
+
{
|
|
455
|
+
name: 'submits answer successfully',
|
|
456
|
+
examples: [
|
|
457
|
+
{
|
|
458
|
+
name: 'answers question',
|
|
459
|
+
steps: [
|
|
460
|
+
{
|
|
461
|
+
keyword: 'When',
|
|
462
|
+
text: 'AnswerQuestion',
|
|
463
|
+
docString: {
|
|
464
|
+
questionnaireId: 'q-001',
|
|
465
|
+
participantId: 'participant-abc',
|
|
466
|
+
questionId: 'q1',
|
|
467
|
+
answer: 'Yes',
|
|
468
|
+
},
|
|
458
469
|
},
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
470
|
+
{
|
|
471
|
+
keyword: 'Then',
|
|
472
|
+
text: 'QuestionAnswered',
|
|
473
|
+
docString: {
|
|
474
|
+
questionnaireId: 'q-001',
|
|
475
|
+
participantId: 'participant-abc',
|
|
476
|
+
questionId: 'q1',
|
|
477
|
+
answer: 'Yes',
|
|
478
|
+
savedAt: new Date('2030-01-01T09:05:00Z'),
|
|
479
|
+
},
|
|
480
|
+
},
|
|
481
|
+
],
|
|
482
|
+
},
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
],
|
|
486
|
+
},
|
|
487
|
+
],
|
|
466
488
|
},
|
|
467
489
|
},
|
|
468
490
|
{
|
|
@@ -471,55 +493,57 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
471
493
|
client: { specs: [] },
|
|
472
494
|
server: {
|
|
473
495
|
description: '',
|
|
474
|
-
specs:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
496
|
+
specs: [
|
|
497
|
+
{
|
|
498
|
+
type: 'gherkin',
|
|
499
|
+
feature: 'Views the questionnaire',
|
|
500
|
+
rules: [
|
|
501
|
+
{
|
|
502
|
+
name: 'questionnaires show current progress',
|
|
503
|
+
examples: [
|
|
504
|
+
{
|
|
505
|
+
name: 'a question has already been answered',
|
|
506
|
+
steps: [
|
|
507
|
+
{
|
|
508
|
+
keyword: 'Given',
|
|
509
|
+
text: 'QuestionnaireLinkSent',
|
|
510
|
+
docString: {
|
|
511
|
+
questionnaireId: 'q-001',
|
|
512
|
+
participantId: 'participant-abc',
|
|
513
|
+
link: 'https://app.example.com/q/q-001?participant=participant-abc',
|
|
514
|
+
sentAt: new Date('2030-01-01T09:00:00Z'),
|
|
515
|
+
},
|
|
490
516
|
},
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
savedAt: new Date('2030-01-01T09:05:00Z'),
|
|
517
|
+
{
|
|
518
|
+
keyword: 'When',
|
|
519
|
+
text: 'QuestionAnswered',
|
|
520
|
+
docString: {
|
|
521
|
+
questionnaireId: 'q-001',
|
|
522
|
+
participantId: 'participant-abc',
|
|
523
|
+
questionId: 'q1',
|
|
524
|
+
answer: 'Yes',
|
|
525
|
+
savedAt: new Date('2030-01-01T09:05:00Z'),
|
|
526
|
+
},
|
|
502
527
|
},
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
answers: [{ questionId: 'q1', value: 'Yes' }],
|
|
528
|
+
{
|
|
529
|
+
keyword: 'Then',
|
|
530
|
+
text: 'QuestionnaireProgress',
|
|
531
|
+
docString: {
|
|
532
|
+
questionnaireId: 'q-001',
|
|
533
|
+
participantId: 'participant-abc',
|
|
534
|
+
status: 'in_progress',
|
|
535
|
+
currentQuestionId: 'q2',
|
|
536
|
+
remainingQuestions: ['q2'],
|
|
537
|
+
answers: [{ questionId: 'q1', value: 'Yes' }],
|
|
538
|
+
},
|
|
515
539
|
},
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
540
|
+
],
|
|
541
|
+
},
|
|
542
|
+
],
|
|
543
|
+
},
|
|
544
|
+
],
|
|
545
|
+
},
|
|
546
|
+
],
|
|
523
547
|
data: [
|
|
524
548
|
{
|
|
525
549
|
origin: { name: 'Questionnaires', idField: 'questionnaireId-participantId' },
|
|
@@ -635,35 +659,40 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
635
659
|
client: { specs: [] },
|
|
636
660
|
server: {
|
|
637
661
|
description: '',
|
|
638
|
-
specs:
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
exampleData: {
|
|
657
|
-
todoId: 'todo_123',
|
|
658
|
-
title: 'Buy milk',
|
|
662
|
+
specs: [
|
|
663
|
+
{
|
|
664
|
+
type: 'gherkin',
|
|
665
|
+
feature: 'Manage todo command',
|
|
666
|
+
rules: [
|
|
667
|
+
{
|
|
668
|
+
name: 'Should handle todo operations',
|
|
669
|
+
examples: [
|
|
670
|
+
{
|
|
671
|
+
name: 'User adds todo',
|
|
672
|
+
steps: [
|
|
673
|
+
{
|
|
674
|
+
keyword: 'When',
|
|
675
|
+
text: 'AddTodo',
|
|
676
|
+
docString: {
|
|
677
|
+
todoId: 'todo_123',
|
|
678
|
+
title: 'Buy milk',
|
|
679
|
+
},
|
|
659
680
|
},
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
681
|
+
{
|
|
682
|
+
keyword: 'Then',
|
|
683
|
+
text: 'TodoAdded',
|
|
684
|
+
docString: {
|
|
685
|
+
todoId: 'todo_123',
|
|
686
|
+
title: 'Buy milk',
|
|
687
|
+
},
|
|
688
|
+
},
|
|
689
|
+
],
|
|
690
|
+
},
|
|
691
|
+
],
|
|
692
|
+
},
|
|
693
|
+
],
|
|
694
|
+
},
|
|
695
|
+
],
|
|
667
696
|
},
|
|
668
697
|
},
|
|
669
698
|
{
|
|
@@ -686,36 +715,39 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
686
715
|
},
|
|
687
716
|
},
|
|
688
717
|
],
|
|
689
|
-
specs:
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
718
|
+
specs: [
|
|
719
|
+
{
|
|
720
|
+
type: 'gherkin',
|
|
721
|
+
feature: 'View summary query',
|
|
722
|
+
rules: [
|
|
723
|
+
{
|
|
724
|
+
name: 'Should aggregate todo counts',
|
|
725
|
+
examples: [
|
|
726
|
+
{
|
|
727
|
+
name: 'Todo added updates count',
|
|
728
|
+
steps: [
|
|
729
|
+
{
|
|
730
|
+
keyword: 'When',
|
|
731
|
+
text: 'TodoAdded',
|
|
732
|
+
docString: {
|
|
733
|
+
todoId: 'todo_123',
|
|
734
|
+
title: 'Buy milk',
|
|
735
|
+
},
|
|
703
736
|
},
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
totalCount: 1,
|
|
737
|
+
{
|
|
738
|
+
keyword: 'Then',
|
|
739
|
+
text: 'TodoSummary',
|
|
740
|
+
docString: {
|
|
741
|
+
totalCount: 1,
|
|
742
|
+
},
|
|
711
743
|
},
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
744
|
+
],
|
|
745
|
+
},
|
|
746
|
+
],
|
|
747
|
+
},
|
|
748
|
+
],
|
|
749
|
+
},
|
|
750
|
+
],
|
|
719
751
|
},
|
|
720
752
|
},
|
|
721
753
|
],
|
|
@@ -810,37 +842,42 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
810
842
|
client: { specs: [] },
|
|
811
843
|
server: {
|
|
812
844
|
description: '',
|
|
813
|
-
specs:
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
exampleData: {
|
|
833
|
-
userId: 'user_123',
|
|
834
|
-
projectId: 'proj_456',
|
|
835
|
-
role: 'developer',
|
|
845
|
+
specs: [
|
|
846
|
+
{
|
|
847
|
+
type: 'gherkin',
|
|
848
|
+
feature: 'Manage user project command',
|
|
849
|
+
rules: [
|
|
850
|
+
{
|
|
851
|
+
name: 'Should handle user project operations',
|
|
852
|
+
examples: [
|
|
853
|
+
{
|
|
854
|
+
name: 'User joins project',
|
|
855
|
+
steps: [
|
|
856
|
+
{
|
|
857
|
+
keyword: 'When',
|
|
858
|
+
text: 'JoinProject',
|
|
859
|
+
docString: {
|
|
860
|
+
userId: 'user_123',
|
|
861
|
+
projectId: 'proj_456',
|
|
862
|
+
role: 'developer',
|
|
863
|
+
},
|
|
836
864
|
},
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
865
|
+
{
|
|
866
|
+
keyword: 'Then',
|
|
867
|
+
text: 'UserJoinedProject',
|
|
868
|
+
docString: {
|
|
869
|
+
userId: 'user_123',
|
|
870
|
+
projectId: 'proj_456',
|
|
871
|
+
role: 'developer',
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
],
|
|
875
|
+
},
|
|
876
|
+
],
|
|
877
|
+
},
|
|
878
|
+
],
|
|
879
|
+
},
|
|
880
|
+
],
|
|
844
881
|
},
|
|
845
882
|
},
|
|
846
883
|
{
|
|
@@ -863,39 +900,42 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
863
900
|
},
|
|
864
901
|
},
|
|
865
902
|
],
|
|
866
|
-
specs:
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
903
|
+
specs: [
|
|
904
|
+
{
|
|
905
|
+
type: 'gherkin',
|
|
906
|
+
feature: 'View user projects query',
|
|
907
|
+
rules: [
|
|
908
|
+
{
|
|
909
|
+
name: 'Should track user project memberships',
|
|
910
|
+
examples: [
|
|
911
|
+
{
|
|
912
|
+
name: 'User joins project',
|
|
913
|
+
steps: [
|
|
914
|
+
{
|
|
915
|
+
keyword: 'When',
|
|
916
|
+
text: 'UserJoinedProject',
|
|
917
|
+
docString: {
|
|
918
|
+
userId: 'user_123',
|
|
919
|
+
projectId: 'proj_456',
|
|
920
|
+
role: 'developer',
|
|
921
|
+
},
|
|
881
922
|
},
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
role: 'developer',
|
|
923
|
+
{
|
|
924
|
+
keyword: 'Then',
|
|
925
|
+
text: 'UserProject',
|
|
926
|
+
docString: {
|
|
927
|
+
userId: 'user_123',
|
|
928
|
+
projectId: 'proj_456',
|
|
929
|
+
role: 'developer',
|
|
930
|
+
},
|
|
891
931
|
},
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
932
|
+
],
|
|
933
|
+
},
|
|
934
|
+
],
|
|
935
|
+
},
|
|
936
|
+
],
|
|
937
|
+
},
|
|
938
|
+
],
|
|
899
939
|
},
|
|
900
940
|
},
|
|
901
941
|
],
|