@suffolklitlab/alkiln 5.0.2-feat-github-server-6 โ†’ 5.0.2-feat-github-server-7

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 (46) hide show
  1. package/.github/workflows/github_server.yml +1 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/docassemble/setup.py +61 -0
  4. package/github_server/action.yml +2 -2
  5. package/lib/scope.js +1 -2
  6. package/package.json +1 -1
  7. package/setup.py +2 -2
  8. package/docassemble/ALKiln/__init__.py +0 -1
  9. package/docassemble/ALKiln/data/questions/AL_tests.yml +0 -40
  10. package/docassemble/ALKiln/data/questions/all_tests.yml +0 -312
  11. package/docassemble/ALKiln/data/questions/test.yml +0 -14
  12. package/docassemble/ALKiln/data/questions/test_date_and_time.yml +0 -34
  13. package/docassemble/ALKiln/data/questions/test_decoding.yml +0 -101
  14. package/docassemble/ALKiln/data/questions/test_kickout.yml +0 -37
  15. package/docassemble/ALKiln/data/questions/test_languages.yml +0 -26
  16. package/docassemble/ALKiln/data/questions/test_longest_filepath.yml +0 -19
  17. package/docassemble/ALKiln/data/questions/test_loops.yml +0 -66
  18. package/docassemble/ALKiln/data/questions/test_missing_var_error_screen.yml +0 -9
  19. package/docassemble/ALKiln/data/questions/test_random_input.yml +0 -83
  20. package/docassemble/ALKiln/data/questions/test_secret_vars.yml +0 -32
  21. package/docassemble/ALKiln/data/questions/test_signature.yml +0 -25
  22. package/docassemble/ALKiln/data/questions/test_taps.yml +0 -43
  23. package/docassemble/ALKiln/data/questions/test_trigger.yml +0 -25
  24. package/docassemble/ALKiln/data/questions/url_args.yml +0 -33
  25. package/docassemble/ALKiln/data/sources/README.md +0 -4
  26. package/docassemble/ALKiln/data/sources/ar.xlsx +0 -0
  27. package/docassemble/ALKiln/data/sources/assembly_line.feature +0 -43
  28. package/docassemble/ALKiln/data/sources/es.xlsx +0 -0
  29. package/docassemble/ALKiln/data/sources/establishing_steps.feature +0 -62
  30. package/docassemble/ALKiln/data/sources/example_test.feature +0 -11
  31. package/docassemble/ALKiln/data/sources/filepaths.feature +0 -9
  32. package/docassemble/ALKiln/data/sources/interactive_steps.feature +0 -172
  33. package/docassemble/ALKiln/data/sources/languages.feature +0 -36
  34. package/docassemble/ALKiln/data/sources/observation_steps.feature +0 -174
  35. package/docassemble/ALKiln/data/sources/random_input.feature +0 -36
  36. package/docassemble/ALKiln/data/sources/reload.feature +0 -155
  37. package/docassemble/ALKiln/data/sources/reports.feature +0 -574
  38. package/docassemble/ALKiln/data/sources/some_png_1.png +0 -0
  39. package/docassemble/ALKiln/data/sources/some_png_2.png +0 -0
  40. package/docassemble/ALKiln/data/sources/story_table_formats.feature +0 -125
  41. package/docassemble/ALKiln/data/sources/story_tables.feature +0 -139
  42. package/docassemble/ALKiln/data/static/README.md +0 -4
  43. package/docassemble/ALKiln/data/static/styles.css +0 -46
  44. package/docassemble/ALKiln/data/templates/README.md +0 -3
  45. package/docassemble/ALKiln/data/templates/simple.pdf +0 -0
  46. package/tmp.bash +0 -7
@@ -56,6 +56,6 @@ jobs:
56
56
  SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}"
57
57
  DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
58
58
  INSTALL_METHOD: "server"
59
- ALKILN_VERSION: "5.0.2-feat-github-server-6"
59
+ ALKILN_VERSION: "5.0.2-feat-github-server-7"
60
60
  - run: echo "Finished running ALKiln tests"
61
61
 
package/CONTRIBUTING.md CHANGED
@@ -194,7 +194,7 @@ Our `./action.yml` is a [composite action](https://docs.github.com/en/actions/cr
194
194
 
195
195
  ### Internal tests
196
196
 
197
- We have our own docassemble package in our repo to test our own end-to-end tests. Most of what the package needs is in `./docassemble`. That docassemble package is what the test setup pulls into the docassemble server. Our internal end-to-end cucumber tests are `.feature` files that are stored in `./docassemble/ALKilnTests/data/sources`. The interview (online form) `.yml` files that those `.feature` files use are also deep in the `./docassemble` package. You probably won't be touching the interview files. If you get curious, feel free to ask us.
197
+ We have our own docassemble package in our repo to test our own end-to-end tests. Most of what the package needs is in `./docassemble`. That docassemble package is what the test setup pulls into the docassemble server. Our internal end-to-end cucumber tests are `.feature` files that are stored in `./docassemble/ALKiln/data/sources`. The interview (online form) `.yml` files that those `.feature` files use are also deep in the `./docassemble` package. You probably won't be touching the interview files. If you get curious, feel free to ask us.
198
198
 
199
199
  There are other files the docassemble package needs, like `./setup.py`, so if you see them around, don't worry about them.
200
200
 
@@ -0,0 +1,61 @@
1
+ import os
2
+ import sys
3
+ from setuptools import setup, find_packages
4
+ from fnmatch import fnmatchcase
5
+ from distutils.util import convert_path
6
+
7
+ standard_exclude = ('*.pyc', '*~', '.*', '*.bak', '*.swp*')
8
+ standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info')
9
+
10
+ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_directories=standard_exclude_directories):
11
+ out = {}
12
+ stack = [(convert_path(where), '', package)]
13
+ while stack:
14
+ where, prefix, package = stack.pop(0)
15
+ for name in os.listdir(where):
16
+ fn = os.path.join(where, name)
17
+ if os.path.isdir(fn):
18
+ bad_name = False
19
+ for pattern in exclude_directories:
20
+ if (fnmatchcase(name, pattern)
21
+ or fn.lower() == pattern.lower()):
22
+ bad_name = True
23
+ break
24
+ if bad_name:
25
+ continue
26
+ if os.path.isfile(os.path.join(fn, '__init__.py')):
27
+ if not package:
28
+ new_package = name
29
+ else:
30
+ new_package = package + '.' + name
31
+ stack.append((fn, '', new_package))
32
+ else:
33
+ stack.append((fn, prefix + name + '/', package))
34
+ else:
35
+ bad_name = False
36
+ for pattern in exclude:
37
+ if (fnmatchcase(name, pattern)
38
+ or fn.lower() == pattern.lower()):
39
+ bad_name = True
40
+ break
41
+ if bad_name:
42
+ continue
43
+ out.setdefault(package, []).append(prefix+name)
44
+ return out
45
+
46
+ setup(name='docassemble.ALKiln',
47
+ version='0.0.1',
48
+ description=('A docassemble extension.'),
49
+ long_description='# docassemble.ALKiln\r\n\r\nA docassemble extension.\r\n\r\nALKiln, or Assembly Line Kiln, is an open source project that helps [docassemble](https://docassemble.org/) developers create automated tests for their interviews (online forms). It works well with the [Document Assembly Line Project](https://suffolklitlab.org/docassemble-AssemblyLine-documentation) but is independent of it.\r\n\r\n',
50
+ long_description_content_type='text/markdown',
51
+ author='plocket',
52
+ author_email='52798256+plocket@users.noreply.github.com',
53
+ license='The MIT License (MIT)',
54
+ url='https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/alkiln',
55
+ packages=find_packages(),
56
+ namespace_packages=['docassemble'],
57
+ install_requires=[],
58
+ zip_safe=False,
59
+ package_data=find_package_data(where='docassemble/ALKiln/', package='docassemble.ALKiln'),
60
+ )
61
+
@@ -43,9 +43,9 @@ runs:
43
43
  # github_server: Wait for server to start
44
44
 
45
45
  # Reset the SECONDS variable
46
- SECONDS=60
46
+ SECONDS=0
47
47
  # Wait 1 minute before pinging the server constantly
48
- sleep $SECONDS
48
+ sleep 60
49
49
 
50
50
  # Use a variable we can control to avoid race conditions from
51
51
  # preventing the success log message.
package/lib/scope.js CHANGED
@@ -755,8 +755,7 @@ module.exports = {
755
755
  if ( session_vars.get_debug() ) { console.log( `interview_url:`, interview_url ); }
756
756
 
757
757
  if ( !scope.page ) { scope.page = await scope.browser.newPage(); }
758
-
759
- interview_url = `http://localhost/interview?new_session=1&i=docassemble.ALKilnTests%3Adata/questions/AL_tests.yml`
758
+
760
759
  console.log(`interview_url:`, interview_url);
761
760
 
762
761
  // TODO: implement and use scope.handle_possible_timeout()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.0.2-feat-github-server-6",
3
+ "version": "5.0.2-feat-github-server-7",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
package/setup.py CHANGED
@@ -42,7 +42,7 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d
42
42
  out.setdefault(package, []).append(prefix+name)
43
43
  return out
44
44
 
45
- setup(name='docassemble.ALKilnTests',
45
+ setup(name='docassemble.ALKiln',
46
46
  version='1.0.0',
47
47
  description=('A docassemble extension for testing the ALKiln integrated testing framework.'),
48
48
  long_description='# ALKiln support package\r\n\r\nAssembly Line Kiln (ALKiln) is a framework for automatically testing **any** [docassemble](https://docassemble.org/) package using GitHub. ALKiln is being developed as part of the SuffolkLITLab Document Assembly Line project. See [documentation for kiln](https://suffolklitlab.github.io/docassemble-AssemblyLine-documentation/docs/automated_integrated_testing).\r\n\r\nThis package supports ALKiln in different ways.\r\n\r\n## Tool to set up testing\r\n\r\n[Tap here to set up automated integrated testing for your docassemble interview](https://apps-dev.suffolklitlab.org/start/test-setup/).\r\n\r\nThis repo contains a step-by-step form that a developer can use to set up automated integrated testing for **any** docassemble package. It requires, among other things, a docassemble account and a temporary GitHub personal access token with correct permissions. It will add necessary GitHub secrets, make a new branch, push necessary files to that branch, and make a PR with that branch.\r\n\r\n',
@@ -55,6 +55,6 @@ setup(name='docassemble.ALKilnTests',
55
55
  namespace_packages=['docassemble'],
56
56
  install_requires=['docassemble.ALToolbox>=0.5.1'],
57
57
  zip_safe=False,
58
- package_data=find_package_data(where='docassemble/ALKilnTests/', package='docassemble.ALKilnTests'),
58
+ package_data=find_package_data(where='docassemble/ALKiln/', package='docassemble.ALKiln'),
59
59
  )
60
60
 
@@ -1 +0,0 @@
1
- __version__ = '1.0.0'
@@ -1,40 +0,0 @@
1
- metadata:
2
- title: Test testing AssemblyLine-specific Steps
3
- short title: Test ALKiln for AL
4
- comment: Test the AssemblyLine automated integrated testing library for packages that use AssemblyLine itself
5
- ---
6
- include:
7
- - docassemble.AssemblyLine:al_package.yml
8
- ---
9
- # Necessary to tell us what the sought var is on each page
10
- # Every interview that wants testing will need to have an element like this
11
- default screen parts:
12
- post: |
13
- <div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
14
- ---
15
- id: interview order
16
- mandatory: True
17
- code: |
18
- users[0].name.first
19
- users[0].address.address
20
- users[1].name.first
21
- end
22
- ---
23
- id: field code mix
24
- sets:
25
- - users[i].name.first
26
- question: |
27
- Mix of code and proxy var
28
- subquestion: |
29
- The name fields variables will be using `users[0]` while the last field
30
- will be using `users[i]`. The sought variable will be using
31
- `users[0]`. The testing framework needs to be able to handle that.
32
- fields:
33
- - code: |
34
- users[i].name_fields()
35
- - A proxy var: users[i].proxy_var
36
- ---
37
- id: end
38
- event: end
39
- question: Great test!
40
- ---
@@ -1,312 +0,0 @@
1
- metadata:
2
- title: Test testing library
3
- short title: Test ALKiln
4
- comment: Test the automated integrated testing library created with the AssemblyLine project
5
- ---
6
- features:
7
- css:
8
- - styles.css
9
- ---
10
- # Necessary to tell us what the sought var is on each page
11
- # Every interview that wants testing will need to have an element like this
12
- default screen parts:
13
- post: |
14
- <div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
15
- ---
16
- mandatory: True
17
- id: interview order
18
- code: |
19
- upload_files_visible
20
- double_quote_dict["double_quote_key"]
21
- direct_standard_fields
22
- direct_showifs
23
- object_checkboxes_test
24
- buttons_yesnomaybe
25
- buttons_other
26
- button_continue
27
- screen_features
28
- proxy_list.gather()
29
- signature_1
30
- signature_2
31
- see_simple_doc
32
-
33
- button_event_action
34
- single_dropdown_field
35
- end
36
- ---
37
- id: upload files
38
- question: |
39
- Upload a file
40
- subquestion: |
41
- [https://github.com/plocket/docassemble-ALAutomatedTestingTests/issues/151](https://github.com/plocket/docassemble-ALAutomatedTestingTests/issues/151)
42
- fields:
43
- - Upload file field: upload_files_visible
44
- datatype: files
45
- required: False
46
- maximum image size: 1024
47
- image upload type: jpeg
48
- accept: |
49
- "image/png, image/jpg, .doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,.pdf"
50
- - Show other file upload: show_upload
51
- datatype: yesno
52
- - Hidden upload field: upload_files_hidden
53
- show if: show_upload
54
- datatype: files
55
- required: False
56
- maximum image size: 1024
57
- image upload type: jpeg
58
- accept: |
59
- "image/png, image/jpg, .doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,.pdf"
60
- ---
61
- id: group of complex fields
62
- question: |
63
- Some complex fields
64
- fields:
65
- - Singly quoted key: single_quote_dict['single_quote_key']
66
- datatype: checkboxes
67
- required: False
68
- none of the above: False
69
- choices:
70
- - 1: sq_one
71
- - 2: sq_two
72
- - 3: sq_three
73
- - Doubly quoted key: double_quote_dict["double_quote_key"]
74
- datatype: checkboxes
75
- required: False
76
- none of the above: False
77
- choices:
78
- - 1: dq_one
79
- - 2: dq_two
80
- - 3: dq_three
81
- ---
82
- id: direct standard fields
83
- continue button field: direct_standard_fields
84
- question: |
85
- Direct standard fields
86
- subquestion: |
87
- Excludes proxy vars (x, i, j, etc.) or choices created with objects.
88
- fields:
89
- - checkboxes (yesno): checkboxes_yesno
90
- datatype: yesno
91
- # TODO: Add checkbox yesno to leave blank
92
- - checkboxes (other): checkboxes_other
93
- datatype: checkboxes
94
- choices:
95
- - checkboxes opt 1: checkbox_other_opt_1
96
- - checkboxes opt 2: checkbox_other_opt_2
97
- - checkboxes opt 3: checkbox_other_opt_3
98
- # TODO: Add checkbox (other) to test 'none of the above'
99
- - radio (yesno): radio_yesno
100
- datatype: yesnoradio
101
- # TODO: Add radio yesno to choose 'no'
102
- - radio (other): radio_other
103
- datatype: radio
104
- choices:
105
- - radio opt 1: radio_other_opt_1
106
- - radio opt 2: radio_other_opt_2
107
- - radio opt 3: radio_other_opt_3
108
- # Same DOM as `datatype: area`
109
- - text input: text_input
110
- - textarea: textarea
111
- input type: area
112
- - date field: date_input
113
- datatype: date
114
- required: False
115
- - dropdown: dropdown_test
116
- datatype: dropdown
117
- choices:
118
- - dropdown opt 1: dropdown_opt_1
119
- - dropdown opt 2: dropdown_opt_2
120
- - dropdown opt 3: dropdown_opt_3
121
- ---
122
- id: showifs
123
- continue button field: direct_showifs
124
- question: |
125
- Reveal showifs
126
- subquestion: |
127
- We start only seeing layer 1, the first question. All other layers are hidden to test finding various hidden fields in the DOM.
128
-
129
- TODO:
130
-
131
- - object
132
- - object_checkbox
133
-
134
- No showifs: yesnomaybe: (buttons), buttons: (other), continue button field:
135
- fields:
136
- - Show layer 2: show_2
137
- datatype: yesno
138
- - Show layer 3: show_3
139
- datatype: yesno
140
- show if: show_2
141
- # TODO: Add checkbox yesno to leave blank
142
- - showif checkbox yesno: showif_checkbox_yesno
143
- datatype: yesno
144
- show if: show_3
145
- # A checkbox's none of the above `for` value is unique
146
- - showif checkboxes (multiple): showif_checkboxes_other
147
- datatype: checkboxes
148
- choices:
149
- - showif checkbox nota 1: showif_checkboxes_nota_1
150
- - showif checkbox nota 2: showif_checkboxes_nota_2
151
- - showif checkbox nota 3: showif_checkboxes_nota_3
152
- show if: show_3
153
- # TODO: Add checkbox (other) to test 'none of the above'
154
- - showif yesnoradio: showif_yesnoradio
155
- datatype: yesnoradio
156
- show if: show_3
157
- # TODO: Add radio yesno to choose 'no'
158
- - showif radio (multiple): showif_radio_other
159
- datatype: radio
160
- choices:
161
- - showif radio multi 1: showif_radio_multi_1
162
- - showif radio multi 2: showif_radio_multi_2
163
- - showif radio multi 3: showif_radio_multi_3
164
- show if: show_3
165
- - showif text input: showif_text_input
166
- show if: show_3
167
- - showif text input: showif_textarea
168
- datatype: area
169
- show if: show_3
170
- - showif dropdown: showif_dropdown
171
- show if: show_3
172
- choices:
173
- - showif dropdown opt 1: showif_dropdown_1
174
- - showif dropdown opt 2: showif_dropdown_2
175
- - showif dropdown opt 3: showif_dropdown_3
176
- - showif dropdown opt 4: showif_dropdown_4
177
- ---
178
- objects:
179
- - obj_chkbx_opt_1: DAObject
180
- - obj_chkbx_opt_2: DAObject
181
- - obj_chkbx_opt_3: DAObject
182
- - obj_opt_1: DAObject
183
- - obj_opt_2: DAObject
184
- - obj_opt_3: DAObject
185
- ---
186
- code: |
187
- obj_chkbx_opt_1.name = 'obj_chkbx_opt_1'
188
- obj_chkbx_opt_2.name = 'obj_chkbx_opt_2'
189
- obj_chkbx_opt_3.name = 'obj_chkbx_opt_3'
190
- obj_opt_1.name = 'obj_opt_1'
191
- obj_opt_2.name = 'obj_opt_2'
192
- obj_opt_3.name = 'obj_opt_3'
193
- ---
194
- id: object checkboxes
195
- question: |
196
- Objects
197
- fields:
198
- - Object checkboxes: object_checkboxes_test
199
- datatype: object_checkboxes
200
- choices:
201
- - obj_chkbx_opt_1
202
- - obj_chkbx_opt_2
203
- - obj_chkbx_opt_3
204
- - Object dropdown: object_dropdown
205
- datatype: object
206
- choices:
207
- - obj_opt_1
208
- - obj_opt_2
209
- - obj_opt_3
210
- ---
211
- id: buttons yesnomaybe
212
- question: |
213
- Button (yes/no/maybe)
214
- yesnomaybe: buttons_yesnomaybe
215
- ---
216
- id: buttons other
217
- question: |
218
- Button (other)
219
- field: buttons_other
220
- buttons:
221
- - button 1: button_1
222
- - button 2: button_2
223
- - button 3: button_3
224
- ---
225
- id: button continue
226
- continue button field: button_continue
227
- question: |
228
- Button (continue)
229
- ---
230
- id: screen features
231
- continue button field: screen_features
232
- question: |
233
- Other screen features
234
- subquestion: |
235
- * [Link to external page](http://ecosia.org/). Its value is always the same.
236
- * [Link: reload the page](${ interview_url() }). Its value changes.
237
- * {Term} (working).
238
- * {Broken term}.
239
- terms:
240
- term: |
241
- A term is a word that you click on if you don't know what the definition is.
242
- ---
243
- objects:
244
- - proxy_list: DAList.using(object_type=Individual, there_are_any=True)
245
- ---
246
- id: proxy vars
247
- generic object: DAList
248
- question: |
249
- Proxy var ${ i + 1 }
250
- fields:
251
- - ${ ordinal(i) } proxy name: x[i].name.first
252
- ---
253
- id: is there another generic
254
- generic object: DAList
255
- question: |
256
- Is there another proxy var?
257
- yesno: x.there_is_another
258
- ---
259
- objects:
260
- - single_quote_dict: DADict
261
- - double_quote_dict: DADict
262
- ---
263
- id: first signature
264
- question: |
265
- Signature 1
266
- signature: signature_1
267
- ---
268
- id: second signature
269
- question: |
270
- Signature 2
271
- signature: signature_2
272
- ---
273
- id: button event action
274
- question: |
275
- Button (event action)
276
- field: button_event_action
277
- action buttons:
278
- - label: Do not pass go
279
- action: end
280
- icon: laugh-wink
281
- ---
282
- id: Single dropdown field
283
- question: Single dropdown field
284
- field: single_dropdown_field
285
- dropdown:
286
- - Efile and serve: efile_and_serve
287
- - Email: email
288
- - Mail: mail
289
- - Hand delivery: hand_delivery
290
- ---
291
- id: simple doc
292
- question: |
293
- Document
294
- subquestion: |
295
- [Tap to download](${ simple_doc.pdf.url_for( attachment=True ) })
296
- continue button field: see_simple_doc
297
- ---
298
- id: simple attachment
299
- attachment:
300
- variable name: simple_doc
301
- pdf template file: simple.pdf
302
- filename: simple-doc
303
- skip undefined: True
304
- editable: False
305
- fields:
306
- - "proxy1_name_first": ${ proxy_list[0].name.first }
307
- - "proxy1_signature": ${ proxy_list[0].signature }
308
- ---
309
- id: the end
310
- event: end
311
- question: |
312
- Congratulations! Tests have passed!
@@ -1,14 +0,0 @@
1
- metadata:
2
- title: Test testing library
3
- short title: Test ALKiln
4
- comment: Test the automated integrated testing library for AssemblyLine
5
- ---
6
- mandatory: True
7
- id: interview order
8
- code: |
9
- end
10
- ---
11
- id: the end
12
- event: end
13
- question: |
14
- Congradulations! Tests have passed!
@@ -1,34 +0,0 @@
1
- metadata:
2
- title: Test testing library - date and time
3
- short title: Test ALKiln
4
- ---
5
- features:
6
- css:
7
- - styles.css
8
- ---
9
- # Necessary to tell us what the sought var is on each page
10
- # Every interview that wants testing will need to have an element like this
11
- default screen parts:
12
- post: |
13
- <div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
14
- ---
15
- mandatory: True
16
- id: interview order
17
- code: |
18
- date_and_time
19
- end
20
- ---
21
- id: date and time
22
- continue button field: date_and_time
23
- question: |
24
- Date and time
25
- fields:
26
- - date field: date_input
27
- datatype: date
28
- - time field: time_input
29
- datatype: time
30
- ---
31
- id: the end
32
- event: end
33
- question: |
34
- Congratulations! Tests have passed!
@@ -1,101 +0,0 @@
1
- ---
2
- mandatory: True
3
- id: interview order
4
- code: |
5
- #object_multiselect_test
6
- #multiselect_test
7
- object_radio_field
8
- #object_checkboxes_test
9
- #checkbox_dict['single_quote_key']
10
- end_screen
11
- ---
12
- id: object multiselect
13
- question: |
14
- Object Multiselect
15
- fields:
16
- - Object multiselect: object_multiselect_test
17
- datatype: object_multiselect
18
- choices:
19
- - obj_opt_1
20
- - obj_opt_2
21
- - obj_opt_3
22
- ---
23
- id: multiselect
24
- question: |
25
- Multiselect
26
- fields:
27
- - Multiselect: multiselect_test
28
- datatype: multiselect
29
- choices:
30
- - "hi"
31
- - "there"
32
- - "dear"
33
- - "reader"
34
- ---
35
- id: object-radio-field
36
- question: Object radio field
37
- fields:
38
- - object radio field: object_radio_field
39
- datatype: object_radio
40
- choices:
41
- - object_radio_choice_one
42
- - object_radio_choice_two
43
- ---
44
- id: object checkboxes
45
- question: |
46
- Objects
47
- fields:
48
- - Object checkboxes: object_checkboxes_test
49
- datatype: object_checkboxes
50
- choices:
51
- - obj_chkbx_opt_1
52
- - obj_chkbx_opt_2
53
- - obj_chkbx_opt_3
54
- - Object dropdown: object_dropdown
55
- datatype: object
56
- choices:
57
- - obj_opt_1
58
- - obj_opt_2
59
- - obj_opt_3
60
- ---
61
- id: group of complex fields
62
- question: |
63
- Some complex fields
64
- fields:
65
- - Singly quoted key: checkbox_dict['single_quote_key']
66
- datatype: checkboxes
67
- none of the above: False
68
- choices:
69
- - 1: sq_one
70
- - 2: sq_two
71
- - 'weird unicode': "๐Ÿณ๐Ÿงด๐Ÿฏ๐Ÿฅซ๐Ÿ…๐Ÿ—Ž๐Ÿน‡๐Ÿ—ท๐ŸŒฒ๐Ÿฏต"
72
- ---
73
- id: end screen
74
- event: end_screen
75
- question: All done!
76
- ---
77
- objects:
78
- - checkbox_dict: DADict
79
- - object_radio_choice_one: Individual
80
- - object_radio_choice_two: Individual
81
- - obj_chkbx_opt_1: DAObject
82
- - obj_chkbx_opt_2: DAObject
83
- - obj_chkbx_opt_3: DAObject
84
- - obj_opt_1: DAObject
85
- - obj_opt_2: DAObject
86
- - obj_opt_3: DAObject
87
- ---
88
- code: |
89
- obj_chkbx_opt_1.name = 'obj_chkbx_opt_1'
90
- obj_chkbx_opt_2.name = 'obj_chkbx_opt_2'
91
- obj_chkbx_opt_3.name = 'obj_chkbx_opt_3'
92
- obj_opt_1.name = 'obj_opt_1'
93
- obj_opt_2.name = 'obj_opt_2'
94
- obj_opt_3.name = 'obj_opt_3'
95
- ---
96
- code: |
97
- object_radio_choice_one.name.first = 'Bob'
98
- object_radio_choice_one.name.last = 'FirstChoice'
99
- object_radio_choice_two.name.first = 'Joe'
100
- object_radio_choice_two.name.last = 'SecondChoice'
101
- ---
@@ -1,37 +0,0 @@
1
- ---
2
- mandatory: True
3
- code: |
4
- show_first_screen
5
- user_choice
6
- if user_choice == 'wrong':
7
- kickout_screen
8
- else:
9
- success_screen
10
- ---
11
- id: show first screen
12
- question: |
13
- Welcome to this interview!
14
- continue button field: show_first_screen
15
- ---
16
- id: make choice
17
- question: |
18
- What is your choice?
19
- fields:
20
- - My choice is...: user_choice
21
- choices:
22
- - The Correct choice: correct
23
- - The Wrong choice: wrong
24
- ---
25
- id: kickout screen
26
- event: kickout_screen
27
- question: |
28
- You answered incorrectly
29
- buttons:
30
- - Restart: restart
31
- - Exit: exit
32
- url: https://courtformsonline.org
33
- ---
34
- id: success screen
35
- event: success_screen
36
- question: |
37
- You answered correctly!