@suffolklitlab/alkiln 5.1.0 → 5.2.1
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/CHANGELOG.md +257 -31
- package/action.yml +0 -1
- package/lib/scope.js +83 -47
- package/lib/steps.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
|
|
2
3
|
All notable changes to this project will be documented in this file.
|
|
3
4
|
|
|
4
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
@@ -43,23 +44,49 @@ Format:
|
|
|
43
44
|
-->
|
|
44
45
|
<!-- ## [Unreleased] -->
|
|
45
46
|
|
|
47
|
+
## [5.2.1] - 2023-09-29
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
- New warning message to the developer when their date string doesn't have a `/` in it.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
- Told the user the url of the interview ALKiln tried to load. See https://github.com/SuffolkLITLab/ALKiln/issues/696.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- Restored Assembly Line custom datatype three-parts dates functionality. See https://github.com/SuffolkLITLab/ALKiln/issues/764.
|
|
57
|
+
- Fixed "today" not being converted into a date for custom datatypes.
|
|
58
|
+
|
|
59
|
+
## [5.2.0] - 2023-09-16
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
- Make `I tap to continue` case insensitive to allow the author to match the capitalization of the button in Docassemble.
|
|
63
|
+
|
|
46
64
|
## [5.1.0] - 2023-08-12
|
|
65
|
+
|
|
47
66
|
### Added
|
|
67
|
+
|
|
48
68
|
- Comboboxes - can now fill in comboboxes on the latest Docassemble.
|
|
49
69
|
|
|
50
70
|
### Fixed
|
|
71
|
+
|
|
51
72
|
- Filling out a hidden field right after a date field triggered the date's calendar popup, which I believe ate the input for the next visible field.
|
|
52
73
|
|
|
53
74
|
## [5.0.2] - 2023-07-20
|
|
75
|
+
|
|
54
76
|
### Fixed
|
|
77
|
+
|
|
55
78
|
- Accept `SERVER_RELOAD_TIMEOUT_SECONDS` as an env var input in GitHub.
|
|
56
79
|
|
|
57
80
|
## [5.0.1] - 2023-07-18
|
|
81
|
+
|
|
58
82
|
### Changed
|
|
83
|
+
|
|
59
84
|
- Increment version of ALKiln that action.yml is using.
|
|
60
85
|
|
|
61
86
|
## [5.0.0] - 2023-07-18
|
|
87
|
+
|
|
62
88
|
### Added
|
|
89
|
+
|
|
63
90
|
- added additional functionality to the sign method to allow developers to take a name argument to sign on canvas: issue #596
|
|
64
91
|
- A new script: `alkiln-run`, which acts like `npm run cucumber`, but can
|
|
65
92
|
be run in any directory, not just in an npm package.
|
|
@@ -69,6 +96,7 @@ Format:
|
|
|
69
96
|
- Allow author to specify loops with only `.target_number`. e.g. to leave out `.there_are_any`. See [issue #706](https://github.com/SuffolkLITLab/ALKiln/issues/706) and Story Table documentation in docs folder.
|
|
70
97
|
|
|
71
98
|
### Changed
|
|
99
|
+
|
|
72
100
|
- BREAKING: the github action no longer runs `npm run XYZ`; it directly calls scripts,
|
|
73
101
|
e.g. `alkiln-setup`, `alkiln-run`, `alkiln-takedown`
|
|
74
102
|
- BREAKING: Remove EXTRA_LANGUAGES env var as languages are being handled through cucumber `Examples` now.
|
|
@@ -82,17 +110,19 @@ Format:
|
|
|
82
110
|
- Freeze all npm package versions.
|
|
83
111
|
|
|
84
112
|
### Fixed
|
|
85
|
-
|
|
113
|
+
|
|
114
|
+
- DOCKER UPDATE (for ALKilnInThePlayground): Allows ALKilnInThePlayground to upload files. See <https://github.com/SuffolkLITLab/docassemble-ALKilnInThePlayground/issues/18>. This may require some developers to update their system (updating their docker image) if they are below [docassemble-os 1.0.8](https://github.com/jhpyle/docassemble-os/releases/tag/v1.0.8). You can tell if you are below docassemble-os 1.0.8 if you run `docker image inspect jhpyle/docassemble | grep Created` on your host server (Lightsail, etc.) and the created date is before 2023-04-09. You can update as described in [the documentation](https://suffolklitlab.org/legal-tech-class/docs/practical-guide-docassemble/maintaining-docassemble#updates-to-the-docassemble-container). Updating to a new docker images is something that all docassemble users will have to do sometime anyway, sometimes for security.
|
|
86
115
|
- Conform upload file behavior to that of other Story Table rows - avoid erroring when field isn't set properly unless using all variables is required.
|
|
87
|
-
- Projects created in da each have a unique name. https://github.com/SuffolkLITLab/ALKiln/issues/663
|
|
88
|
-
- Shorten path names to try to accommodate limitations of windows systems while still keeping enough useful information to help devs identify the test outputs. https://github.com/SuffolkLITLab/ALKiln/issues/618
|
|
116
|
+
- Projects created in da each have a unique name. <https://github.com/SuffolkLITLab/ALKiln/issues/663>
|
|
117
|
+
- Shorten path names to try to accommodate limitations of windows systems while still keeping enough useful information to help devs identify the test outputs. <https://github.com/SuffolkLITLab/ALKiln/issues/618>
|
|
89
118
|
- Updated field decoding to handle new object field encoding. See [#711](https://github.com/SuffolkLITLab/ALKiln/issues/711)
|
|
90
119
|
- Allow multiple languages to be tested again. See [#713](https://github.com/SuffolkLITLab/ALKiln/issues/713).
|
|
91
120
|
- Fill in time fields correctly. See [#726](https://github.com/SuffolkLITLab/ALKiln/pull/726).
|
|
92
|
-
- Allow `.target_number` to be 0. See https://github.com/SuffolkLITLab/ALKiln/issues/706
|
|
93
|
-
- Use the right number of loops for `.target_number`. See https://github.com/SuffolkLITLab/ALKiln/issues/706
|
|
121
|
+
- Allow `.target_number` to be 0. See <https://github.com/SuffolkLITLab/ALKiln/issues/706>.
|
|
122
|
+
- Use the right number of loops for `.target_number`. See <https://github.com/SuffolkLITLab/ALKiln/issues/706>.
|
|
94
123
|
|
|
95
124
|
### Security
|
|
125
|
+
|
|
96
126
|
- Pass docassemble API keys through HTTP headers instead of as parameters.
|
|
97
127
|
- Parameters to certain HTTP requests are printed directly in docassemble's
|
|
98
128
|
uWSGI log, leaking API keys to actors with log access on your docassemble
|
|
@@ -100,152 +130,209 @@ Format:
|
|
|
100
130
|
- Update dependencies. See [#727](https://github.com/SuffolkLITLab/ALKiln/pull/727).
|
|
101
131
|
|
|
102
132
|
### Internal
|
|
133
|
+
|
|
103
134
|
- added a test for multiline json values (only ones set by code not by user input)
|
|
104
135
|
- added an internal section to the change log
|
|
105
136
|
|
|
106
137
|
## [4.11.1] - 2023-03-21
|
|
138
|
+
|
|
107
139
|
### Changed
|
|
140
|
+
|
|
108
141
|
- Get error data from server errors
|
|
109
142
|
|
|
110
143
|
## [4.11.0] - 2023-03-13
|
|
144
|
+
|
|
111
145
|
### Changed
|
|
112
|
-
|
|
146
|
+
|
|
147
|
+
- Shorten Axios errors to make them more readable (<https://github.com/SuffolkLITLab/ALKiln/pull/632>)
|
|
113
148
|
|
|
114
149
|
## [4.10.4] - 2023-02-15
|
|
150
|
+
|
|
115
151
|
### Added
|
|
152
|
+
|
|
116
153
|
- Contribution docs
|
|
117
154
|
|
|
118
155
|
### Fixed
|
|
119
|
-
|
|
156
|
+
|
|
157
|
+
- #511, couldn't take screenshots of signature pages <https://github.com/SuffolkLITLab/ALKiln/issues/511>
|
|
120
158
|
|
|
121
159
|
## [4.10.3] - 2023-01-11
|
|
160
|
+
|
|
122
161
|
### Removed
|
|
162
|
+
|
|
123
163
|
- Internal - ignore local test output files. Part 2 of the process out of 2.
|
|
124
164
|
|
|
125
165
|
## [4.10.2] - 2023-01-11
|
|
166
|
+
|
|
126
167
|
### Removed
|
|
168
|
+
|
|
127
169
|
- Internal - deleted unignored local files (since adding .npmignore). Part 1 of the process out of 2.
|
|
128
170
|
|
|
129
171
|
## [4.10.1] - 2023-01-07
|
|
172
|
+
|
|
130
173
|
### Changed
|
|
131
|
-
|
|
174
|
+
|
|
175
|
+
- Fix artifacts not being saved in GitHub. See <https://github.com/SuffolkLITLab/ALKiln/issues/629>.
|
|
132
176
|
- Make internal test folder names a bit simpler and more modular-izable.
|
|
133
177
|
|
|
134
178
|
## [4.10.0] - 2022-11-17
|
|
179
|
+
|
|
135
180
|
### Changed
|
|
181
|
+
|
|
136
182
|
- Don't mark `...there_in_another | False |` in story tables as invalid, as it's necessary for some
|
|
137
|
-
workflows (see https://github.com/SuffolkLITLab/ALKiln/pull/580 for a longer discussion).
|
|
183
|
+
workflows (see <https://github.com/SuffolkLITLab/ALKiln/pull/580> for a longer discussion).
|
|
138
184
|
- Explicitly **not** documented, as we don't want to encourage people to use it if it's not
|
|
139
185
|
necessary for their interviews.
|
|
140
186
|
- continuing between screens will no longer press button with the `btn-primary` class. This means
|
|
141
187
|
that it won't press "Exit", or "Restart" buttons, to avoid getting in an infinite loop.
|
|
142
188
|
- Shorten test report and artifact filenames, attempting to have fewer files whose whole paths are
|
|
143
|
-
longer than 260 characters. (See https://github.com/SuffolkLITLab/ALKiln/pull/626 for details).
|
|
189
|
+
longer than 260 characters. (See <https://github.com/SuffolkLITLab/ALKiln/pull/626> for details).
|
|
144
190
|
|
|
145
191
|
### Fixed
|
|
192
|
+
|
|
146
193
|
- Corrects the month in the artifact folder timestamp; was printing things like `81` for September
|
|
147
194
|
instead of `09`, because of a `+` being interpreted as Javascript string concatenation and not math.
|
|
148
195
|
|
|
149
196
|
## [4.9.3] - 2022-09-07
|
|
197
|
+
|
|
150
198
|
### Fixed
|
|
151
|
-
|
|
199
|
+
|
|
200
|
+
- `retry` of failed tests not implemented for developers. See <https://github.com/SuffolkLITLab/ALKiln/issues/601>.
|
|
152
201
|
|
|
153
202
|
## [4.9.2] - 2022-09-02
|
|
203
|
+
|
|
154
204
|
### Fixed
|
|
155
|
-
|
|
205
|
+
|
|
206
|
+
- Environment variables `SERVER_RELOAD_TIMEOUT_SECONDS` and `MAX_SECONDS_FOR_SERVER_RELOAD` were being used as milliseconds instead of seconds. See <https://github.com/SuffolkLITLab/ALKiln/issues/606>.
|
|
156
207
|
|
|
157
208
|
## [4.9.1] - 2022-09-01
|
|
209
|
+
|
|
158
210
|
### Fixed
|
|
159
|
-
|
|
211
|
+
|
|
212
|
+
- runtime_config.json gets created when needed when artifacts folder is created. See <https://github.com/SuffolkLITLab/ALKiln/issues/600>.
|
|
160
213
|
|
|
161
214
|
## [4.9.0] - 2022-09-01
|
|
215
|
+
|
|
162
216
|
### Changed
|
|
163
|
-
|
|
164
|
-
-
|
|
217
|
+
|
|
218
|
+
- Allow devs to test an arbitrary interview. See <https://github.com/SuffolkLITLab/ALKiln/issues/600>.
|
|
219
|
+
- Create artifacts folder even when setup has been skipped. See <https://github.com/SuffolkLITLab/ALKiln/issues/600>.
|
|
165
220
|
|
|
166
221
|
## [4.8.0] - 2022-08-30
|
|
222
|
+
|
|
167
223
|
### Changed
|
|
224
|
+
|
|
168
225
|
- Date for filenames. Format date in y-m-d format instead of d-m-y that it had by default. Include ms.
|
|
169
226
|
|
|
170
227
|
## [4.7.2] - 2022-08-09
|
|
228
|
+
|
|
171
229
|
### Changed
|
|
172
|
-
- Inform the developer when a test failure may have been caused by a server reload. See https://github.com/SuffolkLITLab/ALKiln/issues/392.
|
|
173
|
-
- Retry all failing tests once.
|
|
174
230
|
|
|
231
|
+
- Inform the developer when a test failure may have been caused by a server reload. See <https://github.com/SuffolkLITLab/ALKiln/issues/392>.
|
|
232
|
+
- Retry all failing tests once.
|
|
175
233
|
|
|
176
234
|
## [4.7.1] - 2022-08-07
|
|
235
|
+
|
|
177
236
|
### Changed
|
|
237
|
+
|
|
178
238
|
- Ensure unique folder names for random input screenshots in case developer uses multiple random steps in one Scenario.
|
|
179
239
|
- Ensure random input detects unexpected interview errors.
|
|
180
240
|
|
|
181
241
|
### Fixed
|
|
242
|
+
|
|
182
243
|
- Fix failure when signature page is the first screen.
|
|
183
244
|
- Internal tests failing even when failure status is as expected.
|
|
184
245
|
- Double printing in report of scenario failure, one of them even when Scenario was possibly non-failure, like skipped.
|
|
185
246
|
|
|
186
247
|
## [4.7.0] - 2022-07-27
|
|
248
|
+
|
|
187
249
|
### Added
|
|
250
|
+
|
|
188
251
|
- Generate random input to fill out a simple form automatically. Does not yet ensure that random screenshot folder names are unique, or that error screens are detected as errors. 4.7.1 implements those.
|
|
189
252
|
|
|
190
253
|
### Changed
|
|
254
|
+
|
|
191
255
|
- Add page id to the "Missing Variable or variables on page" error report
|
|
192
256
|
- Allows Story Tables to not include a header row, as long as they have 2 or 3 columns.
|
|
193
257
|
This isn't the suggested way at the moment, since including headers is more readable,
|
|
194
258
|
but can prevent confusing and unnecessary errors.
|
|
195
259
|
|
|
196
260
|
## [4.6.2] - 2022-06-28
|
|
261
|
+
|
|
197
262
|
### Changed
|
|
198
|
-
|
|
263
|
+
|
|
264
|
+
- Put cucumber tests' artifacts in one folder. See <https://github.com/SuffolkLITLab/ALKiln/issues/552>.
|
|
199
265
|
- Add separate artifacts dir for our own internal tests, like unit tests
|
|
200
266
|
- Abstract names of some of those artifact directories
|
|
201
267
|
|
|
202
268
|
## [4.6.1] - 2022-06-28
|
|
269
|
+
|
|
203
270
|
### Fixed
|
|
271
|
+
|
|
204
272
|
- Single dropdown fields on pages are now recognized as fields properly
|
|
205
273
|
|
|
206
274
|
## [4.6.0] - 2022-06-10
|
|
275
|
+
|
|
207
276
|
### Added
|
|
277
|
+
|
|
208
278
|
- Steps to test web accessibility either on individual page or for all subsequent pages.
|
|
209
279
|
|
|
210
280
|
## [4.5.2] - 2022-06-10
|
|
281
|
+
|
|
211
282
|
### Fixed
|
|
283
|
+
|
|
212
284
|
- (internal) Expected in report is reset properly
|
|
213
285
|
- if a test used "the Scenario report should include ...", then all tests that were
|
|
214
286
|
run after that would pass even if the test itself failed but wasn't expected to fail
|
|
215
287
|
|
|
216
288
|
## [4.5.1] - 2022-06-10
|
|
289
|
+
|
|
217
290
|
### Fixed
|
|
291
|
+
|
|
218
292
|
- Corrected some schema errors in the `action.yml` (the `run` key was specified twice, should only have been once, and `required: False` is needed
|
|
219
293
|
for optional inputs)
|
|
220
294
|
|
|
221
295
|
## [4.5.0] - 2022-05-23
|
|
296
|
+
|
|
222
297
|
### Added
|
|
298
|
+
|
|
223
299
|
- Steps that tap tabs (made using the `tabbed_templates_html` function from ALToolbox) and other arbitrary elements on the page.
|
|
224
300
|
|
|
225
301
|
## [4.4.0] - 2022-05-23
|
|
302
|
+
|
|
226
303
|
### Added
|
|
304
|
+
|
|
227
305
|
- Appends the results of the cucumber [summary formatter](https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md#summary) to the `debug_log.txt`, which includes useful stack traces into the Kiln code when tests fail.
|
|
228
306
|
|
|
229
307
|
### Fixed
|
|
308
|
+
|
|
230
309
|
- Prevent login info from being saved in the report or screenshots being taken on error. [#599](https://github.com/SuffolkLITLab/ALKiln/issues/559).
|
|
231
310
|
- Prevent error screenshots of screens that used a secret.
|
|
232
311
|
|
|
233
312
|
## [4.3.0] - 2022-04-07
|
|
313
|
+
|
|
234
314
|
### Added
|
|
315
|
+
|
|
235
316
|
- GitHub environment variable `MAX_SECONDS_FOR_SETUP` to set a custom maximum time for setup and takedown for packages that take a long time to load.
|
|
236
317
|
|
|
237
318
|
## [4.2.0] - 2022-04-05
|
|
319
|
+
|
|
238
320
|
### Changed
|
|
321
|
+
|
|
239
322
|
- Pin versions of dependencies in action.yml and package.json
|
|
240
323
|
- Change log.txt file to debug_log.txt and upload as github artifact.
|
|
241
324
|
- Update cheerio version to remove vulnerabilities.
|
|
242
325
|
|
|
243
326
|
## [4.1.1] - 2022-04-01
|
|
327
|
+
|
|
244
328
|
### Added
|
|
329
|
+
|
|
245
330
|
- Step to set vars to secret variables. That is, using environment variables while hiding the names of those variables in the report, errors, and console logs.
|
|
246
331
|
|
|
247
332
|
## [4.0.0] - 2022-03-30
|
|
333
|
+
|
|
248
334
|
### Added
|
|
335
|
+
|
|
249
336
|
- BREAKING: Add package.json creation/overwriting to action.yml. Simplify package.json.
|
|
250
337
|
- BREAKING: Add action.yml that runs most of what users' workflows run now, along with notes for a new user workflow that will take less maintainance. See #420. We need to add documentation on how to write a workflow file as it currently is if they want to take back control. Setup interview has not yet been updated with this workflow.
|
|
251
338
|
- Step: `the text in the JSON variable "variable_with_text_value" should be`. Compare JSON variable with a text value to given text. See #470. Does not accept nested values, e.g. "child.name.first". Downloads all the JSON vars to a .json file in the "downloads" artifacts.
|
|
@@ -255,6 +342,7 @@ Format:
|
|
|
255
342
|
- Add control of alkiln npm version to the action.yml
|
|
256
343
|
|
|
257
344
|
### Changed
|
|
345
|
+
|
|
258
346
|
- BREAKING: NPM package is now suffolklitlab scoped package. Refer to @suffolklitlab/alkiln from now on.
|
|
259
347
|
- BREAKING: Update to v13 of puppeteer
|
|
260
348
|
- BREAKING: Update to v7 of cucumber
|
|
@@ -265,14 +353,16 @@ Format:
|
|
|
265
353
|
- Update test setup interview to v4 of ALKiln.
|
|
266
354
|
- Remove and ignore package-lock.json so that our tests will behave more like our users' tests
|
|
267
355
|
- Add warning in steps.js for name input with too many parts. Add test in reports.
|
|
268
|
-
- fix typo in the report
|
|
356
|
+
- fix typo in the report
|
|
269
357
|
- Allow a developer to wait as a first Step. See #387.
|
|
270
358
|
|
|
271
359
|
<!-- ## [3.0.1-peer-deps.1] - 2021-12-07 -->
|
|
272
360
|
### Removed
|
|
273
|
-
|
|
361
|
+
|
|
362
|
+
- Peer dependencies and dev dependencies. Now `cucumber` is just a dependency. See <https://github.com/SuffolkLITLab/ALKiln/issues/396> for discussion. Setup interview has not been updated to remove dependencies.
|
|
274
363
|
|
|
275
364
|
### Fixed
|
|
365
|
+
|
|
276
366
|
- Proxy var story table row matches for any page containing the given variable name when there's only one row for the relevant variable. #464.
|
|
277
367
|
- Fixed interview name not allowing url parameters. #449
|
|
278
368
|
- Freeze colors npm package to before bug in both package.json and action.yml
|
|
@@ -281,222 +371,317 @@ Format:
|
|
|
281
371
|
- session_vars branch path regex not removing start of branch path
|
|
282
372
|
|
|
283
373
|
## [3.2.1] - 2022-02-09
|
|
374
|
+
|
|
284
375
|
### Fixed
|
|
376
|
+
|
|
285
377
|
- Typo in report that was messing up copy/paste of test table
|
|
286
378
|
|
|
287
379
|
## [3.2.0] - 2022-02-09
|
|
380
|
+
|
|
288
381
|
### Added
|
|
382
|
+
|
|
289
383
|
- Add Step to log into server account using GitHub SECRETs (environment variables). See #499.
|
|
290
384
|
|
|
291
385
|
## [3.1.11] - 2022-02-02
|
|
386
|
+
|
|
292
387
|
### Changed
|
|
388
|
+
|
|
293
389
|
- Handle an Assembly Line name Step value that has too many names, including a warning for the developer. Include the first three names and the last name to try to catch suffixes.
|
|
294
390
|
|
|
295
391
|
## [3.0.11] - 2022-01-25
|
|
392
|
+
|
|
296
393
|
### Added
|
|
394
|
+
|
|
297
395
|
- Step: `the text in the JSON variable "variable_with_text_value" should be`. Compare JSON variable with a text value to given text. See #470. Does not accept nested values, e.g. "child.name.first". Downloads all the JSON vars to a .json file in the "downloads" artifacts.
|
|
298
396
|
|
|
299
397
|
## [3.0.10] - 2022-01-24
|
|
398
|
+
|
|
300
399
|
### Added
|
|
400
|
+
|
|
301
401
|
- Step to log the page's JSON variables and values in the report. Future goal: save to file. See #454.
|
|
302
402
|
|
|
303
403
|
## [3.0.9] - 2022-01-10
|
|
404
|
+
|
|
304
405
|
### Security
|
|
406
|
+
|
|
305
407
|
- Install the security fix in the action's package.json as well. Because dependents have to require cucumber itself, if they're not using our action (if they have their own package.json), they're going to have to implement this fix in their repo too. That's why our fix isn't working. We'll start the process of helping developers update. We also need to deprecate all previous versions of ALKiln. See #489.
|
|
306
408
|
|
|
307
409
|
## [3.0.8] - 2022-01-10
|
|
410
|
+
|
|
308
411
|
### Security
|
|
412
|
+
|
|
309
413
|
- Fully publish the security fix in v3.0.7
|
|
310
414
|
|
|
311
415
|
## [3.0.7] - 2022-01-10
|
|
416
|
+
|
|
312
417
|
### Security
|
|
313
|
-
|
|
418
|
+
|
|
419
|
+
- Pinned colors library to 1.4.0. See <https://www.bleepingcomputer.com/news/security/dev-corrupts-npm-libs-colors-and-faker-breaking-thousands-of-apps/>. We don't use faker, so we don't need to handle that.
|
|
314
420
|
|
|
315
421
|
## [3.0.6] - 2022-01-07
|
|
422
|
+
|
|
316
423
|
### Changed
|
|
424
|
+
|
|
317
425
|
- See #371
|
|
318
426
|
- Scenario heading tags are now on a second line
|
|
319
427
|
- Artifact filenames use dashes more and are created separately from Scenario headings
|
|
320
428
|
- Scenario ids are separated from filenames and Scenario headings
|
|
321
429
|
|
|
322
430
|
## [3.0.5] - 2022-01-06
|
|
431
|
+
|
|
323
432
|
### Added
|
|
433
|
+
|
|
324
434
|
- Add action.yml that runs most of what users' workflows run now, along with notes for a new user workflow that will take less maintainance. See #420. We need to add documentation on how to write a workflow file as it currently is if they want to take back control. Setup interview has not yet been updated with this workflow.
|
|
325
435
|
- Add package.json creation/overwriting to action.yml. Simplify package.json.
|
|
326
436
|
|
|
327
437
|
<!-- ## [3.0.1-peer-deps.1] - 2021-12-07 -->
|
|
328
438
|
### Removed
|
|
329
|
-
|
|
439
|
+
|
|
440
|
+
- Peer dependencies and dev dependencies. Now `cucumber` is just a dependency. See <https://github.com/SuffolkLITLab/ALKiln/issues/396> for discussion. Setup interview has not been updated to remove dependencies.
|
|
330
441
|
|
|
331
442
|
### Fixed
|
|
443
|
+
|
|
332
444
|
- Fixed interview name not allowing url parameters. #449
|
|
333
445
|
|
|
334
446
|
## [3.0.4] - 2021-12-11
|
|
447
|
+
|
|
335
448
|
### Fixed
|
|
449
|
+
|
|
336
450
|
- Use different criteria for testing that the package was saved.
|
|
337
451
|
|
|
338
452
|
## [3.0.3] - 2021-12-11
|
|
453
|
+
|
|
339
454
|
### Fixed
|
|
340
|
-
|
|
455
|
+
|
|
456
|
+
- Implement a temporary fix for inability to pull private repos into empty da Projects. See <https://github.com/SuffolkLITLab/ALKiln/issues/417#issuecomment-991812294>
|
|
341
457
|
|
|
342
458
|
## [3.0.2] - 2021-12-10
|
|
459
|
+
|
|
343
460
|
### Changed
|
|
461
|
+
|
|
344
462
|
- Improve some error messages and handling for the new private repo workflow.
|
|
345
463
|
|
|
346
464
|
## [3.0.1] - 2021-12-10
|
|
465
|
+
|
|
347
466
|
### Fixed
|
|
348
|
-
- Allow authenticated GitHub user to pull from a private repository for which they have at least read permissions.
|
|
349
467
|
|
|
468
|
+
- Allow authenticated GitHub user to pull from a private repository for which they have at least read permissions.
|
|
350
469
|
|
|
351
470
|
## [3.0.0] - 2021-12-07
|
|
471
|
+
|
|
352
472
|
### Changed
|
|
473
|
+
|
|
353
474
|
- v3 release to update to da Bootstrap 5. Breaks for servers that have not yet updated to that da version.
|
|
354
475
|
|
|
355
476
|
## [2.7.0-pre-update-dom.4] - 2021-12-03
|
|
477
|
+
|
|
356
478
|
### Changed
|
|
479
|
+
|
|
357
480
|
- Give test resetting, a common failure point, a couple of tries and add a warning and instructions about simply re-running the tests.
|
|
358
481
|
|
|
359
482
|
## [2.7.0-pre-update-dom.3] - 2021-12-02
|
|
483
|
+
|
|
360
484
|
### Fixed
|
|
361
|
-
|
|
485
|
+
|
|
486
|
+
- Abandon puppeteer clicks and handle them all ourselves. This means people can't run a mobile device because they can't tap. It takes some implementation. See <https://stackoverflow.com/a/56547605/14144258>.
|
|
362
487
|
|
|
363
488
|
## [2.7.0-pre-update-dom.2] - 2021-12-02
|
|
489
|
+
|
|
364
490
|
### Fixed
|
|
365
|
-
|
|
491
|
+
|
|
492
|
+
- Quick fix for frequent timeout errors. See <https://github.com/SuffolkLITLab/ALKiln/issues/389#issuecomment-984844240>, Option 1 - disable cucumber timeout and, instead, handle timeout errors to allow 3 attempts to load an interview. For future development, convert to API key to check if server is restarting.
|
|
366
493
|
|
|
367
494
|
## [2.7.0-pre-update-dom] - 2021-11-22
|
|
495
|
+
|
|
368
496
|
### Changed
|
|
497
|
+
|
|
369
498
|
- Update to Bootstrap 5 Docassemble DOM changes
|
|
370
499
|
- Remove test(s?) for guessing proxy vars as we don't do that anymore #221
|
|
371
500
|
- Added instructions for using tags when running cucumber tests
|
|
372
501
|
- Handle clicking in `tapElement()` ourselves now instead of with puppeteer. See previous commit for the change.
|
|
373
502
|
|
|
374
503
|
## [2.6.0] - 2021-08-07
|
|
504
|
+
|
|
375
505
|
### Added
|
|
506
|
+
|
|
376
507
|
- 'today' and 'today - 1' for setting dates
|
|
377
508
|
|
|
378
509
|
## [2.5.4] - 2021-08-07
|
|
510
|
+
|
|
379
511
|
### Fixed
|
|
512
|
+
|
|
380
513
|
- In page load, total timeout needs to be checked in more places to give useful error message before Step fully times out.
|
|
381
514
|
|
|
382
515
|
## [2.5.3] - 2021-08-06
|
|
516
|
+
|
|
383
517
|
### Fixed
|
|
518
|
+
|
|
384
519
|
- Not giving enough time for package to load - failing too soon on error of module not found.
|
|
385
|
-
- Not waiting for package page to appear on setup: https://github.com/plocket/docassemble-cucumber/issues/367#issuecomment-892591770
|
|
520
|
+
- Not waiting for package page to appear on setup: <https://github.com/plocket/docassemble-cucumber/issues/367#issuecomment-892591770>. I believe we tried this in the past and it wasn't enough.
|
|
386
521
|
|
|
387
522
|
## [2.5.2] - 2021-08-03
|
|
523
|
+
|
|
388
524
|
### Fixed
|
|
525
|
+
|
|
389
526
|
- Wrong error when server times out on page load.
|
|
390
527
|
|
|
391
528
|
## [2.5.1] - 2021-07-31
|
|
529
|
+
|
|
392
530
|
### Added
|
|
531
|
+
|
|
393
532
|
- Tests for failed Scenarios and their reports
|
|
394
533
|
|
|
395
534
|
### Changed
|
|
535
|
+
|
|
396
536
|
- Tweak report wording
|
|
397
537
|
|
|
398
538
|
### Fixed
|
|
539
|
+
|
|
399
540
|
- Internal report check logic
|
|
400
541
|
- Loading page did not catch system error and re-trying without timeout was not robust.
|
|
401
542
|
|
|
402
543
|
## [2.5.0] - 2021-07-31
|
|
544
|
+
|
|
403
545
|
### Added
|
|
546
|
+
|
|
404
547
|
- Report line for error on load.
|
|
405
548
|
- Internal testing Step to test contents of reports include certain content.
|
|
406
549
|
- Internal testing Step to check passing tests should be passing and failing ones should be failing.
|
|
407
550
|
|
|
408
551
|
## [2.4.2] - 2021-07-31
|
|
552
|
+
|
|
409
553
|
### Fixed
|
|
554
|
+
|
|
410
555
|
- Steps that set vars (other than the story table) should fail when they can't set their var, but they did not fail.
|
|
411
556
|
|
|
412
557
|
## [2.4.1] - 2021-07-24
|
|
558
|
+
|
|
413
559
|
### Fixed
|
|
560
|
+
|
|
414
561
|
- Upload Step wasn't waiting for files to finish uploading
|
|
415
562
|
|
|
416
563
|
## [2.4.0] - 2021-07-23
|
|
564
|
+
|
|
417
565
|
### Added
|
|
566
|
+
|
|
418
567
|
- Values can be set to comma-separated list of names of files to upload to upload multiple files. Files must be in the package's 'sources' folder or in the 'tests/features' folder.
|
|
419
568
|
|
|
420
569
|
### Changed
|
|
570
|
+
|
|
421
571
|
- Increased `showif_timeout` because a hidden field missed getting set via a race condition. The only explanation we could come up with was that the field wasn't shown fast enough.
|
|
422
572
|
- Allow duplicates of '[class="file-caption-name"]' fields as they should not be dangerous.
|
|
423
573
|
|
|
424
574
|
## [2.3.0] - 2021-07-22
|
|
575
|
+
|
|
425
576
|
### Changed
|
|
577
|
+
|
|
426
578
|
- Report: List failed scenarios first, other non-passing scenarios second (should not run into those much I think), and passed scenarios last.
|
|
427
579
|
- Two internal tests adjusted to be 10 secs shorter each
|
|
428
580
|
- One internal test tag updated
|
|
429
581
|
|
|
430
582
|
### Fixed
|
|
583
|
+
|
|
431
584
|
- Some report ids not being recorded because old id from previous test was not different from new id in new scenario.
|
|
432
585
|
|
|
433
586
|
## [2.2.3] - 2021-07-18
|
|
587
|
+
|
|
434
588
|
### Changed
|
|
589
|
+
|
|
435
590
|
- Updated package-lock.json with `npm fix` based on `npm audit`
|
|
436
591
|
|
|
437
592
|
## [2.2.2] - 2021-07-16
|
|
593
|
+
|
|
438
594
|
### Fixed
|
|
595
|
+
|
|
439
596
|
- `toBase64` returns default valid base 64 value with clear name if needed
|
|
440
597
|
|
|
441
598
|
### Added
|
|
599
|
+
|
|
442
600
|
- Clarifying code comments
|
|
443
601
|
|
|
444
602
|
## [2.2.1] - 2021-07-14
|
|
603
|
+
|
|
445
604
|
### Fixed
|
|
605
|
+
|
|
446
606
|
- Variable undefined in scope.js (message)
|
|
447
607
|
|
|
448
608
|
## [2.2.0] - 2021-07-12
|
|
609
|
+
|
|
449
610
|
### Added
|
|
611
|
+
|
|
450
612
|
- Tests for reports for unexpected failures
|
|
451
613
|
|
|
452
614
|
### Changed
|
|
615
|
+
|
|
453
616
|
- Bump minor version for added timeout behavior, etc.
|
|
454
617
|
|
|
455
618
|
## [2.1.8] - 2021-07-11
|
|
619
|
+
|
|
456
620
|
### Added
|
|
621
|
+
|
|
457
622
|
- Step: Custom global timeout, #317, for when interviews know they'll need longer timeouts for such things as loading large documents.
|
|
458
623
|
|
|
459
624
|
### Changed
|
|
625
|
+
|
|
460
626
|
- Timeout is now 30 sec instead of 2 min as individual devs can set a custom timeout for their scenarios. We've made an assumption that this will be enough for most interviews and will have to see if that bears out.
|
|
461
627
|
|
|
462
628
|
## [2.1.7] - 2021-07-08
|
|
629
|
+
|
|
463
630
|
### Added
|
|
631
|
+
|
|
464
632
|
- More detailed reports that print 1. variables that were set on each page 2. all rows that set variables, and 3. all rows that weren't used
|
|
465
633
|
|
|
466
634
|
## [2.1.6] - 2021-07-07
|
|
635
|
+
|
|
467
636
|
### Added
|
|
637
|
+
|
|
468
638
|
- Backwards compatibility with `#sought_variable` element.
|
|
469
639
|
- Report tests
|
|
470
640
|
|
|
471
641
|
### Fixed
|
|
642
|
+
|
|
472
643
|
- Typo in report
|
|
473
644
|
|
|
474
645
|
## [2.1.5] - 2021-07-07
|
|
646
|
+
|
|
475
647
|
### Changed
|
|
648
|
+
|
|
476
649
|
- Not sure. Can't find this commit.
|
|
477
650
|
|
|
478
651
|
## [2.1.4] - 2021-07-06
|
|
652
|
+
|
|
479
653
|
### Fixed
|
|
654
|
+
|
|
480
655
|
- Var name typos in `scope.ensureSpecialRows()`
|
|
481
656
|
|
|
482
657
|
## [2.1.3] - 2021-07-06
|
|
658
|
+
|
|
483
659
|
### Added
|
|
660
|
+
|
|
484
661
|
- Reports now also show data about which variables were used on each page, as well as a list of which variables from a story table were used and which weren't.
|
|
485
662
|
|
|
486
663
|
## [2.1.2] - 2021-07-04
|
|
664
|
+
|
|
487
665
|
### Changed
|
|
666
|
+
|
|
488
667
|
- Refactor `scope.processVar()`, including rename
|
|
489
668
|
|
|
490
669
|
## [2.1.1] - 2021-07-04
|
|
670
|
+
|
|
491
671
|
### Changed
|
|
672
|
+
|
|
492
673
|
- Use new Buffer reference instead of old deprecated reference.
|
|
493
674
|
|
|
494
675
|
## [2.1.0] - 2021-07-01
|
|
676
|
+
|
|
495
677
|
### Added
|
|
678
|
+
|
|
496
679
|
- Support interview filenames ending in `.yml` in the first step
|
|
497
680
|
|
|
498
681
|
## [2.0.0] - 2021-06-29
|
|
682
|
+
|
|
499
683
|
### Added
|
|
684
|
+
|
|
500
685
|
- Support for `.there_is_another` loops in story tables using `.target_number`
|
|
501
686
|
- New step: 'I should see the link to' and its test.
|
|
502
687
|
- 'I get to' is available in the `And I get to the question "some id" with this data:` instead of just 'the user gets to'
|
|
@@ -507,7 +692,8 @@ Format:
|
|
|
507
692
|
- Move debug logs for getMatchingRow and getPageData to appropriate places.
|
|
508
693
|
|
|
509
694
|
### Changed
|
|
510
|
-
|
|
695
|
+
|
|
696
|
+
- Added `trigger` column to table to define trigger var (| var | value | checked | trigger |). See <https://github.com/plocket/docassemble-cucumber/issues/256>. This allows devs to use index vars and generic objects (proxy vars) freely in their interview.
|
|
511
697
|
- Tried to make element selectors more picky.
|
|
512
698
|
- Make screenshot names unique and line up alphabetically with timestamps.
|
|
513
699
|
- Allow more languages in scenario name.
|
|
@@ -518,42 +704,57 @@ Format:
|
|
|
518
704
|
- Updated tests to match new functionality.
|
|
519
705
|
|
|
520
706
|
### Deprecated
|
|
707
|
+
|
|
521
708
|
- Previous formats of the table: `| var | choice | value |` *and* `| var | value | checked |`
|
|
522
709
|
|
|
523
710
|
### Removed
|
|
711
|
+
|
|
524
712
|
- Some Steps that won't work with translations and are not currently being used by anyone. TODO: Look up and ennumerate which steps.
|
|
525
713
|
- `checked` column.
|
|
526
714
|
- `scope.getField()` and other now unused scope functionality.
|
|
527
715
|
|
|
528
716
|
### Fixed
|
|
717
|
+
|
|
529
718
|
- Assert found invalid input.
|
|
530
719
|
- 'I sign' was passing incorrect arguments.
|
|
531
720
|
- Regex testing for match to proxy var - both the regex itself being more strict and the test for a match being more predictable.
|
|
532
721
|
- #202 handles accidental mixup of single quotes for double quotes or visa versa in all columns.
|
|
533
722
|
|
|
534
723
|
## [1.3.5] - 2021-05-04
|
|
724
|
+
|
|
535
725
|
### Added
|
|
726
|
+
|
|
536
727
|
- Handles setting [AssemblyLine](https://github.com/SuffolkLITLab/docassemble-AssemblyLine) ([ALToolbox](https://github.com/SuffolkLITLab/docassemble-ALToolbox)) `BirthDate` datatype. [See example of HTML here](https://github.com/plocket/docassemble-cucumber/pull/217).
|
|
537
728
|
|
|
538
729
|
## [1.3.4] - 2021-04-21
|
|
730
|
+
|
|
539
731
|
### Fixed
|
|
732
|
+
|
|
540
733
|
- Dropdowns created with objects always fail.
|
|
541
734
|
|
|
542
735
|
## [1.3.3] - 2021-04-16
|
|
736
|
+
|
|
543
737
|
### Changed
|
|
544
|
-
|
|
738
|
+
|
|
739
|
+
- This repo no longer has an action to generate test folders and scripts in the dependant repo. From now on, devs will use the interview in <https://github.com/plocket/docassemble-ALAutomatedTestingTests> to add it themselves. Note: That interview will put the tests in the `/sources` dir. Previous repos' scripts will continue as they are.
|
|
545
740
|
|
|
546
741
|
## [1.3.2] - 2021-04-07
|
|
742
|
+
|
|
547
743
|
### Changed
|
|
744
|
+
|
|
548
745
|
- Each test run creates a unique da Project now. No need to wait for previous tests to finish.
|
|
549
746
|
|
|
550
747
|
## [1.3.1] - 2021-04-07
|
|
748
|
+
|
|
551
749
|
### Fixed
|
|
750
|
+
|
|
552
751
|
- Message about duplicate selector matches.
|
|
553
|
-
- Bump
|
|
752
|
+
- Bump *minor* version number appropriately.
|
|
554
753
|
|
|
555
754
|
## [1.2.8] - 2021-04-06
|
|
755
|
+
|
|
556
756
|
### Fixed
|
|
757
|
+
|
|
557
758
|
- Newly found race condition on 'continue'. Can replicate inside of [DBD](https://github.com/caroRob/docassemble-DeadBrokeDads2/tree/add_tests_to_separating_interview_code_etc) very consistently, but not outside of it. See [#190](https://github.com/plocket/docassemble-cucumber/issues/190).
|
|
558
759
|
- Make action buttons more permissive. Some action buttons don't lead to an event, they just have a url. See [#200](https://github.com/plocket/docassemble-cucumber/issues/200).
|
|
559
760
|
- Fix all checkboxes getting checked no matter what.
|
|
@@ -561,73 +762,98 @@ Format:
|
|
|
561
762
|
- Incorrect truthy test.
|
|
562
763
|
|
|
563
764
|
### Added
|
|
765
|
+
|
|
564
766
|
- New warning in report about variable appearing on a page in multiple places.
|
|
565
767
|
|
|
566
768
|
## [1.2.7] - 2021-04-05
|
|
769
|
+
|
|
567
770
|
### Changed
|
|
771
|
+
|
|
568
772
|
- A new table format is highly encouraged: `| var | value | checked |`. var = variable name, value = words of the value to set, checked = whether to select or unselect a checkbox (only needed for checkboxes).
|
|
569
773
|
- Basically, address much of [#158](https://github.com/plocket/docassemble-cucumber/issues/158), as noted below.
|
|
570
774
|
|
|
571
775
|
### Deprecated
|
|
776
|
+
|
|
572
777
|
- Previous version of table columns format (`| var | choice | value |`). The new version uses `| var | value | checked |`, though we do need a better name than `checked`. It will simplify the table for developers and for the code.
|
|
573
778
|
|
|
574
779
|
### Fixed
|
|
780
|
+
|
|
575
781
|
- Some proxy field var name finding
|
|
576
782
|
- Improved page var name finding in general
|
|
577
783
|
- Refactored to get all fields from the page first, then compare to a new format of table
|
|
578
784
|
|
|
579
785
|
## [1.2.6] - 2021-03-14
|
|
786
|
+
|
|
580
787
|
### Added
|
|
788
|
+
|
|
581
789
|
- Automated integrated self-testing
|
|
582
790
|
- Unit tests for getField with cheerio
|
|
583
791
|
- Refactor getField to use data
|
|
584
792
|
|
|
585
793
|
### Fixed
|
|
794
|
+
|
|
586
795
|
- Infinite loop when specific button tap causes error #168
|
|
587
796
|
- Some items not getting selected at all (scroll into view problem)
|
|
588
797
|
|
|
589
798
|
## [1.2.5] - 2021-03-06
|
|
799
|
+
|
|
590
800
|
### Fixed
|
|
801
|
+
|
|
591
802
|
- Simplest case of [index var](https://github.com/plocket/docassemble-cucumber/issues/158) (i.e. `i`) question.
|
|
592
803
|
|
|
593
804
|
## [1.2.4] - 2021-03-03
|
|
805
|
+
|
|
594
806
|
### Fixed
|
|
807
|
+
|
|
595
808
|
- Race condition where puppeteer thinks the page has progressed but it really hasn't.
|
|
596
809
|
|
|
597
810
|
## [1.2.3] - 2021-02-07
|
|
811
|
+
|
|
598
812
|
### Fixed
|
|
813
|
+
|
|
599
814
|
- Options of dropdown fields created with objects are not found [#149](https://github.com/plocket/docassemble-cucumber/issues/149)
|
|
600
815
|
|
|
601
816
|
## [1.2.2] - 2021-02-03
|
|
817
|
+
|
|
602
818
|
### Fixed
|
|
819
|
+
|
|
603
820
|
- Signature field rows (`/sign`) are not used up all in one loop
|
|
604
821
|
|
|
605
822
|
### Added
|
|
823
|
+
|
|
606
824
|
- .env-example file to files that will be pushed to dependants
|
|
607
825
|
|
|
608
826
|
## [1.2.1] - 2021-01-26
|
|
827
|
+
|
|
609
828
|
### Fixed
|
|
829
|
+
|
|
610
830
|
- #79, race condition breaks story table scenarios (ex: MADE `rental agreement`)
|
|
611
831
|
- #115, order of table items matter - continue button pressed too soon
|
|
612
832
|
- #139, `scope.getField()` `set_to` doesn't find all the fields
|
|
613
833
|
|
|
614
|
-
|
|
615
834
|
## [1.2.0] - 2021-01-13
|
|
835
|
+
|
|
616
836
|
### Changed
|
|
837
|
+
|
|
617
838
|
- Reports are saved as `.txt` files instead of `.md` files.
|
|
618
839
|
- Reports are prettier.
|
|
619
840
|
- Story table: If there are only two columns needed in a table row, the table doesn't care which columns the second item is in. This is to allow generated tests to work without a human editing them.
|
|
620
841
|
- Automatically generated language tags now handle spaces.
|
|
621
842
|
|
|
622
843
|
### Fixed
|
|
844
|
+
|
|
623
845
|
- Broken error message - showed the wrong error.
|
|
624
846
|
|
|
625
847
|
## [1.1.0] - 2021-01-13
|
|
848
|
+
|
|
626
849
|
### Changed
|
|
850
|
+
|
|
627
851
|
- Skipped this version somehow. Was sure it was in there somewhere...
|
|
628
852
|
|
|
629
853
|
## [1.0.0] - 2021-01-13
|
|
854
|
+
|
|
630
855
|
### Added
|
|
856
|
+
|
|
631
857
|
- Steps for setting variables, interacting with elements, and observing (to be documented elsewhere TODO: add link)
|
|
632
858
|
- 'Story' table - a Step with a cucumber table that can set several variables until a specified `question id` is reached
|
|
633
859
|
- Translations support - many Steps that work with any language, including the 'story' table
|
package/action.yml
CHANGED
|
@@ -18,7 +18,6 @@ inputs:
|
|
|
18
18
|
MAX_SECONDS_FOR_SETUP:
|
|
19
19
|
description: "Amount of time to give the Project to upload your package's GitHub code."
|
|
20
20
|
required: false
|
|
21
|
-
default: '120'
|
|
22
21
|
SERVER_RELOAD_TIMEOUT_SECONDS:
|
|
23
22
|
description: "Max amount of time to give the server to reload if it needs to"
|
|
24
23
|
required: false
|
package/lib/scope.js
CHANGED
|
@@ -616,22 +616,22 @@ module.exports = {
|
|
|
616
616
|
* https://github.com/puppeteer/puppeteer/issues/299 and
|
|
617
617
|
*/
|
|
618
618
|
|
|
619
|
+
// If file has finished downloading
|
|
620
|
+
if ( scope.downloadComplete ) {
|
|
621
|
+
// reset the flag and resolve
|
|
622
|
+
scope.downloadComplete = false;
|
|
623
|
+
return true;
|
|
624
|
+
}
|
|
625
|
+
|
|
619
626
|
// Stop/resolve if too much time has passed
|
|
620
627
|
let expirationTime = scope.timeout - 200; // ms
|
|
621
628
|
if ( !endTime ) { endTime = new Date((new Date()).getTime() + expirationTime); }
|
|
622
629
|
let diff = endTime.getTime() - Date.now();
|
|
623
630
|
if ( diff <= 0 ) { return false; }
|
|
624
631
|
|
|
625
|
-
// If time hasn't expired
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
scope.downloadComplete = false;
|
|
629
|
-
return true;
|
|
630
|
-
} else {
|
|
631
|
-
// Otherwise wait and then check again
|
|
632
|
-
await scope.page.waitForTimeout( 100 );
|
|
633
|
-
await scope.detectDownloadComplete(scope, endTime);
|
|
634
|
-
}
|
|
632
|
+
// If time hasn't expired, wait and then check again
|
|
633
|
+
await scope.page.waitForTimeout( 100 );
|
|
634
|
+
await scope.detectDownloadComplete(scope, endTime);
|
|
635
635
|
|
|
636
636
|
return false;
|
|
637
637
|
},
|
|
@@ -732,11 +732,6 @@ module.exports = {
|
|
|
732
732
|
/* Try to load the page. Should we also pass a `timeout` arg or just
|
|
733
733
|
* use scope.timeout? */
|
|
734
734
|
|
|
735
|
-
await scope.addToReport(scope,{
|
|
736
|
-
type: `row`,
|
|
737
|
-
value: `Trying to load the interview`
|
|
738
|
-
});
|
|
739
|
-
|
|
740
735
|
let interview_url = null;
|
|
741
736
|
// If the file is already a full url, just use that arbitrary url
|
|
742
737
|
if ( /^http/.test( file_name ) ) {
|
|
@@ -752,7 +747,11 @@ module.exports = {
|
|
|
752
747
|
let base_url = await get_base_interview_url();
|
|
753
748
|
interview_url = `${ base_url }${ file_name }`;
|
|
754
749
|
}
|
|
755
|
-
|
|
750
|
+
|
|
751
|
+
await scope.addToReport(scope,{
|
|
752
|
+
type: `row`,
|
|
753
|
+
value: `Trying to load the interview at "${interview_url}"`
|
|
754
|
+
});
|
|
756
755
|
|
|
757
756
|
if ( !scope.page ) { scope.page = await scope.browser.newPage(); }
|
|
758
757
|
|
|
@@ -1477,11 +1476,6 @@ module.exports = {
|
|
|
1477
1476
|
*/
|
|
1478
1477
|
let row_used = null;
|
|
1479
1478
|
|
|
1480
|
-
// Skip hidden fields right away. When a date field was above a combobox,
|
|
1481
|
-
// interacting with the hidden field caused the date field to open its
|
|
1482
|
-
// calendar which blocked input to the combobox
|
|
1483
|
-
if ( field.type === `hidden` ) { return row_used; }
|
|
1484
|
-
|
|
1485
1479
|
let matching_input_rows = await scope.getMatchingRows( scope, { var_data, field });
|
|
1486
1480
|
|
|
1487
1481
|
// Nothing to set if there are no matching table rows
|
|
@@ -1597,8 +1591,16 @@ module.exports = {
|
|
|
1597
1591
|
row_was_used = await scope.setCustomDatatype[ custom_datatype ]( scope, { handle: custom_handle, answer });
|
|
1598
1592
|
} else {
|
|
1599
1593
|
// If no custom datatype, set a regular field
|
|
1600
|
-
|
|
1601
|
-
|
|
1594
|
+
|
|
1595
|
+
// Skip hidden fields. When a `show if` date field is above a combobox,
|
|
1596
|
+
// interacting with the hidden field causes the date field to open its
|
|
1597
|
+
// calendar which blocks input to the combobox
|
|
1598
|
+
if ( field.type === `hidden` ) {
|
|
1599
|
+
row_was_used = false;
|
|
1600
|
+
} else {
|
|
1601
|
+
row_was_used = await scope.enter_answer[ field.tag ]( scope, { handle, answer });
|
|
1602
|
+
}
|
|
1603
|
+
} // ends if custom datatype
|
|
1602
1604
|
|
|
1603
1605
|
return row_was_used;
|
|
1604
1606
|
}, // Ends scope.funnel_the_answer()
|
|
@@ -1614,8 +1616,12 @@ module.exports = {
|
|
|
1614
1616
|
|
|
1615
1617
|
// If it doesn't have the right format
|
|
1616
1618
|
if ( answer === null || !answer.includes(`/`) ) {
|
|
1617
|
-
//
|
|
1618
|
-
|
|
1619
|
+
// Return field unused.
|
|
1620
|
+
await scope.addToReport( scope, {
|
|
1621
|
+
type: `warning`,
|
|
1622
|
+
value: `Invalid date. Value given: "${ answer }".`
|
|
1623
|
+
});
|
|
1624
|
+
return false;
|
|
1619
1625
|
}
|
|
1620
1626
|
|
|
1621
1627
|
let date_parts = answer.split(`/`);
|
|
@@ -1636,18 +1642,20 @@ module.exports = {
|
|
|
1636
1642
|
handle: field,
|
|
1637
1643
|
answer: date_parts[ field_i ]
|
|
1638
1644
|
});
|
|
1645
|
+
await handle.press(`Tab`);
|
|
1639
1646
|
}
|
|
1640
1647
|
|
|
1641
1648
|
} // For each field
|
|
1642
1649
|
|
|
1643
1650
|
await scope.afterStep( scope );
|
|
1651
|
+
return true;
|
|
1644
1652
|
}, // Ends scope.setCustomDatatype.al_date()
|
|
1645
1653
|
|
|
1646
1654
|
BirthDate: async function ( scope, { handle, answer }) {
|
|
1647
1655
|
/** Given a date of the format 'mm/dd/yyyy' and the handle of the
|
|
1648
1656
|
* custom field container, sets the ALToolbox custom birthdate
|
|
1649
1657
|
* field values. */
|
|
1650
|
-
|
|
1658
|
+
answer = await scope.today_to_date(scope, { date: answer });
|
|
1651
1659
|
await scope.setCustomDatatype.al_date( scope, { handle, answer })
|
|
1652
1660
|
}, // Ends scope.setCustomDatatype.BirthDate()
|
|
1653
1661
|
|
|
@@ -1655,6 +1663,7 @@ module.exports = {
|
|
|
1655
1663
|
/** Given a date of the format 'mm/dd/yyyy' and the handle of the
|
|
1656
1664
|
* custom field container, sets the ALToolbox custom ThreePartsDate
|
|
1657
1665
|
* field values. */
|
|
1666
|
+
answer = await scope.today_to_date(scope, { date: answer });
|
|
1658
1667
|
await scope.setCustomDatatype.al_date( scope, { handle, answer })
|
|
1659
1668
|
}, // Ends scope.setCustomDatatype.ThreePartsDate()
|
|
1660
1669
|
|
|
@@ -1729,36 +1738,20 @@ module.exports = {
|
|
|
1729
1738
|
await scope.afterStep(scope, { waitForShowIf: true });
|
|
1730
1739
|
|
|
1731
1740
|
} else if (type == `date`) {
|
|
1732
|
-
let answer_date = answer;
|
|
1733
|
-
// If the date is specified in the format "today" or "today + 2" or "today-1"
|
|
1734
|
-
// it will need some pre-processing.
|
|
1735
|
-
if (answer.indexOf(`today`) !== -1) {
|
|
1736
|
-
// Find out how many days to add/subtract
|
|
1737
|
-
let date_delta = answer.replace(/\s/g, '');
|
|
1738
|
-
date_delta = date_delta.match(/today([+-]\d+)?/)[1];
|
|
1739
|
-
date_delta = date_delta == undefined ? 0 : date_delta;
|
|
1740
|
-
date_delta = parseInt(date_delta);
|
|
1741
|
-
// Get today's date
|
|
1742
|
-
answer_date = new Date();
|
|
1743
|
-
// Add/subtract required number of days
|
|
1744
|
-
answer_date.setDate(answer_date.getDate() + date_delta);
|
|
1745
|
-
// Convert to the docassemble date field format: mm/dd/yyyy
|
|
1746
|
-
// Reference: https://gomakethings.com/setting-a-date-input-to-todays-date-with-vanilla-js/
|
|
1747
|
-
answer_date = ((answer_date.getMonth() + 1).toString().padStart(2, 0) + '/' +
|
|
1748
|
-
answer_date.getDate().toString().padStart(2, 0) + '/' +
|
|
1749
|
-
answer_date.getFullYear().toString());
|
|
1750
|
-
}
|
|
1741
|
+
let answer_date = await scope.today_to_date(scope, { date: answer });
|
|
1751
1742
|
await scope.setText( scope, { handle, answer: answer_date });
|
|
1743
|
+
await handle.press(`Tab`);
|
|
1752
1744
|
await scope.afterStep(scope, { waitForShowIf: true });
|
|
1753
1745
|
} else if (type == `time`) {
|
|
1754
1746
|
// Authors should enter the time like 12:34 PM, but we shouldn't type ":", space, or M.
|
|
1755
1747
|
let answer_time = answer.replace(":", "").replace(" ", "").replace("M", "");
|
|
1756
1748
|
await handle.focus();
|
|
1757
1749
|
await handle.type( answer );
|
|
1758
|
-
await handle.press(
|
|
1750
|
+
await handle.press(`Enter`);
|
|
1759
1751
|
await scope.afterStep(scope, { waitForShowIf: true });
|
|
1760
1752
|
} else {
|
|
1761
1753
|
await scope.setText( scope, { handle, answer });
|
|
1754
|
+
await handle.press(`Tab`);
|
|
1762
1755
|
await scope.afterStep(scope, { waitForShowIf: true });
|
|
1763
1756
|
}
|
|
1764
1757
|
|
|
@@ -1774,7 +1767,50 @@ module.exports = {
|
|
|
1774
1767
|
return;
|
|
1775
1768
|
},
|
|
1776
1769
|
|
|
1777
|
-
}, // ends scope.enter_answer
|
|
1770
|
+
}, // ends scope.enter_answer()
|
|
1771
|
+
|
|
1772
|
+
today_to_date: async function ( scope, { date }) {
|
|
1773
|
+
/** Return `date` or, if the date is specified in the format
|
|
1774
|
+
* "today" or "today + 2" or "today-1", return a date of the format
|
|
1775
|
+
* "mm/dd/yyyy".
|
|
1776
|
+
*
|
|
1777
|
+
* @param scope { obj } REQUIRED. Object with test state.
|
|
1778
|
+
* @param date { str } REQUIRED. Input from the developer.
|
|
1779
|
+
*
|
|
1780
|
+
* @returns { str } `date` or "today" math as date str
|
|
1781
|
+
*
|
|
1782
|
+
* WARNING: If the developer is counting on date boundaries to trigger
|
|
1783
|
+
* other logic then timezone differences may interfere with that. They
|
|
1784
|
+
* should:
|
|
1785
|
+
*
|
|
1786
|
+
* 1. Test with a day well within the date range they're testing instead
|
|
1787
|
+
* of near a boundary. For example, test 8 days from now instead of 10.
|
|
1788
|
+
* This is because their test may run around 12am and thus be vulnerable
|
|
1789
|
+
* to failure.
|
|
1790
|
+
* 2. Warn the user explicitly and let them know when they need to file by
|
|
1791
|
+
* in case the user doesn't know and files a few days from the day they filled
|
|
1792
|
+
* out the form.
|
|
1793
|
+
*/
|
|
1794
|
+
let valid_date = date;
|
|
1795
|
+
if (date.indexOf(`today`) !== -1) {
|
|
1796
|
+
// Find out how many days to add/subtract
|
|
1797
|
+
let date_delta = date.replace(/\s/g, '');
|
|
1798
|
+
date_delta = date_delta.match(/today([+-]\d+)?/)[1];
|
|
1799
|
+
date_delta = date_delta == undefined ? 0 : date_delta;
|
|
1800
|
+
date_delta = parseInt(date_delta);
|
|
1801
|
+
// Get today's date
|
|
1802
|
+
valid_date = new Date();
|
|
1803
|
+
// Add/subtract required number of days
|
|
1804
|
+
valid_date.setDate(valid_date.getDate() + date_delta);
|
|
1805
|
+
// Convert to the docassemble date field format: mm/dd/yyyy
|
|
1806
|
+
// Reference: https://gomakethings.com/setting-a-date-input-to-todays-date-with-vanilla-js/
|
|
1807
|
+
valid_date = ((valid_date.getMonth() + 1).toString().padStart(2, 0) + '/' +
|
|
1808
|
+
valid_date.getDate().toString().padStart(2, 0) + '/' +
|
|
1809
|
+
valid_date.getFullYear().toString());
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
return valid_date;
|
|
1813
|
+
}, // Ends scope.today_to_date()
|
|
1778
1814
|
|
|
1779
1815
|
uploadFiles: async function ( scope, { handle, answer }) {
|
|
1780
1816
|
/* Try to upload one or more files to a file-type input field.
|
package/lib/steps.js
CHANGED
|
@@ -203,6 +203,7 @@ Given(/I start the interview at "([^"]+)"/, {timeout: -1}, async (file_name) =>
|
|
|
203
203
|
// at any one time since each step completes synchronously
|
|
204
204
|
|
|
205
205
|
// If response has a file in it that matches the file we are downloading
|
|
206
|
+
// Sadly, 'content-disposition' isn't working. We're not sure what will.
|
|
206
207
|
if ( response.headers()['content-disposition'] && (response.headers()['content-disposition']).includes(`attachment;filename=${scope.toDownload}`) ) {
|
|
207
208
|
// We're choosing to avoid removing the event listener in case removal
|
|
208
209
|
// would prevent downloading other files. The listener should get
|
|
@@ -722,7 +723,7 @@ Then(/the "([^"]+)" link opens a working page/, { timeout: -1 }, async ( linkTex
|
|
|
722
723
|
);
|
|
723
724
|
});
|
|
724
725
|
|
|
725
|
-
When(
|
|
726
|
+
When(/I tap to continue/i, { timeout: -1 }, async () => {
|
|
726
727
|
// Any selectors for this seem somewhat precarious
|
|
727
728
|
// No data will cause an automatic continue when `ensure_navigation` is true
|
|
728
729
|
|