@suffolklitlab/alkiln 3.0.9
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/.github/workflows/test_tests.yml +77 -0
- package/CHANGELOG.md +381 -0
- package/README.md +18 -0
- package/action.yml +158 -0
- package/lib/DOM.md.html +63 -0
- package/lib/github_integration/install-branch.js +84 -0
- package/lib/github_integration/puppeteer-utils.js +224 -0
- package/lib/github_integration/setup.js +4 -0
- package/lib/github_integration/takedown.js +4 -0
- package/lib/index.js +2 -0
- package/lib/scope.js +1632 -0
- package/lib/steps.js +878 -0
- package/lib/utils/env_vars.js +173 -0
- package/lib/utils/langs.js +51 -0
- package/lib/world.js +10 -0
- package/package.json +53 -0
- package/tests/features/assembly_line.feature +43 -0
- package/tests/features/establishing_steps.feature +22 -0
- package/tests/features/example_test.feature +11 -0
- package/tests/features/interactive_steps.feature +85 -0
- package/tests/features/observation_steps.feature +97 -0
- package/tests/features/reports.feature +482 -0
- package/tests/features/some_png_1.png +0 -0
- package/tests/features/some_png_2.png +0 -0
- package/tests/features/story_table_formats.feature +77 -0
- package/tests/features/story_tables.feature +88 -0
- package/tests/unit_tests/ensureSpecialRows.test.js +34 -0
- package/tests/unit_tests/env_vars.test.js +53 -0
- package/tests/unit_tests/fields.fixtures.js +904 -0
- package/tests/unit_tests/getAllFields.test.js +142 -0
- package/tests/unit_tests/getMatchingRows.test.js +261 -0
- package/tests/unit_tests/getSafeScenarioBaseFilename.fixtures.js +12 -0
- package/tests/unit_tests/getSafeScenarioBaseFilename.test.js +62 -0
- package/tests/unit_tests/getSafeScenarioFilename.test.js +83 -0
- package/tests/unit_tests/html.fixtures.js +861 -0
- package/tests/unit_tests/matches.fixtures.js +168 -0
- package/tests/unit_tests/names.fixtures.js +35 -0
- package/tests/unit_tests/normalizeTable.test.js +22 -0
- package/tests/unit_tests/special_rows.fixtures.js +101 -0
- package/tests/unit_tests/tables.fixtures.js +428 -0
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
let tables = {}
|
|
2
|
+
|
|
3
|
+
// ============================
|
|
4
|
+
// Standard fields - no proxies, no showifs.
|
|
5
|
+
// ============================
|
|
6
|
+
// TODO: Add more complex fields. E.g `object_checkboxes` and dropdown with `object`.
|
|
7
|
+
tables.standard = [
|
|
8
|
+
// continue button comes first to test that it doesn't get activated till after all other
|
|
9
|
+
// variables have been set.
|
|
10
|
+
{ "var": "direct_standard_fields", "value": "True" }, // May want to change `checked`
|
|
11
|
+
{ "var": "checkboxes_yesno", "value": "True" },
|
|
12
|
+
{ "var": "checkboxes_other['checkbox_other_opt_1']", "value": "false" },
|
|
13
|
+
{ "var": "checkboxes_other['checkbox_other_opt_2']", "value": "true" },
|
|
14
|
+
{ "var": "checkboxes_other['checkbox_other_opt_3']", "value": "false" },
|
|
15
|
+
{ "var": "checkboxes_other['None']", "value": "false" },
|
|
16
|
+
// Not sure when these got removed
|
|
17
|
+
// { "var": "checkboxes_other_2['checkbox_other_2_opt_1']", "value": "false" },
|
|
18
|
+
// { "var": "checkboxes_other_2['checkbox_other_2_opt_2']", "value": "false" },
|
|
19
|
+
// { "var": "checkboxes_other_2['checkbox_other_2_opt_3']", "value": "false" },
|
|
20
|
+
// { "var": "checkboxes_other_2['None']", "value": "true" },
|
|
21
|
+
{ "var": "date_input","value":"today-1" },
|
|
22
|
+
{ "var": "radio_yesno", "value": "False" },
|
|
23
|
+
{ "var": "radio_other", "value": "radio_other_opt_2" },
|
|
24
|
+
{ "var": "text_input", "value": "Some one-line text" },
|
|
25
|
+
{ "var": "text_input","value":"Some conflicting text" },
|
|
26
|
+
{ "var": "textarea", "value": "Some\nmulti-line\ntext" },
|
|
27
|
+
{ "var": "dropdown_test", "value": "dropdown_opt_2" }, // May want to change `checked`
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// ============================
|
|
32
|
+
// Simple show if fields - no proxies
|
|
33
|
+
// ============================
|
|
34
|
+
tables.show_if = [
|
|
35
|
+
// continue button comes first to test that it doesn't get activated till after all other
|
|
36
|
+
// variables have been set.
|
|
37
|
+
{ "var": "direct_showifs", "value": "True", }, // May want to change `checked`
|
|
38
|
+
{ "var": "show_2", "value": "True", },
|
|
39
|
+
{ "var": "show_3", "value": "True", },
|
|
40
|
+
{ "var": "showif_checkbox_yesno", "value": "True", },
|
|
41
|
+
{ "var": "showif_checkboxes_other['showif_checkboxes_nota_1']", "value": "false", },
|
|
42
|
+
{ "var": "showif_checkboxes_other['showif_checkboxes_nota_2']", "value": "true", },
|
|
43
|
+
{ "var": "showif_checkboxes_other['None']", "value": "false", },
|
|
44
|
+
{ "var": "showif_yesnoradio", "value": "False", },
|
|
45
|
+
{ "var": "showif_radio_other", "value": "showif_radio_multi_2", },
|
|
46
|
+
{ "var": "showif_text_input", "value": "Some one-line text in show if input", },
|
|
47
|
+
{ "var": "showif_textarea", "value": "Some\nmulti-line\ntext in show if textarea", },
|
|
48
|
+
{ "var": "showif_dropdown", "value": "showif_dropdown_2", }, // May want to change `checked`
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// ============================
|
|
53
|
+
// Buttons
|
|
54
|
+
// ============================
|
|
55
|
+
// `continue button field:`
|
|
56
|
+
tables.button_continue = [
|
|
57
|
+
{ "var": "button_continue", "value": "True", }, // May want to change `checked`
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
// `yesnomaybe:`
|
|
61
|
+
tables.buttons_yesnomaybe_yes = [
|
|
62
|
+
{ "var": "buttons_yesnomaybe", "value": "True", }, // May want to change `checked`
|
|
63
|
+
];
|
|
64
|
+
tables.buttons_yesnomaybe_no = [
|
|
65
|
+
{ "var": "buttons_yesnomaybe", "value": "False", }, // May want to change `checked`
|
|
66
|
+
];
|
|
67
|
+
tables.buttons_yesnomaybe_none = [
|
|
68
|
+
{ "var": "buttons_yesnomaybe", "value": "None", }, // May want to change `checked`
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
// `field:` and `buttons:`
|
|
72
|
+
tables.buttons_other_1 = [
|
|
73
|
+
{ "var": "buttons_other", "value": "button_1", }, // May want to change `checked`
|
|
74
|
+
];
|
|
75
|
+
tables.buttons_other_2 = [
|
|
76
|
+
{ "var": "buttons_other", "value": "button_2", }, // May want to change `checked`
|
|
77
|
+
];
|
|
78
|
+
tables.buttons_other_3 = [
|
|
79
|
+
{ "var": "buttons_other", "value": "button_3", }, // May want to change `checked`
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
// `field:` and `action buttons:`
|
|
83
|
+
tables.buttons_event_action = [
|
|
84
|
+
{ "var": "end", "value": "", }, // May want to change `checked`
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
// ============================
|
|
89
|
+
// Tables
|
|
90
|
+
// ============================
|
|
91
|
+
// Normalizing tables of different formats
|
|
92
|
+
|
|
93
|
+
// Fully featured table
|
|
94
|
+
tables.standard_formatting = [
|
|
95
|
+
{ "var": "direct_showifs", "value": "True", "trigger": "" },
|
|
96
|
+
{ "var": "button_continue", "value": "True", "trigger": "" },
|
|
97
|
+
{ "var": "buttons_other", "value": "button_2", "trigger": "" },
|
|
98
|
+
{ "var": "buttons_yesnomaybe", "value": "True", "trigger": "" },
|
|
99
|
+
{ "var": "checkboxes_other", "value": "checkbox_other_opt_1", "trigger": "" },
|
|
100
|
+
{ "var": "checkboxes_other", "value": "checkbox_other_opt_2", "trigger": "" },
|
|
101
|
+
{ "var": "checkboxes_other", "value": "checkbox_other_opt_3", "trigger": "" },
|
|
102
|
+
{ "var": "checkboxes_yesno", "value": "True", "trigger": "" },
|
|
103
|
+
{ "var": "direct_standard_fields", "value": "True", "trigger": "" },
|
|
104
|
+
{ "var": "dropdown_test", "value": "dropdown_opt_2", "trigger": "" },
|
|
105
|
+
{ "var": "radio_other", "value": "radio_other_opt_3", "trigger": "" },
|
|
106
|
+
{ "var": "radio_yesno", "value": "False", "trigger": "" },
|
|
107
|
+
{ "var": "screen_features", "value": "True", "trigger": "" },
|
|
108
|
+
{ "var": "showif_checkbox_yesno", "value": "False", "trigger": "" },
|
|
109
|
+
{ "var": "showif_checkboxes_other['showif_checkboxes_nota_1']", "value": "false", "trigger": "" },
|
|
110
|
+
{ "var": "showif_checkboxes_other['showif_checkboxes_nota_2']", "value": "true", "trigger": "" },
|
|
111
|
+
{ "var": "showif_dropdown", "value": "showif_dropdown_1", "trigger": "" },
|
|
112
|
+
{ "var": "showif_radio_other", "value": "showif_radio_multi_2", "trigger": "" },
|
|
113
|
+
{ "var": "showif_text_input", "value": "Show if text input value", "trigger": "" },
|
|
114
|
+
{ "var": "showif_textarea", "value": "Show if\nmultiline text\narea value", "trigger": "" },
|
|
115
|
+
{ "var": "showif_yesnoradio", "value": "True", "trigger": "" },
|
|
116
|
+
{ "var": "text_input", "value": "Regular text input field value", "trigger": "" },
|
|
117
|
+
{ "var": "textarea", "value": "Multiline text\narea value", "trigger": "" },
|
|
118
|
+
{ "var": "show_3", "value": "True", "trigger": "" },
|
|
119
|
+
{ "var": "show_2", "value": "True", "trigger": "" },
|
|
120
|
+
];
|
|
121
|
+
|
|
122
|
+
// Should not be changed at all
|
|
123
|
+
tables.standard_normalized_formatting = [
|
|
124
|
+
{
|
|
125
|
+
"original": { "var": "direct_showifs", "value": "True", "trigger": "" },
|
|
126
|
+
"var": "direct_showifs", "value": "True", "trigger": "", times_used: 0,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"original": { "var": "button_continue", "value": "True", "trigger": "" },
|
|
130
|
+
"var": "button_continue", "value": "True", "trigger": "", times_used: 0,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"original": { "var": "buttons_other", "value": "button_2", "trigger": "" },
|
|
134
|
+
"var": "buttons_other", "value": "button_2", "trigger": "", times_used: 0,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"original": { "var": "buttons_yesnomaybe", "value": "True", "trigger": "" },
|
|
138
|
+
"var": "buttons_yesnomaybe", "value": "True", "trigger": "", times_used: 0,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"original": { "var": "checkboxes_other", "value": "checkbox_other_opt_1", "trigger": "" },
|
|
142
|
+
"var": "checkboxes_other", "value": "checkbox_other_opt_1", "trigger": "", times_used: 0,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"original": { "var": "checkboxes_other", "value": "checkbox_other_opt_2", "trigger": "" },
|
|
146
|
+
"var": "checkboxes_other", "value": "checkbox_other_opt_2", "trigger": "", times_used: 0,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"original": { "var": "checkboxes_other", "value": "checkbox_other_opt_3", "trigger": "" },
|
|
150
|
+
"var": "checkboxes_other", "value": "checkbox_other_opt_3", "trigger": "", times_used: 0,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"original": { "var": "checkboxes_yesno", "value": "True", "trigger": "" },
|
|
154
|
+
"var": "checkboxes_yesno", "value": "True", "trigger": "", times_used: 0,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"original": { "var": "direct_standard_fields", "value": "True", "trigger": "" },
|
|
158
|
+
"var": "direct_standard_fields", "value": "True", "trigger": "", times_used: 0,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"original": { "var": "dropdown_test", "value": "dropdown_opt_2", "trigger": "" },
|
|
162
|
+
"var": "dropdown_test", "value": "dropdown_opt_2", "trigger": "", times_used: 0,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"original": { "var": "radio_other", "value": "radio_other_opt_3", "trigger": "" },
|
|
166
|
+
"var": "radio_other", "value": "radio_other_opt_3", "trigger": "", times_used: 0,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"original": { "var": "radio_yesno", "value": "False", "trigger": "" },
|
|
170
|
+
"var": "radio_yesno", "value": "False", "trigger": "", times_used: 0,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"original": { "var": "screen_features", "value": "True", "trigger": "" },
|
|
174
|
+
"var": "screen_features", "value": "True", "trigger": "", times_used: 0,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"original": { "var": "showif_checkbox_yesno", "value": "False", "trigger": "" },
|
|
178
|
+
"var": "showif_checkbox_yesno", "value": "False", "trigger": "", times_used: 0,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"original": { "var": "showif_checkboxes_other['showif_checkboxes_nota_1']", "value": "false", "trigger": "" },
|
|
182
|
+
"var": "showif_checkboxes_other['showif_checkboxes_nota_1']", "value": "false", "trigger": "", times_used: 0,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"original": { "var": "showif_checkboxes_other['showif_checkboxes_nota_2']", "value": "true", "trigger": "" },
|
|
186
|
+
"var": "showif_checkboxes_other['showif_checkboxes_nota_2']", "value": "true", "trigger": "", times_used: 0,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"original": { "var": "showif_dropdown", "value": "showif_dropdown_1", "trigger": "" },
|
|
190
|
+
"var": "showif_dropdown", "value": "showif_dropdown_1", "trigger": "", times_used: 0,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"original": { "var": "showif_radio_other", "value": "showif_radio_multi_2", "trigger": "" },
|
|
194
|
+
"var": "showif_radio_other", "value": "showif_radio_multi_2", "trigger": "", times_used: 0,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"original": { "var": "showif_text_input", "value": "Show if text input value", "trigger": "" },
|
|
198
|
+
"var": "showif_text_input", "value": "Show if text input value", "trigger": "", times_used: 0,
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"original": { "var": "showif_textarea", "value": "Show if\nmultiline text\narea value", "trigger": "" },
|
|
202
|
+
"var": "showif_textarea", "value": "Show if\nmultiline text\narea value", "trigger": "", times_used: 0,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"original": { "var": "showif_yesnoradio", "value": "True", "trigger": "" },
|
|
206
|
+
"var": "showif_yesnoradio", "value": "True", "trigger": "", times_used: 0,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"original": { "var": "text_input", "value": "Regular text input field value", "trigger": "" },
|
|
210
|
+
"var": "text_input", "value": "Regular text input field value", "trigger": "", times_used: 0,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"original": { "var": "textarea", "value": "Multiline text\narea value", "trigger": "" },
|
|
214
|
+
"var": "textarea", "value": "Multiline text\narea value", "trigger": "", times_used: 0,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"original": { "var": "show_3", "value": "True", "trigger": "" },
|
|
218
|
+
"var": "show_3", "value": "True", "trigger": "", times_used: 0,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"original": { "var": "show_2", "value": "True", "trigger": "" },
|
|
222
|
+
"var": "show_2", "value": "True", "trigger": "", times_used: 0,
|
|
223
|
+
},
|
|
224
|
+
];
|
|
225
|
+
|
|
226
|
+
// Missing 'trigger' column
|
|
227
|
+
tables.missing_sought = [
|
|
228
|
+
{ "var": "direct_showifs", "value": "True" },
|
|
229
|
+
{ "var": "button_continue", "value": "True" },
|
|
230
|
+
{ "var": "buttons_other", "value": "button_2" },
|
|
231
|
+
{ "var": "buttons_yesnomaybe", "value": "True" },
|
|
232
|
+
{ "var": "checkboxes_other", "value": "checkbox_other_opt_1" },
|
|
233
|
+
{ "var": "checkboxes_other", "value": "checkbox_other_opt_2" },
|
|
234
|
+
{ "var": "checkboxes_other", "value": "checkbox_other_opt_3" },
|
|
235
|
+
{ "var": "checkboxes_yesno", "value": "True" },
|
|
236
|
+
{ "var": "direct_standard_fields", "value": "True" },
|
|
237
|
+
{ "var": "dropdown_test", "value": "dropdown_opt_2" },
|
|
238
|
+
{ "var": "radio_other", "value": "radio_other_opt_3" },
|
|
239
|
+
{ "var": "radio_yesno", "value": "False" },
|
|
240
|
+
{ "var": "screen_features", "value": "True" },
|
|
241
|
+
{ "var": "showif_checkbox_yesno", "value": "False" },
|
|
242
|
+
{ "var": "showif_checkboxes_other['showif_checkboxes_nota_1']", "value": "false" },
|
|
243
|
+
{ "var": "showif_checkboxes_other['showif_checkboxes_nota_2']", "value": "true" },
|
|
244
|
+
{ "var": "showif_dropdown", "value": "showif_dropdown_1" },
|
|
245
|
+
{ "var": "showif_radio_other", "value": "showif_radio_multi_2" },
|
|
246
|
+
{ "var": "showif_text_input", "value": "Show if text input value" },
|
|
247
|
+
{ "var": "showif_textarea", "value": "Show if\nmultiline text\narea value" },
|
|
248
|
+
{ "var": "showif_yesnoradio", "value": "True" },
|
|
249
|
+
{ "var": "text_input", "value": "Regular text input field value" },
|
|
250
|
+
{ "var": "textarea", "value": "Multiline text\narea value" },
|
|
251
|
+
{ "var": "show_3", "value": "True" },
|
|
252
|
+
{ "var": "show_2", "value": "True" },
|
|
253
|
+
];
|
|
254
|
+
|
|
255
|
+
// 'trigger' should be added
|
|
256
|
+
tables.missing_sought_to_normalized_formatting = [
|
|
257
|
+
{
|
|
258
|
+
"original": { "var": "direct_showifs", "value": "True", },
|
|
259
|
+
"var": "direct_showifs", "value": "True", "trigger": "", times_used: 0,
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"original": { "var": "button_continue", "value": "True", },
|
|
263
|
+
"var": "button_continue", "value": "True", "trigger": "", times_used: 0,
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"original": { "var": "buttons_other", "value": "button_2", },
|
|
267
|
+
"var": "buttons_other", "value": "button_2", "trigger": "", times_used: 0,
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"original": { "var": "buttons_yesnomaybe", "value": "True", },
|
|
271
|
+
"var": "buttons_yesnomaybe", "value": "True", "trigger": "", times_used: 0,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"original": { "var": "checkboxes_other", "value": "checkbox_other_opt_1", },
|
|
275
|
+
"var": "checkboxes_other", "value": "checkbox_other_opt_1", "trigger": "", times_used: 0,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"original": { "var": "checkboxes_other", "value": "checkbox_other_opt_2", },
|
|
279
|
+
"var": "checkboxes_other", "value": "checkbox_other_opt_2", "trigger": "", times_used: 0,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"original": { "var": "checkboxes_other", "value": "checkbox_other_opt_3", },
|
|
283
|
+
"var": "checkboxes_other", "value": "checkbox_other_opt_3", "trigger": "", times_used: 0,
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"original": { "var": "checkboxes_yesno", "value": "True", },
|
|
287
|
+
"var": "checkboxes_yesno", "value": "True", "trigger": "", times_used: 0,
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"original": { "var": "direct_standard_fields", "value": "True", },
|
|
291
|
+
"var": "direct_standard_fields", "value": "True", "trigger": "", times_used: 0,
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"original": { "var": "dropdown_test", "value": "dropdown_opt_2", },
|
|
295
|
+
"var": "dropdown_test", "value": "dropdown_opt_2", "trigger": "", times_used: 0,
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"original": { "var": "radio_other", "value": "radio_other_opt_3", },
|
|
299
|
+
"var": "radio_other", "value": "radio_other_opt_3", "trigger": "", times_used: 0,
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"original": { "var": "radio_yesno", "value": "False", },
|
|
303
|
+
"var": "radio_yesno", "value": "False", "trigger": "", times_used: 0,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"original": { "var": "screen_features", "value": "True", },
|
|
307
|
+
"var": "screen_features", "value": "True", "trigger": "", times_used: 0,
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"original": { "var": "showif_checkbox_yesno", "value": "False", },
|
|
311
|
+
"var": "showif_checkbox_yesno", "value": "False", "trigger": "", times_used: 0,
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"original": { "var": "showif_checkboxes_other['showif_checkboxes_nota_1']", "value": "false", },
|
|
315
|
+
"var": "showif_checkboxes_other['showif_checkboxes_nota_1']", "value": "false", "trigger": "", times_used: 0,
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"original": { "var": "showif_checkboxes_other['showif_checkboxes_nota_2']", "value": "true", },
|
|
319
|
+
"var": "showif_checkboxes_other['showif_checkboxes_nota_2']", "value": "true", "trigger": "", times_used: 0,
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"original": { "var": "showif_dropdown", "value": "showif_dropdown_1", },
|
|
323
|
+
"var": "showif_dropdown", "value": "showif_dropdown_1", "trigger": "", times_used: 0,
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"original": { "var": "showif_radio_other", "value": "showif_radio_multi_2", },
|
|
327
|
+
"var": "showif_radio_other", "value": "showif_radio_multi_2", "trigger": "", times_used: 0,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"original": { "var": "showif_text_input", "value": "Show if text input value", },
|
|
331
|
+
"var": "showif_text_input", "value": "Show if text input value", "trigger": "", times_used: 0,
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"original": { "var": "showif_textarea", "value": "Show if\nmultiline text\narea value", },
|
|
335
|
+
"var": "showif_textarea", "value": "Show if\nmultiline text\narea value", "trigger": "", times_used: 0,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"original": { "var": "showif_yesnoradio", "value": "True", },
|
|
339
|
+
"var": "showif_yesnoradio", "value": "True", "trigger": "", times_used: 0,
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"original": { "var": "text_input", "value": "Regular text input field value", },
|
|
343
|
+
"var": "text_input", "value": "Regular text input field value", "trigger": "", times_used: 0,
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"original": { "var": "textarea", "value": "Multiline text\narea value", },
|
|
347
|
+
"var": "textarea", "value": "Multiline text\narea value", "trigger": "", times_used: 0,
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"original": { "var": "show_3", "value": "True", },
|
|
351
|
+
"var": "show_3", "value": "True", "trigger": "", times_used: 0,
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"original": { "var": "show_2", "value": "True", },
|
|
355
|
+
"var": "show_2", "value": "True", "trigger": "", times_used: 0,
|
|
356
|
+
},
|
|
357
|
+
];
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
// ============================
|
|
361
|
+
// Proxy vars (x, i, j, ...)
|
|
362
|
+
// ============================
|
|
363
|
+
// x[i].name.first
|
|
364
|
+
tables.proxies_xi = [
|
|
365
|
+
{ "trigger": "proxy_list[0].name.first", "var": "x[i].name.first", "value": "Firstname", },
|
|
366
|
+
];
|
|
367
|
+
|
|
368
|
+
// Multiple proxies by the same name are on the list (because of a loop)
|
|
369
|
+
// x[i].name.first
|
|
370
|
+
tables.proxies_multi = [
|
|
371
|
+
{ "trigger": "proxy_list[0].name.first", "var": "x[i].name.first", "value": "Firstname", },
|
|
372
|
+
{ "trigger": "proxy_list[1].name.first", "var": "x[i].name.first", "value": "Firstname", },
|
|
373
|
+
{ "trigger": "proxy_list[2].name.first", "var": "x[i].name.first", "value": "Firstname", },
|
|
374
|
+
];
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
// ============================
|
|
378
|
+
// Signature
|
|
379
|
+
// ============================
|
|
380
|
+
// Also tests that multiple signature rows only match their var
|
|
381
|
+
tables.signature = [
|
|
382
|
+
{ "trigger": "signature_2", "var": "signature_2", "value": "/sign", },
|
|
383
|
+
{ "trigger": "signature_1", "var": "signature_1", "value": "/sign", },
|
|
384
|
+
];
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
// ============================
|
|
388
|
+
// `choices:`
|
|
389
|
+
// ============================
|
|
390
|
+
// `field:` and `choices:`
|
|
391
|
+
tables.choices = [
|
|
392
|
+
{ "var": "field_and_choices", "value": "Choice 1", },
|
|
393
|
+
];
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
// ============================
|
|
397
|
+
// dropdowns created with objects
|
|
398
|
+
// ============================
|
|
399
|
+
// ```
|
|
400
|
+
// - Something: some_var
|
|
401
|
+
// datatype: object
|
|
402
|
+
// object labeler: |
|
|
403
|
+
// lambda y: y.short_label()```
|
|
404
|
+
// choices: some_obj
|
|
405
|
+
// ```
|
|
406
|
+
tables.object_dropdown = [
|
|
407
|
+
{ "var": "object_dropdown", "value": "obj_opt_2", },
|
|
408
|
+
];
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
// ============================
|
|
412
|
+
// `.there_is_another`
|
|
413
|
+
// ============================
|
|
414
|
+
tables.there_is_another = [
|
|
415
|
+
{ "var": "x.there_is_another", "value": "True", "trigger": "proxy_list.there_is_another" }
|
|
416
|
+
];
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
// ============================
|
|
420
|
+
// mixed quotes
|
|
421
|
+
// ============================
|
|
422
|
+
tables.mixed_quotes = [
|
|
423
|
+
{ "var": `double_quote_dict['double_quote_key']["dq_two"]`, "value": "True", "trigger": `double_quote_dict["double_quote_key"]` },
|
|
424
|
+
{ "var": `single_quote_dict["single_quote_key"]['sq_two']`, "value": "True", "trigger": `double_quote_dict['double_quote_key']` },
|
|
425
|
+
];
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
module.exports = tables;
|