@suffolklitlab/alkiln 5.0.2-feat-github-server-6 → 5.0.2-feat-github-server-8

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 (47) hide show
  1. package/.github/workflows/github_server.yml +5 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/action.yml +25 -24
  4. package/github_server/action.yml +46 -6
  5. package/lib/docassemble/startserver.js +6 -6
  6. package/lib/scope.js +1 -2
  7. package/package.json +1 -1
  8. package/setup.py +2 -2
  9. package/docassemble/ALKiln/__init__.py +0 -1
  10. package/docassemble/ALKiln/data/questions/AL_tests.yml +0 -40
  11. package/docassemble/ALKiln/data/questions/all_tests.yml +0 -312
  12. package/docassemble/ALKiln/data/questions/test.yml +0 -14
  13. package/docassemble/ALKiln/data/questions/test_date_and_time.yml +0 -34
  14. package/docassemble/ALKiln/data/questions/test_decoding.yml +0 -101
  15. package/docassemble/ALKiln/data/questions/test_kickout.yml +0 -37
  16. package/docassemble/ALKiln/data/questions/test_languages.yml +0 -26
  17. package/docassemble/ALKiln/data/questions/test_longest_filepath.yml +0 -19
  18. package/docassemble/ALKiln/data/questions/test_loops.yml +0 -66
  19. package/docassemble/ALKiln/data/questions/test_missing_var_error_screen.yml +0 -9
  20. package/docassemble/ALKiln/data/questions/test_random_input.yml +0 -83
  21. package/docassemble/ALKiln/data/questions/test_secret_vars.yml +0 -32
  22. package/docassemble/ALKiln/data/questions/test_signature.yml +0 -25
  23. package/docassemble/ALKiln/data/questions/test_taps.yml +0 -43
  24. package/docassemble/ALKiln/data/questions/test_trigger.yml +0 -25
  25. package/docassemble/ALKiln/data/questions/url_args.yml +0 -33
  26. package/docassemble/ALKiln/data/sources/README.md +0 -4
  27. package/docassemble/ALKiln/data/sources/ar.xlsx +0 -0
  28. package/docassemble/ALKiln/data/sources/assembly_line.feature +0 -43
  29. package/docassemble/ALKiln/data/sources/es.xlsx +0 -0
  30. package/docassemble/ALKiln/data/sources/establishing_steps.feature +0 -62
  31. package/docassemble/ALKiln/data/sources/example_test.feature +0 -11
  32. package/docassemble/ALKiln/data/sources/filepaths.feature +0 -9
  33. package/docassemble/ALKiln/data/sources/interactive_steps.feature +0 -172
  34. package/docassemble/ALKiln/data/sources/languages.feature +0 -36
  35. package/docassemble/ALKiln/data/sources/observation_steps.feature +0 -174
  36. package/docassemble/ALKiln/data/sources/random_input.feature +0 -36
  37. package/docassemble/ALKiln/data/sources/reload.feature +0 -155
  38. package/docassemble/ALKiln/data/sources/reports.feature +0 -574
  39. package/docassemble/ALKiln/data/sources/some_png_1.png +0 -0
  40. package/docassemble/ALKiln/data/sources/some_png_2.png +0 -0
  41. package/docassemble/ALKiln/data/sources/story_table_formats.feature +0 -125
  42. package/docassemble/ALKiln/data/sources/story_tables.feature +0 -139
  43. package/docassemble/ALKiln/data/static/README.md +0 -4
  44. package/docassemble/ALKiln/data/static/styles.css +0 -46
  45. package/docassemble/ALKiln/data/templates/README.md +0 -3
  46. package/docassemble/ALKiln/data/templates/simple.pdf +0 -0
  47. package/tmp.bash +0 -7
@@ -49,6 +49,10 @@ jobs:
49
49
  CONFIG_CONTENTS: "${{ secrets.CONFIG_CONTENTS }}"
50
50
  - run: echo "Finished starting the GitHub server"
51
51
 
52
+ ## Temp
53
+ #- name: Setup tmate session
54
+ # uses: mxschmitt/action-tmate@v3
55
+
52
56
  - name: "Run ALKiln tests"
53
57
  if: ${{ success() }}
54
58
  uses: ./
@@ -56,6 +60,6 @@ jobs:
56
60
  SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}"
57
61
  DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
58
62
  INSTALL_METHOD: "server"
59
- ALKILN_VERSION: "5.0.2-feat-github-server-6"
63
+ ALKILN_VERSION: "5.0.2-feat-github-server-8"
60
64
  - run: echo "Finished running ALKiln tests"
61
65
 
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
 
package/action.yml CHANGED
@@ -53,7 +53,7 @@ runs:
53
53
  echo -e "\nALKiln version is $ALKILN_VERSION\nRepo is $REPO_URL\nBranch ref is $BRANCH_PATH\nMAX_SECONDS_FOR_SETUP is $MAX_SECONDS_FOR_SETUP\nSERVER_RELOAD_TIMEOUT_SECONDS is $SERVER_RELOAD_TIMEOUT_SECONDS\n"
54
54
  shell: bash
55
55
 
56
- # Install node
56
+ # Install
57
57
  - name: "ALKiln: Install node packages"
58
58
  uses: actions/setup-node@v3
59
59
  with:
@@ -81,33 +81,34 @@ runs:
81
81
  if: ${{ inputs.INSTALL_METHOD == 'server' && failure() }}
82
82
  shell: bash
83
83
 
84
- # debugging
85
- - name: Setup tmate session
86
- uses: mxschmitt/action-tmate@v3
84
+ ## debugging
85
+ #- name: Setup tmate session
86
+ # uses: mxschmitt/action-tmate@v3
87
87
 
88
88
  ############
89
89
  ##### !!! WARNING: RESTORE CODE FOR TAGS
90
90
  ############
91
- ## run tests
92
- #- name: "ALKiln: Run tests"
93
- # if: ${{ success() }}
94
- # run: alkiln-run @e6 or @al1
95
- # #run: alkiln-run ${{ github.event.inputs.tags && format('{0}', github.event.inputs.tags) }}
96
- # shell: bash
97
- #
98
- ## on playground, delete project
99
- #- name: "ALKiln: Try to delete the project from the playground of the docassemble test account."
100
- # if: ${{ inputs.INSTALL_METHOD == 'playground' }}
101
- # run: alkiln-takedown
102
- # shell: bash
103
- #
104
- ## Upload artifacts that subscribers can download on the Actions summary page
105
- #- name: "ALKiln: Upload artifacts folder"
106
- # if: ${{ always() }}
107
- # uses: actions/upload-artifact@v3
108
- # with:
109
- # name: ${{ env.ARTIFACT_NAME }}
110
- # path: ./alkiln-*
91
+ # run tests
92
+ - name: "ALKiln: Run tests"
93
+ if: ${{ success() }}
94
+ run: alkiln-run @e6 or @al1
95
+ shell: bash
96
+
97
+ # run: alkiln-run ${{ github.event.inputs.tags && format('{0}', github.event.inputs.tags) }}
98
+
99
+ # on playground, delete project
100
+ - name: "ALKiln: Try to delete the project from the playground of the docassemble test account."
101
+ if: ${{ inputs.INSTALL_METHOD == 'playground' }}
102
+ run: alkiln-takedown
103
+ shell: bash
104
+
105
+ # Upload artifacts that subscribers can download on the Actions summary page
106
+ - name: "ALKiln: Upload artifacts folder"
107
+ if: ${{ always() }}
108
+ uses: actions/upload-artifact@v3
109
+ with:
110
+ name: ${{ env.ARTIFACT_NAME }}
111
+ path: ./alkiln-*
111
112
 
112
113
  # ##################################
113
114
  # # A developer's workflow should look similar to the below
@@ -1,6 +1,12 @@
1
1
  name: "ALKiln/github_server: Isolated docassemble tests"
2
2
  description: "Download and start up a temporary docassemble server on GitHub's servers, in an isolated environment. Avoids docassemble reload errors and other external factors."
3
3
 
4
+ # Wat?
5
+ # https://github.com/SuffolkLITLab/ALKiln/actions/runs/5912900256/job/16036751264#step:4:188
6
+ # Had no completion messages, but it exited with an error anyway
7
+ # Took 121 seconds
8
+ # The rerun of the test completed that step just fine, though it took less time
9
+ # Took 120 and was fine: https://github.com/SuffolkLITLab/ALKiln/actions/runs/5913167036/job/16037288791
4
10
 
5
11
  inputs:
6
12
  CONFIG_CONTENTS:
@@ -27,6 +33,9 @@ runs:
27
33
  run: |
28
34
  echo "DA_ADMIN_API_KEY=abcd1234abcd1234abcd5678abdc5678" >> $GITHUB_ENV
29
35
  echo "MAX_SECONDS_FOR_DOCKER=${{ inputs.MAX_SECONDS_FOR_DOCKER }}" >> $GITHUB_ENV
36
+ echo "CLONE_URL=${{ github.server_url }}/${{ github.repository }}.git" >> $GITHUB_ENV
37
+ echo "OWNER_AND_REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV
38
+ echo "BRANCH_REF=${{ github.ref }}" >> $GITHUB_ENV
30
39
  shell: bash
31
40
  - id: api_key_output_step
32
41
  run: echo "::set-output name=DOCASSEMBLE_DEVELOPER_API_KEY::$DA_ADMIN_API_KEY"
@@ -43,12 +52,12 @@ runs:
43
52
  # github_server: Wait for server to start
44
53
 
45
54
  # Reset the SECONDS variable
46
- SECONDS=60
55
+ SECONDS=0
47
56
  # Wait 1 minute before pinging the server constantly
48
- sleep $SECONDS
57
+ sleep 60
49
58
 
50
- # Use a variable we can control to avoid race conditions from
51
- # preventing the success log message.
59
+ # Use a variable instead of checking $result so we can control to avoid race
60
+ # conditions from preventing the success log message.
52
61
  ready="false"
53
62
 
54
63
  while [[ $ready == "false" ]]; do
@@ -62,8 +71,8 @@ runs:
62
71
  break
63
72
  fi
64
73
 
65
- # Set the variable to a new string value in each iteration
66
- result=$(curl -s localhost)
74
+ ## Set the variable to a new string value in each iteration
75
+ #result=$(curl -s localhost)
67
76
 
68
77
  # Check if the string includes the desired text
69
78
  if [[ ! $result == *"Docassemble is starting"* ]]; then
@@ -76,6 +85,37 @@ runs:
76
85
 
77
86
  done
78
87
  shell: bash
88
+
89
+ - name: Install the package
90
+ run: |
91
+ echo $CLONE_URL
92
+ git clone $CLONE_URL
93
+
94
+ # Split the full repository name by '/' and get the last element (repo name)
95
+ IFS='/' read -ra repo_parts <<< "$OWNER_AND_REPO_NAME"
96
+ repo_name=${repo_parts[-1]}
97
+ echo $repo_name
98
+ cd $repo_name
99
+
100
+ echo "branch ref $BRANCH_REF"
101
+ ref_name=$BRANCH_REF
102
+ branch_name="${ref_name#refs/heads/}"
103
+ echo "branch name: $branch_name"
104
+ git checkout -b $branch_name
105
+ git fetch origin $branch_name
106
+ git reset --hard origin/$branch_name
107
+
108
+ cd ..
109
+ pip install docassemblecli
110
+ dainstall $repo_name --apiurl http://localhost --apikey $DA_ADMIN_API_KEY
111
+
112
+ ## Below here is just for development
113
+ #container_name=$(docker ps --format '{{.Names}}' | head -n 1)
114
+ #echo $container_name
115
+ #docker exec -it "$container_name /bin/bash"
116
+ #echo "ls /usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble"
117
+ shell: bash
118
+
79
119
  - name: Docker logs
80
120
  if: ${{ always() }}
81
121
  # TODO: create an arifact for this instead
@@ -56,12 +56,12 @@ const startserver = async () => {
56
56
  await browser.close();
57
57
  */
58
58
 
59
- let task_id = await da_i.install_on_server();
60
- if (task_id) {
61
- console.log("Waiting...")
62
- await da_i.wait_for_package_to_restart(task_id);
63
- }
64
- console.log("Done!")
59
+ // let task_id = await da_i.install_on_server();
60
+ // if (task_id) {
61
+ // console.log("Waiting...")
62
+ // await da_i.wait_for_package_to_restart(task_id);
63
+ // }
64
+ // console.log("Done!")
65
65
  session_vars.save_install_type("server");
66
66
 
67
67
  }; // Ends startserver();
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-8",
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!