create-auto-app 0.11.10 → 0.11.11
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/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -2
- package/templates/kanban-todo/.context/auto-ia-scheme.json +403 -0
- package/templates/kanban-todo/.context/schema.graphql +61 -0
- package/templates/kanban-todo/.context/schema.json +1148 -0
- package/templates/kanban-todo/.gitignore +2 -2
- package/templates/kanban-todo/auto.config.ts +8 -6
- package/templates/kanban-todo/client/.gitignore +24 -0
- package/templates/kanban-todo/client2/.gitignore +24 -0
- package/templates/kanban-todo/{flows/homepage.flow.ts → narratives/homepage.narrative.ts} +27 -38
- package/templates/kanban-todo/{flows/structure.flow.ts → narratives/structure.narrative.ts} +2 -15
- package/templates/kanban-todo/{flows/todo-list.flow.ts → narratives/todo-list.narrative.ts} +163 -210
- package/templates/kanban-todo/package.json +1 -1
- package/templates/questionnaires/auto.config.ts +5 -5
- package/templates/questionnaires/{flows/homepage.flow.ts → narratives/homepage.narrative.ts} +8 -8
- package/templates/questionnaires/{flows/questionnaires.flow.ts → narratives/questionnaires.narrative.ts} +3 -3
- package/templates/questionnaires/{flows/structure.flow.ts → narratives/structure.narrative.ts} +2 -2
- package/templates/questionnaires/package.json +1 -1
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
command,
|
|
3
|
-
|
|
4
|
-
flow,
|
|
5
|
-
should,
|
|
6
|
-
specs,
|
|
7
|
-
rule,
|
|
3
|
+
data,
|
|
8
4
|
example,
|
|
5
|
+
narrative,
|
|
9
6
|
gql,
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
query,
|
|
8
|
+
rule,
|
|
9
|
+
should,
|
|
12
10
|
sink,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from '@auto-engineer/
|
|
11
|
+
source,
|
|
12
|
+
specs,
|
|
13
|
+
} from '@auto-engineer/narrative';
|
|
14
|
+
import type { Command, Event, State } from '@auto-engineer/narrative';
|
|
17
15
|
|
|
18
16
|
type AddTodo = Command<
|
|
19
17
|
'AddTodo',
|
|
@@ -23,13 +21,10 @@ type AddTodo = Command<
|
|
|
23
21
|
}
|
|
24
22
|
>;
|
|
25
23
|
|
|
26
|
-
type
|
|
27
|
-
'
|
|
24
|
+
type MarkTodoComplete = Command<
|
|
25
|
+
'MarkTodoComplete',
|
|
28
26
|
{
|
|
29
27
|
todoId: string;
|
|
30
|
-
description: string;
|
|
31
|
-
status: 'pending';
|
|
32
|
-
addedAt: Date;
|
|
33
28
|
}
|
|
34
29
|
>;
|
|
35
30
|
|
|
@@ -40,18 +35,25 @@ type MarkTodoInProgress = Command<
|
|
|
40
35
|
}
|
|
41
36
|
>;
|
|
42
37
|
|
|
43
|
-
type
|
|
44
|
-
'
|
|
38
|
+
type TodoAdded = Event<
|
|
39
|
+
'TodoAdded',
|
|
45
40
|
{
|
|
46
41
|
todoId: string;
|
|
47
|
-
|
|
42
|
+
description: string;
|
|
43
|
+
status: 'pending';
|
|
44
|
+
addedAt: Date;
|
|
48
45
|
}
|
|
49
46
|
>;
|
|
50
47
|
|
|
51
|
-
type
|
|
52
|
-
'
|
|
48
|
+
type TodoListSummary = State<
|
|
49
|
+
'TodoListSummary',
|
|
53
50
|
{
|
|
54
|
-
|
|
51
|
+
summaryId: string;
|
|
52
|
+
totalTodos: number;
|
|
53
|
+
pendingCount: number;
|
|
54
|
+
inProgressCount: number;
|
|
55
|
+
completedCount: number;
|
|
56
|
+
completionPercentage: number;
|
|
55
57
|
}
|
|
56
58
|
>;
|
|
57
59
|
|
|
@@ -63,6 +65,14 @@ type TodoMarkedComplete = Event<
|
|
|
63
65
|
}
|
|
64
66
|
>;
|
|
65
67
|
|
|
68
|
+
type TodoMarkedInProgress = Event<
|
|
69
|
+
'TodoMarkedInProgress',
|
|
70
|
+
{
|
|
71
|
+
todoId: string;
|
|
72
|
+
markedAt: Date;
|
|
73
|
+
}
|
|
74
|
+
>;
|
|
75
|
+
|
|
66
76
|
type TodoState = State<
|
|
67
77
|
'TodoState',
|
|
68
78
|
{
|
|
@@ -74,61 +84,65 @@ type TodoState = State<
|
|
|
74
84
|
}
|
|
75
85
|
>;
|
|
76
86
|
|
|
77
|
-
|
|
78
|
-
'TodoListSummary',
|
|
79
|
-
{
|
|
80
|
-
summaryId: string;
|
|
81
|
-
totalTodos: number;
|
|
82
|
-
pendingCount: number;
|
|
83
|
-
inProgressCount: number;
|
|
84
|
-
completedCount: number;
|
|
85
|
-
completionPercentage: number;
|
|
86
|
-
}
|
|
87
|
-
>;
|
|
88
|
-
|
|
89
|
-
flow('Todo List', 'AUTO-T8dL3k9Xw', () => {
|
|
87
|
+
narrative('Todo List', 'AUTO-T8dL3k9Xw', () => {
|
|
90
88
|
command('adds a new todo', 'AUTO-A1c4Mn7Bz')
|
|
89
|
+
.client(() => {
|
|
90
|
+
specs('Add Todo', () => {
|
|
91
|
+
should('display a quick-add input field with floating action button');
|
|
92
|
+
should('show success animation when todo is added');
|
|
93
|
+
should('automatically place new todo in "To Do" column');
|
|
94
|
+
should('clear input field after successful addition');
|
|
95
|
+
should('focus back to input for quick consecutive additions');
|
|
96
|
+
});
|
|
97
|
+
})
|
|
98
|
+
.request(
|
|
99
|
+
gql(`mutation AddTodo($input: AddTodoInput!) {
|
|
100
|
+
addTodo(input: $input) {
|
|
101
|
+
success
|
|
102
|
+
error {
|
|
103
|
+
type
|
|
104
|
+
message
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}`),
|
|
108
|
+
)
|
|
91
109
|
.server(() => {
|
|
110
|
+
data([sink().event('TodoAdded').toStream('todos')]);
|
|
92
111
|
specs(() => {
|
|
93
112
|
rule('todos can be added to the list', 'AUTO-r1B2Cp8Y', () => {
|
|
94
113
|
example('adds a new todo successfully')
|
|
95
|
-
.when<AddTodo>({
|
|
96
|
-
todoId: 'todo-001',
|
|
97
|
-
description: 'Buy groceries',
|
|
98
|
-
})
|
|
114
|
+
.when<AddTodo>({ todoId: 'todo-001', description: 'Buy groceries' })
|
|
99
115
|
.then<TodoAdded>({
|
|
100
116
|
todoId: 'todo-001',
|
|
101
117
|
description: 'Buy groceries',
|
|
102
118
|
status: 'pending',
|
|
103
|
-
addedAt: new Date('2030-01-01T09:00:
|
|
119
|
+
addedAt: new Date('2030-01-01T09:00:00.000Z'),
|
|
104
120
|
});
|
|
105
121
|
});
|
|
106
122
|
});
|
|
107
|
-
data([sink().event('TodoAdded').toStream('todos')]);
|
|
108
|
-
})
|
|
109
|
-
.request(gql`
|
|
110
|
-
mutation AddTodo($input: AddTodoInput!) {
|
|
111
|
-
addTodo(input: $input) {
|
|
112
|
-
success
|
|
113
|
-
error {
|
|
114
|
-
type
|
|
115
|
-
message
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
`)
|
|
120
|
-
.client(() => {
|
|
121
|
-
specs('Add Todo', () => {
|
|
122
|
-
should('display a quick-add input field with floating action button');
|
|
123
|
-
should('show success animation when todo is added');
|
|
124
|
-
should('automatically place new todo in "To Do" column');
|
|
125
|
-
should('clear input field after successful addition');
|
|
126
|
-
should('focus back to input for quick consecutive additions');
|
|
127
|
-
});
|
|
128
123
|
});
|
|
129
|
-
|
|
130
124
|
command('moves todo to in progress', 'AUTO-M2d5No8Cz')
|
|
125
|
+
.client(() => {
|
|
126
|
+
specs('Move to In Progress', () => {
|
|
127
|
+
should('support drag-and-drop from "To Do" to "In Progress" column');
|
|
128
|
+
should('animate smooth transition between columns');
|
|
129
|
+
should('update column count badges in real-time');
|
|
130
|
+
should('show visual feedback during drag operation');
|
|
131
|
+
});
|
|
132
|
+
})
|
|
133
|
+
.request(
|
|
134
|
+
gql(`mutation MarkTodoInProgress($input: MarkTodoInProgressInput!) {
|
|
135
|
+
markTodoInProgress(input: $input) {
|
|
136
|
+
success
|
|
137
|
+
error {
|
|
138
|
+
type
|
|
139
|
+
message
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}`),
|
|
143
|
+
)
|
|
131
144
|
.server(() => {
|
|
145
|
+
data([sink().event('TodoMarkedInProgress').toStream('todos')]);
|
|
132
146
|
specs(() => {
|
|
133
147
|
rule('todos can be moved to in progress', 'AUTO-r2C3Dq9Z', () => {
|
|
134
148
|
example('moves a pending todo to in progress')
|
|
@@ -136,41 +150,37 @@ flow('Todo List', 'AUTO-T8dL3k9Xw', () => {
|
|
|
136
150
|
todoId: 'todo-001',
|
|
137
151
|
description: 'Buy groceries',
|
|
138
152
|
status: 'pending',
|
|
139
|
-
addedAt: new Date('2030-01-01T09:00:
|
|
140
|
-
})
|
|
141
|
-
.when<MarkTodoInProgress>({
|
|
142
|
-
todoId: 'todo-001',
|
|
153
|
+
addedAt: new Date('2030-01-01T09:00:00.000Z'),
|
|
143
154
|
})
|
|
144
|
-
.
|
|
145
|
-
|
|
146
|
-
markedAt: new Date('2030-01-01T10:00:00Z'),
|
|
147
|
-
});
|
|
155
|
+
.when<MarkTodoInProgress>({ todoId: 'todo-001' })
|
|
156
|
+
.then<TodoMarkedInProgress>({ todoId: 'todo-001', markedAt: new Date('2030-01-01T10:00:00.000Z') });
|
|
148
157
|
});
|
|
149
158
|
});
|
|
150
|
-
data([sink().event('TodoMarkedInProgress').toStream('todos')]);
|
|
151
|
-
})
|
|
152
|
-
.request(gql`
|
|
153
|
-
mutation MarkTodoInProgress($input: MarkTodoInProgressInput!) {
|
|
154
|
-
markTodoInProgress(input: $input) {
|
|
155
|
-
success
|
|
156
|
-
error {
|
|
157
|
-
type
|
|
158
|
-
message
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
`)
|
|
163
|
-
.client(() => {
|
|
164
|
-
specs('Move to In Progress', () => {
|
|
165
|
-
should('support drag-and-drop from "To Do" to "In Progress" column');
|
|
166
|
-
should('animate smooth transition between columns');
|
|
167
|
-
should('update column count badges in real-time');
|
|
168
|
-
should('show visual feedback during drag operation');
|
|
169
|
-
});
|
|
170
159
|
});
|
|
171
|
-
|
|
172
160
|
command('marks todo as complete', 'AUTO-C3e6Op9Dz')
|
|
161
|
+
.client(() => {
|
|
162
|
+
specs('Complete Todo', () => {
|
|
163
|
+
should('support drag-and-drop to "Done" column');
|
|
164
|
+
should('show celebration animation on completion');
|
|
165
|
+
should('display visual confetti effect for milestone completions');
|
|
166
|
+
should('update completion percentage progress ring');
|
|
167
|
+
should('strike-through completed todo text with smooth animation');
|
|
168
|
+
should('show completion timestamp on hover');
|
|
169
|
+
});
|
|
170
|
+
})
|
|
171
|
+
.request(
|
|
172
|
+
gql(`mutation MarkTodoComplete($input: MarkTodoCompleteInput!) {
|
|
173
|
+
markTodoComplete(input: $input) {
|
|
174
|
+
success
|
|
175
|
+
error {
|
|
176
|
+
type
|
|
177
|
+
message
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}`),
|
|
181
|
+
)
|
|
173
182
|
.server(() => {
|
|
183
|
+
data([sink().event('TodoMarkedComplete').toStream('todos')]);
|
|
174
184
|
specs(() => {
|
|
175
185
|
rule('todos can be marked as complete', 'AUTO-r3D4Eq0A', () => {
|
|
176
186
|
example('marks an in-progress todo as complete')
|
|
@@ -178,62 +188,48 @@ flow('Todo List', 'AUTO-T8dL3k9Xw', () => {
|
|
|
178
188
|
todoId: 'todo-001',
|
|
179
189
|
description: 'Buy groceries',
|
|
180
190
|
status: 'pending',
|
|
181
|
-
addedAt: new Date('2030-01-01T09:00:
|
|
182
|
-
})
|
|
183
|
-
.and<TodoMarkedInProgress>({
|
|
184
|
-
todoId: 'todo-001',
|
|
185
|
-
markedAt: new Date('2030-01-01T10:00:00Z'),
|
|
191
|
+
addedAt: new Date('2030-01-01T09:00:00.000Z'),
|
|
186
192
|
})
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
})
|
|
190
|
-
.then<TodoMarkedComplete>({
|
|
191
|
-
todoId: 'todo-001',
|
|
192
|
-
completedAt: new Date('2030-01-01T11:00:00Z'),
|
|
193
|
-
});
|
|
194
|
-
|
|
193
|
+
.and<TodoMarkedInProgress>({ todoId: 'todo-001', markedAt: new Date('2030-01-01T10:00:00.000Z') })
|
|
194
|
+
.when<MarkTodoComplete>({ todoId: 'todo-001' })
|
|
195
|
+
.then<TodoMarkedComplete>({ todoId: 'todo-001', completedAt: new Date('2030-01-01T11:00:00.000Z') });
|
|
195
196
|
example('marks a pending todo directly as complete')
|
|
196
197
|
.given<TodoAdded>({
|
|
197
198
|
todoId: 'todo-002',
|
|
198
199
|
description: 'Write report',
|
|
199
200
|
status: 'pending',
|
|
200
|
-
addedAt: new Date('2030-01-01T09:00:
|
|
201
|
+
addedAt: new Date('2030-01-01T09:00:00.000Z'),
|
|
201
202
|
})
|
|
202
|
-
.when<MarkTodoComplete>({
|
|
203
|
-
|
|
204
|
-
})
|
|
205
|
-
.then<TodoMarkedComplete>({
|
|
206
|
-
todoId: 'todo-002',
|
|
207
|
-
completedAt: new Date('2030-01-01T11:30:00Z'),
|
|
208
|
-
});
|
|
203
|
+
.when<MarkTodoComplete>({ todoId: 'todo-002' })
|
|
204
|
+
.then<TodoMarkedComplete>({ todoId: 'todo-002', completedAt: new Date('2030-01-01T11:30:00.000Z') });
|
|
209
205
|
});
|
|
210
206
|
});
|
|
211
|
-
data([sink().event('TodoMarkedComplete').toStream('todos')]);
|
|
212
|
-
})
|
|
213
|
-
.request(gql`
|
|
214
|
-
mutation MarkTodoComplete($input: MarkTodoCompleteInput!) {
|
|
215
|
-
markTodoComplete(input: $input) {
|
|
216
|
-
success
|
|
217
|
-
error {
|
|
218
|
-
type
|
|
219
|
-
message
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
`)
|
|
224
|
-
.client(() => {
|
|
225
|
-
specs('Complete Todo', () => {
|
|
226
|
-
should('support drag-and-drop to "Done" column');
|
|
227
|
-
should('show celebration animation on completion');
|
|
228
|
-
should('display visual confetti effect for milestone completions');
|
|
229
|
-
should('update completion percentage progress ring');
|
|
230
|
-
should('strike-through completed todo text with smooth animation');
|
|
231
|
-
should('show completion timestamp on hover');
|
|
232
|
-
});
|
|
233
207
|
});
|
|
234
|
-
|
|
235
208
|
query('views all todos', 'AUTO-V4f7Pq0Ez')
|
|
209
|
+
.client(() => {
|
|
210
|
+
specs('Todo List View', () => {
|
|
211
|
+
should('display todos organized in three columns: To Do, In Progress, Done');
|
|
212
|
+
should('show count badges on each column header');
|
|
213
|
+
should('support drag-and-drop between columns');
|
|
214
|
+
should('display empty state illustrations for empty columns');
|
|
215
|
+
should('show todo cards with glass morphism effect');
|
|
216
|
+
should('display subtle hover effects on todo cards');
|
|
217
|
+
should('support keyboard navigation between todos');
|
|
218
|
+
});
|
|
219
|
+
})
|
|
220
|
+
.request(
|
|
221
|
+
gql(`query AllTodos {
|
|
222
|
+
todos {
|
|
223
|
+
todoId
|
|
224
|
+
description
|
|
225
|
+
status
|
|
226
|
+
addedAt
|
|
227
|
+
completedAt
|
|
228
|
+
}
|
|
229
|
+
}`),
|
|
230
|
+
)
|
|
236
231
|
.server(() => {
|
|
232
|
+
data([source().state('TodoState').fromProjection('Todos', 'todoId')]);
|
|
237
233
|
specs(() => {
|
|
238
234
|
rule('all todos are displayed with their current status', 'AUTO-r4E5Fr1B', () => {
|
|
239
235
|
example('shows multiple todos in different states')
|
|
@@ -241,66 +237,51 @@ flow('Todo List', 'AUTO-T8dL3k9Xw', () => {
|
|
|
241
237
|
todoId: 'todo-001',
|
|
242
238
|
description: 'Buy groceries',
|
|
243
239
|
status: 'pending',
|
|
244
|
-
addedAt: new Date('2030-01-01T09:00:
|
|
240
|
+
addedAt: new Date('2030-01-01T09:00:00.000Z'),
|
|
245
241
|
})
|
|
246
242
|
.and<TodoAdded>({
|
|
247
243
|
todoId: 'todo-002',
|
|
248
244
|
description: 'Write report',
|
|
249
245
|
status: 'pending',
|
|
250
|
-
addedAt: new Date('2030-01-01T09:10:
|
|
251
|
-
})
|
|
252
|
-
.and<TodoMarkedInProgress>({
|
|
253
|
-
todoId: 'todo-001',
|
|
254
|
-
markedAt: new Date('2030-01-01T10:00:00Z'),
|
|
255
|
-
})
|
|
256
|
-
.and<TodoMarkedComplete>({
|
|
257
|
-
todoId: 'todo-002',
|
|
258
|
-
completedAt: new Date('2030-01-01T11:00:00Z'),
|
|
246
|
+
addedAt: new Date('2030-01-01T09:10:00.000Z'),
|
|
259
247
|
})
|
|
248
|
+
.and<TodoMarkedInProgress>({ todoId: 'todo-001', markedAt: new Date('2030-01-01T10:00:00.000Z') })
|
|
249
|
+
.and<TodoMarkedComplete>({ todoId: 'todo-002', completedAt: new Date('2030-01-01T11:00:00.000Z') })
|
|
260
250
|
.when({})
|
|
261
251
|
.then<TodoState>({
|
|
262
252
|
todoId: 'todo-001',
|
|
263
253
|
description: 'Buy groceries',
|
|
264
254
|
status: 'in_progress',
|
|
265
|
-
addedAt: new Date('2030-01-01T09:00:
|
|
255
|
+
addedAt: new Date('2030-01-01T09:00:00.000Z'),
|
|
266
256
|
completedAt: null,
|
|
267
|
-
})
|
|
268
|
-
.and<TodoState>({
|
|
269
|
-
todoId: 'todo-002',
|
|
270
|
-
description: 'Write report',
|
|
271
|
-
status: 'completed',
|
|
272
|
-
addedAt: new Date('2030-01-01T09:10:00Z'),
|
|
273
|
-
completedAt: new Date('2030-01-01T11:00:00Z'),
|
|
274
257
|
});
|
|
275
258
|
});
|
|
276
259
|
});
|
|
277
|
-
data([source().state('TodoState').fromProjection('Todos', 'todoId')]);
|
|
278
|
-
})
|
|
279
|
-
.request(gql`
|
|
280
|
-
query AllTodos {
|
|
281
|
-
todos {
|
|
282
|
-
todoId
|
|
283
|
-
description
|
|
284
|
-
status
|
|
285
|
-
addedAt
|
|
286
|
-
completedAt
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
`)
|
|
290
|
-
.client(() => {
|
|
291
|
-
specs('Todo List View', () => {
|
|
292
|
-
should('display todos organized in three columns: To Do, In Progress, Done');
|
|
293
|
-
should('show count badges on each column header');
|
|
294
|
-
should('support drag-and-drop between columns');
|
|
295
|
-
should('display empty state illustrations for empty columns');
|
|
296
|
-
should('show todo cards with glass morphism effect');
|
|
297
|
-
should('display subtle hover effects on todo cards');
|
|
298
|
-
should('support keyboard navigation between todos');
|
|
299
|
-
});
|
|
300
260
|
});
|
|
301
|
-
|
|
302
261
|
query('views completion summary', 'AUTO-S5g8Qr1Fz')
|
|
262
|
+
.client(() => {
|
|
263
|
+
specs('Completion Summary', () => {
|
|
264
|
+
should('display circular progress ring showing completion percentage');
|
|
265
|
+
should('show total task count in center of progress ring');
|
|
266
|
+
should('display breakdown of pending, in-progress, and completed counts');
|
|
267
|
+
should('update progress ring with smooth animation on status changes');
|
|
268
|
+
should('use gradient colors for progress ring');
|
|
269
|
+
should('show daily completion goal progress');
|
|
270
|
+
});
|
|
271
|
+
})
|
|
272
|
+
.request(
|
|
273
|
+
gql(`query TodoListSummary {
|
|
274
|
+
todoListSummary {
|
|
275
|
+
totalTodos
|
|
276
|
+
pendingCount
|
|
277
|
+
inProgressCount
|
|
278
|
+
completedCount
|
|
279
|
+
completionPercentage
|
|
280
|
+
}
|
|
281
|
+
}`),
|
|
282
|
+
)
|
|
303
283
|
.server(() => {
|
|
284
|
+
data([source().state('TodoListSummary').fromProjection('TodoSummary', 'summaryId')]);
|
|
304
285
|
specs(() => {
|
|
305
286
|
rule('summary shows overall todo list statistics', 'AUTO-r5F6Gs2C', () => {
|
|
306
287
|
example('calculates summary from multiple todos')
|
|
@@ -308,28 +289,22 @@ flow('Todo List', 'AUTO-T8dL3k9Xw', () => {
|
|
|
308
289
|
todoId: 'todo-001',
|
|
309
290
|
description: 'Buy groceries',
|
|
310
291
|
status: 'pending',
|
|
311
|
-
addedAt: new Date('2030-01-01T09:00:
|
|
292
|
+
addedAt: new Date('2030-01-01T09:00:00.000Z'),
|
|
312
293
|
})
|
|
313
294
|
.and<TodoAdded>({
|
|
314
295
|
todoId: 'todo-002',
|
|
315
296
|
description: 'Write report',
|
|
316
297
|
status: 'pending',
|
|
317
|
-
addedAt: new Date('2030-01-01T09:10:
|
|
298
|
+
addedAt: new Date('2030-01-01T09:10:00.000Z'),
|
|
318
299
|
})
|
|
319
300
|
.and<TodoAdded>({
|
|
320
301
|
todoId: 'todo-003',
|
|
321
302
|
description: 'Call client',
|
|
322
303
|
status: 'pending',
|
|
323
|
-
addedAt: new Date('2030-01-01T09:20:
|
|
324
|
-
})
|
|
325
|
-
.and<TodoMarkedInProgress>({
|
|
326
|
-
todoId: 'todo-001',
|
|
327
|
-
markedAt: new Date('2030-01-01T10:00:00Z'),
|
|
328
|
-
})
|
|
329
|
-
.and<TodoMarkedComplete>({
|
|
330
|
-
todoId: 'todo-002',
|
|
331
|
-
completedAt: new Date('2030-01-01T11:00:00Z'),
|
|
304
|
+
addedAt: new Date('2030-01-01T09:20:00.000Z'),
|
|
332
305
|
})
|
|
306
|
+
.and<TodoMarkedInProgress>({ todoId: 'todo-001', markedAt: new Date('2030-01-01T10:00:00.000Z') })
|
|
307
|
+
.and<TodoMarkedComplete>({ todoId: 'todo-002', completedAt: new Date('2030-01-01T11:00:00.000Z') })
|
|
333
308
|
.when({})
|
|
334
309
|
.then<TodoListSummary>({
|
|
335
310
|
summaryId: 'main-summary',
|
|
@@ -341,27 +316,5 @@ flow('Todo List', 'AUTO-T8dL3k9Xw', () => {
|
|
|
341
316
|
});
|
|
342
317
|
});
|
|
343
318
|
});
|
|
344
|
-
data([source().state('TodoListSummary').fromProjection('TodoSummary', 'summaryId')]);
|
|
345
|
-
})
|
|
346
|
-
.request(gql`
|
|
347
|
-
query TodoListSummary {
|
|
348
|
-
todoListSummary {
|
|
349
|
-
totalTodos
|
|
350
|
-
pendingCount
|
|
351
|
-
inProgressCount
|
|
352
|
-
completedCount
|
|
353
|
-
completionPercentage
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
`)
|
|
357
|
-
.client(() => {
|
|
358
|
-
specs('Completion Summary', () => {
|
|
359
|
-
should('display circular progress ring showing completion percentage');
|
|
360
|
-
should('show total task count in center of progress ring');
|
|
361
|
-
should('display breakdown of pending, in-progress, and completed counts');
|
|
362
|
-
should('update progress ring with smooth animation on status changes');
|
|
363
|
-
should('use gradient colors for progress ring');
|
|
364
|
-
should('show daily completion goal progress');
|
|
365
|
-
});
|
|
366
319
|
});
|
|
367
320
|
});
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@auto-engineer/cli": "workspace:*",
|
|
12
12
|
"@auto-engineer/component-implementer": "workspace:*",
|
|
13
13
|
"@auto-engineer/design-system-importer": "workspace:*",
|
|
14
|
-
"@auto-engineer/
|
|
14
|
+
"@auto-engineer/narrative": "workspace:*",
|
|
15
15
|
"@auto-engineer/frontend-checks": "workspace:*",
|
|
16
16
|
"@auto-engineer/frontend-generator-react-graphql": "workspace:*",
|
|
17
17
|
"@auto-engineer/frontend-implementer": "workspace:*",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { autoConfig, on, dispatch } from '@auto-engineer/cli';
|
|
2
|
-
import type { ExportSchemaCommand, ExportSchemaEvents } from '@auto-engineer/
|
|
2
|
+
import type { ExportSchemaCommand, ExportSchemaEvents } from '@auto-engineer/narrative';
|
|
3
3
|
import type { GenerateServerCommand, GenerateServerEvents } from '@auto-engineer/server-generator-apollo-emmett';
|
|
4
4
|
import type {
|
|
5
5
|
ImplementServerCommand,
|
|
@@ -35,7 +35,7 @@ export default autoConfig({
|
|
|
35
35
|
'@auto-engineer/server-checks',
|
|
36
36
|
'@auto-engineer/design-system-importer',
|
|
37
37
|
'@auto-engineer/server-generator-apollo-emmett',
|
|
38
|
-
'@auto-engineer/
|
|
38
|
+
'@auto-engineer/narrative',
|
|
39
39
|
'@auto-engineer/frontend-checks',
|
|
40
40
|
'@auto-engineer/frontend-implementer',
|
|
41
41
|
'@auto-engineer/component-implementer',
|
|
@@ -196,7 +196,7 @@ export default autoConfig({
|
|
|
196
196
|
|
|
197
197
|
rm -rf server client .context/schema.json .context/schema.graphql .context/auto-ia-scheme.json
|
|
198
198
|
pnpm auto export:schema
|
|
199
|
-
pnpm auto generate:ia --output-dir=./.context --flow-files=./
|
|
199
|
+
pnpm auto generate:ia --output-dir=./.context --flow-files=./narratives/questionnaires.narrative.ts
|
|
200
200
|
pnpm auto generate:server --schema-path=./.context/schema.json --destination=.
|
|
201
201
|
pnpm auto generate:client --starter-dir=../../packages/frontend-generator-react-graphql/shadcn-starter --target-dir=./client --ia-schema-path=./.context/auto-ia-scheme.json --gql-schema-path=./.context/schema.graphql --figma-variables-path=./.context/figma-file.json
|
|
202
202
|
pnpm auto implement:client --project-dir=./questionnaires/client --ia-scheme-dir=./questionnaires/.context --design-system-path=./questionnaires/.context/design-system.md
|
|
@@ -209,7 +209,7 @@ pnpm auto generate:server --schema-path=./.context/schema.json --destination=.
|
|
|
209
209
|
pnpm auto generate:client --starter-dir=/Users/sam/WebstormProjects/top/auto-engineer/packages/frontend-generator-react-graphql/shadcn-starter --target-dir=./client --ia-schema-path=./.context/auto-ia-scheme.json --gql-schema-path=./.context/schema.graphql --figma-variables-path=./.context/figma-file.json
|
|
210
210
|
|
|
211
211
|
// run this per slice in parallel
|
|
212
|
-
pnpm auto implement:slice --slice-path=./questionnaires/server/src/domain/
|
|
212
|
+
pnpm auto implement:slice --slice-path=./questionnaires/server/src/domain/narratives/questionnaires/submits-the-questionnaire
|
|
213
213
|
// add checks
|
|
214
214
|
// add retry logic tore-implement failed slices with a retry count
|
|
215
215
|
|
|
@@ -232,7 +232,7 @@ pnpm -w build &&\
|
|
|
232
232
|
rm -rf server client .context/schema.json .context/schema.graphql .context/auto-ia-scheme.json &&\
|
|
233
233
|
DEBUG=* pnpm auto export:schema &&\
|
|
234
234
|
DEBUG=* pnpm auto generate:server --schema-path=./.context/schema.json --destination=. &&\
|
|
235
|
-
DEBUG=* pnpm auto generate:ia --output-dir=./.context --flow-files=./
|
|
235
|
+
DEBUG=* pnpm auto generate:ia --output-dir=./.context --flow-files=./narratives/questionnaires.narrative.ts &&\
|
|
236
236
|
DEBUG=* pnpm auto generate:client --starter-dir=../../packages/frontend-generator-react-graphql/shadcn-starter --target-dir=./client --ia-schema-path=./.context/auto-ia-scheme.json --gql-schema-path=./.context/schema.graphql --figma-variables-path=./.context/figma-file.json
|
|
237
237
|
|
|
238
238
|
|
package/templates/questionnaires/{flows/homepage.flow.ts → narratives/homepage.narrative.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { experience,
|
|
2
|
-
|
|
1
|
+
import { experience, narrative, should, specs } from '@auto-engineer/narrative';
|
|
2
|
+
narrative('Home Screen', 'AUTO-cDAZP41Kb', () => {
|
|
3
3
|
experience('Active Surveys Summary', 'AUTO-aifPcU3hw').client(() => {
|
|
4
4
|
specs(() => {
|
|
5
5
|
should('show active surveys summary and response rate overview');
|
|
@@ -21,7 +21,7 @@ flow('Home Screen', 'AUTO-cDAZP41Kb', () => {
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
|
-
|
|
24
|
+
narrative('Create Survey', 'AUTO-OnuAvj45V', () => {
|
|
25
25
|
experience('Create Survey Form', 'AUTO-MPviTMrQC').client(() => {
|
|
26
26
|
specs(() => {
|
|
27
27
|
should('allow entering survey title, description, and question types');
|
|
@@ -43,7 +43,7 @@ flow('Create Survey', 'AUTO-OnuAvj45V', () => {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
|
-
|
|
46
|
+
narrative('Response Analytics', 'AUTO-dRYuxORz0', () => {
|
|
47
47
|
experience('Response Rate Charts', 'AUTO-eME978Euk').client(() => {
|
|
48
48
|
specs(() => {
|
|
49
49
|
should('show daily response rate charts');
|
|
@@ -66,7 +66,7 @@ flow('Response Analytics', 'AUTO-dRYuxORz0', () => {
|
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
narrative('Manage Templates', 'AUTO-KFxx8k1ul', () => {
|
|
70
70
|
experience('Templates List View', 'AUTO-TRJBgM1JS').client(() => {
|
|
71
71
|
specs(() => {
|
|
72
72
|
should('list all survey templates with usage count and last modified date');
|
|
@@ -88,7 +88,7 @@ flow('Manage Templates', 'AUTO-KFxx8k1ul', () => {
|
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
|
-
|
|
91
|
+
narrative('Survey Completion Tracker', 'AUTO-wXdtfGpFr', () => {
|
|
92
92
|
experience('Completion Rate Progress View', 'AUTO-oDBBOUNzr').client(() => {
|
|
93
93
|
specs(() => {
|
|
94
94
|
should('show current completion rate and target progress');
|
|
@@ -110,7 +110,7 @@ flow('Survey Completion Tracker', 'AUTO-wXdtfGpFr', () => {
|
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
|
-
|
|
113
|
+
narrative('Response Goals Tracker', 'AUTO-W8dytm3oC', () => {
|
|
114
114
|
experience('Response Target Setting', 'AUTO-Idmim68Yf').client(() => {
|
|
115
115
|
specs(() => {
|
|
116
116
|
should('allow setting monthly/weekly response targets');
|
|
@@ -132,7 +132,7 @@ flow('Response Goals Tracker', 'AUTO-W8dytm3oC', () => {
|
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
|
-
|
|
135
|
+
narrative('Response History', 'AUTO-JizW21yrr', () => {
|
|
136
136
|
experience('Response History List', 'AUTO-cIpwPlqRq').client(() => {
|
|
137
137
|
specs(() => {
|
|
138
138
|
should('allow viewing full response history');
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
command,
|
|
3
3
|
query,
|
|
4
4
|
experience,
|
|
5
|
-
|
|
5
|
+
narrative,
|
|
6
6
|
should,
|
|
7
7
|
specs,
|
|
8
8
|
rule,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
type Command,
|
|
15
15
|
type Event,
|
|
16
16
|
type State,
|
|
17
|
-
} from '@auto-engineer/
|
|
17
|
+
} from '@auto-engineer/narrative';
|
|
18
18
|
|
|
19
19
|
type SendQuestionnaireLink = Command<
|
|
20
20
|
'SendQuestionnaireLink',
|
|
@@ -102,7 +102,7 @@ type QuestionnaireProgress = State<
|
|
|
102
102
|
}
|
|
103
103
|
>;
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
narrative('Questionnaires', 'AUTO-Q9m2Kp4Lx', () => {
|
|
106
106
|
command('sends the questionnaire link', 'AUTO-S2b5Cp7Dz')
|
|
107
107
|
.server(() => {
|
|
108
108
|
specs(() => {
|
package/templates/questionnaires/{flows/structure.flow.ts → narratives/structure.narrative.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { experience,
|
|
2
|
-
|
|
1
|
+
import { experience, narrative, should, specs } from '@auto-engineer/narrative';
|
|
2
|
+
narrative('App Structure', 'AUTO-vLkxrmhz6', () => {
|
|
3
3
|
experience('App Structure', 'AUTO-k6JkQZQnc').client(() => {
|
|
4
4
|
specs(() => {
|
|
5
5
|
should('display persistent sidebar on left for navigation');
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@auto-engineer/cli": "workspace:*",
|
|
12
12
|
"@auto-engineer/design-system-importer": "workspace:*",
|
|
13
|
-
"@auto-engineer/
|
|
13
|
+
"@auto-engineer/narrative": "workspace:*",
|
|
14
14
|
"@auto-engineer/frontend-checks": "workspace:*",
|
|
15
15
|
"@auto-engineer/frontend-generator-react-graphql": "workspace:*",
|
|
16
16
|
"@auto-engineer/frontend-implementer": "workspace:*",
|