Skip to content

Commit e44b5c0

Browse files
committed
sync e2e flows
1 parent 07ee55d commit e44b5c0

File tree

1 file changed

+305
-0
lines changed

1 file changed

+305
-0
lines changed
Lines changed: 305 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,305 @@
1+
{
2+
"flow": {
3+
"start": {
4+
"type": "appmixer.utils.controls.OnStart",
5+
"x": 100,
6+
"y": 300,
7+
"source": {},
8+
"version": "1.0.0",
9+
"config": {}
10+
},
11+
"test-basic-code": {
12+
"type": "appmixer.utils.controls.CodeBlock",
13+
"x": 300,
14+
"y": 100,
15+
"version": "1.0.0",
16+
"source": {
17+
"in": {
18+
"start": [
19+
"out"
20+
]
21+
}
22+
},
23+
"config": {
24+
"transform": {
25+
"in": {
26+
"start": {
27+
"out": {
28+
"type": "json2new",
29+
"modifiers": {
30+
"code": {}
31+
},
32+
"lambda": {
33+
"code": "5 + 10"
34+
}
35+
}
36+
}
37+
}
38+
}
39+
}
40+
},
41+
"assert-basic-result": {
42+
"type": "appmixer.utils.test.Assert",
43+
"x": 500,
44+
"y": 100,
45+
"version": "1.0.0",
46+
"source": {
47+
"in": {
48+
"test-basic-code": [
49+
"out"
50+
]
51+
}
52+
},
53+
"config": {
54+
"transform": {
55+
"in": {
56+
"test-basic-code": {
57+
"out": {
58+
"type": "json2new",
59+
"modifiers": {
60+
"expression": {
61+
"result-check": {
62+
"variable": "$.test-basic-code.out.result",
63+
"functions": []
64+
}
65+
}
66+
},
67+
"lambda": {
68+
"expression": {
69+
"AND": [
70+
{
71+
"field": "{{{result-check}}}",
72+
"assertion": "equal",
73+
"expected": "15"
74+
}
75+
]
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}
83+
},
84+
"test-with-variables": {
85+
"type": "appmixer.utils.controls.CodeBlock",
86+
"x": 300,
87+
"y": 300,
88+
"version": "1.0.0",
89+
"source": {
90+
"in": {
91+
"start": [
92+
"out"
93+
]
94+
}
95+
},
96+
"config": {
97+
"transform": {
98+
"in": {
99+
"start": {
100+
"out": {
101+
"type": "json2new",
102+
"modifiers": {
103+
"code": {},
104+
"variables": {}
105+
},
106+
"lambda": {
107+
"code": "$data.firstName + ' ' + $data.lastName",
108+
"variables": {
109+
"firstName": "John",
110+
"lastName": "Doe"
111+
}
112+
}
113+
}
114+
}
115+
}
116+
}
117+
}
118+
},
119+
"assert-variables-result": {
120+
"type": "appmixer.utils.test.Assert",
121+
"x": 500,
122+
"y": 300,
123+
"version": "1.0.0",
124+
"source": {
125+
"in": {
126+
"test-with-variables": [
127+
"out"
128+
]
129+
}
130+
},
131+
"config": {
132+
"transform": {
133+
"in": {
134+
"test-with-variables": {
135+
"out": {
136+
"type": "json2new",
137+
"modifiers": {
138+
"expression": {
139+
"result-check": {
140+
"variable": "$.test-with-variables.out.result",
141+
"functions": []
142+
}
143+
}
144+
},
145+
"lambda": {
146+
"expression": {
147+
"AND": [
148+
{
149+
"field": "{{{result-check}}}",
150+
"assertion": "equal",
151+
"expected": "John Doe"
152+
}
153+
]
154+
}
155+
}
156+
}
157+
}
158+
}
159+
}
160+
}
161+
},
162+
"test-json-output": {
163+
"type": "appmixer.utils.controls.CodeBlock",
164+
"x": 300,
165+
"y": 500,
166+
"version": "1.0.0",
167+
"source": {
168+
"in": {
169+
"start": [
170+
"out"
171+
]
172+
}
173+
},
174+
"config": {
175+
"transform": {
176+
"in": {
177+
"start": {
178+
"out": {
179+
"type": "json2new",
180+
"modifiers": {
181+
"code": {},
182+
"variables": {}
183+
},
184+
"lambda": {
185+
"code": "JSON.stringify({ status: 'success', value: 42, isValid: true })",
186+
"variables": {}
187+
}
188+
}
189+
}
190+
}
191+
}
192+
}
193+
},
194+
"assert-json-output": {
195+
"type": "appmixer.utils.test.Assert",
196+
"x": 500,
197+
"y": 500,
198+
"version": "1.0.0",
199+
"source": {
200+
"in": {
201+
"test-json-output": [
202+
"out"
203+
]
204+
}
205+
},
206+
"config": {
207+
"transform": {
208+
"in": {
209+
"test-json-output": {
210+
"out": {
211+
"type": "json2new",
212+
"modifiers": {
213+
"expression": {
214+
"result-check": {
215+
"variable": "$.test-json-output.out.result",
216+
"functions": []
217+
}
218+
}
219+
},
220+
"lambda": {
221+
"expression": {
222+
"AND": [
223+
{
224+
"field": "{{{result-check}}}",
225+
"assertion": "regex",
226+
"expected": ".*success.*"
227+
}
228+
]
229+
}
230+
}
231+
}
232+
}
233+
}
234+
}
235+
}
236+
},
237+
"after-all": {
238+
"type": "appmixer.utils.test.AfterAll",
239+
"x": 700,
240+
"y": 300,
241+
"version": "1.0.0",
242+
"source": {
243+
"in": {
244+
"assert-basic-result": [
245+
"out"
246+
],
247+
"assert-variables-result": [
248+
"out"
249+
],
250+
"assert-json-output": [
251+
"out"
252+
]
253+
}
254+
},
255+
"config": {
256+
"properties": {
257+
"timeout": 30
258+
}
259+
}
260+
},
261+
"process-results": {
262+
"type": "appmixer.utils.test.ProcessE2EResults",
263+
"x": 900,
264+
"y": 300,
265+
"version": "1.0.1",
266+
"source": {
267+
"in": {
268+
"after-all": [
269+
"out"
270+
]
271+
}
272+
},
273+
"config": {
274+
"properties": {},
275+
"transform": {
276+
"in": {
277+
"after-all": {
278+
"out": {
279+
"type": "json2new",
280+
"modifiers": {
281+
"recipients": {},
282+
"testCase": {},
283+
"result": {
284+
"result-var": {
285+
"variable": "$.after-all.out",
286+
"functions": []
287+
}
288+
}
289+
},
290+
"lambda": {
291+
"recipients": "test@appmixer.ai",
292+
"testCase": "E2E Utils Controls - CodeBlock",
293+
"result": "{{{result-var}}}"
294+
}
295+
}
296+
}
297+
}
298+
}
299+
}
300+
}
301+
},
302+
"name": "E2E Utils/Controls - CodeBlock",
303+
"type": "automation",
304+
"notes": {}
305+
}

0 commit comments

Comments
 (0)