@suffolklitlab/alkiln 5.1.0-sources-6 → 5.2.0
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 +245 -34
- package/action.yml +0 -1
- package/lib/run_cucumber.js +32 -63
- package/lib/scope.js +45 -13
- package/lib/steps.js +1 -1
- package/lib/utils/session_vars.js +0 -57
- package/npm-shrinkwrap.json +2 -16
- package/package.json +1 -2
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).
|
|
@@ -41,27 +42,38 @@ Format:
|
|
|
41
42
|
### Internal
|
|
42
43
|
-
|
|
43
44
|
-->
|
|
44
|
-
## [Unreleased]
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
<!-- ## [Unreleased] -->
|
|
46
|
+
|
|
47
|
+
## [5.2.0] - 2023-09-16
|
|
48
|
+
### Changed
|
|
49
|
+
- Make `I tap to continue` case insensitive to allow the author to match the capitalization of the button in Docassemble.
|
|
47
50
|
|
|
48
51
|
## [5.1.0] - 2023-08-12
|
|
52
|
+
|
|
49
53
|
### Added
|
|
54
|
+
|
|
50
55
|
- Comboboxes - can now fill in comboboxes on the latest Docassemble.
|
|
51
56
|
|
|
52
57
|
### Fixed
|
|
58
|
+
|
|
53
59
|
- 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.
|
|
54
60
|
|
|
55
61
|
## [5.0.2] - 2023-07-20
|
|
62
|
+
|
|
56
63
|
### Fixed
|
|
64
|
+
|
|
57
65
|
- Accept `SERVER_RELOAD_TIMEOUT_SECONDS` as an env var input in GitHub.
|
|
58
66
|
|
|
59
67
|
## [5.0.1] - 2023-07-18
|
|
68
|
+
|
|
60
69
|
### Changed
|
|
70
|
+
|
|
61
71
|
- Increment version of ALKiln that action.yml is using.
|
|
62
72
|
|
|
63
73
|
## [5.0.0] - 2023-07-18
|
|
74
|
+
|
|
64
75
|
### Added
|
|
76
|
+
|
|
65
77
|
- added additional functionality to the sign method to allow developers to take a name argument to sign on canvas: issue #596
|
|
66
78
|
- A new script: `alkiln-run`, which acts like `npm run cucumber`, but can
|
|
67
79
|
be run in any directory, not just in an npm package.
|
|
@@ -71,6 +83,7 @@ Format:
|
|
|
71
83
|
- 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.
|
|
72
84
|
|
|
73
85
|
### Changed
|
|
86
|
+
|
|
74
87
|
- BREAKING: the github action no longer runs `npm run XYZ`; it directly calls scripts,
|
|
75
88
|
e.g. `alkiln-setup`, `alkiln-run`, `alkiln-takedown`
|
|
76
89
|
- BREAKING: Remove EXTRA_LANGUAGES env var as languages are being handled through cucumber `Examples` now.
|
|
@@ -84,17 +97,19 @@ Format:
|
|
|
84
97
|
- Freeze all npm package versions.
|
|
85
98
|
|
|
86
99
|
### Fixed
|
|
87
|
-
|
|
100
|
+
|
|
101
|
+
- 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.
|
|
88
102
|
- 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.
|
|
89
|
-
- Projects created in da each have a unique name. https://github.com/SuffolkLITLab/ALKiln/issues/663
|
|
90
|
-
- 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
|
|
103
|
+
- Projects created in da each have a unique name. <https://github.com/SuffolkLITLab/ALKiln/issues/663>
|
|
104
|
+
- 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>
|
|
91
105
|
- Updated field decoding to handle new object field encoding. See [#711](https://github.com/SuffolkLITLab/ALKiln/issues/711)
|
|
92
106
|
- Allow multiple languages to be tested again. See [#713](https://github.com/SuffolkLITLab/ALKiln/issues/713).
|
|
93
107
|
- Fill in time fields correctly. See [#726](https://github.com/SuffolkLITLab/ALKiln/pull/726).
|
|
94
|
-
- Allow `.target_number` to be 0. See https://github.com/SuffolkLITLab/ALKiln/issues/706
|
|
95
|
-
- Use the right number of loops for `.target_number`. See https://github.com/SuffolkLITLab/ALKiln/issues/706
|
|
108
|
+
- Allow `.target_number` to be 0. See <https://github.com/SuffolkLITLab/ALKiln/issues/706>.
|
|
109
|
+
- Use the right number of loops for `.target_number`. See <https://github.com/SuffolkLITLab/ALKiln/issues/706>.
|
|
96
110
|
|
|
97
111
|
### Security
|
|
112
|
+
|
|
98
113
|
- Pass docassemble API keys through HTTP headers instead of as parameters.
|
|
99
114
|
- Parameters to certain HTTP requests are printed directly in docassemble's
|
|
100
115
|
uWSGI log, leaking API keys to actors with log access on your docassemble
|
|
@@ -102,152 +117,209 @@ Format:
|
|
|
102
117
|
- Update dependencies. See [#727](https://github.com/SuffolkLITLab/ALKiln/pull/727).
|
|
103
118
|
|
|
104
119
|
### Internal
|
|
120
|
+
|
|
105
121
|
- added a test for multiline json values (only ones set by code not by user input)
|
|
106
122
|
- added an internal section to the change log
|
|
107
123
|
|
|
108
124
|
## [4.11.1] - 2023-03-21
|
|
125
|
+
|
|
109
126
|
### Changed
|
|
127
|
+
|
|
110
128
|
- Get error data from server errors
|
|
111
129
|
|
|
112
130
|
## [4.11.0] - 2023-03-13
|
|
131
|
+
|
|
113
132
|
### Changed
|
|
114
|
-
|
|
133
|
+
|
|
134
|
+
- Shorten Axios errors to make them more readable (<https://github.com/SuffolkLITLab/ALKiln/pull/632>)
|
|
115
135
|
|
|
116
136
|
## [4.10.4] - 2023-02-15
|
|
137
|
+
|
|
117
138
|
### Added
|
|
139
|
+
|
|
118
140
|
- Contribution docs
|
|
119
141
|
|
|
120
142
|
### Fixed
|
|
121
|
-
|
|
143
|
+
|
|
144
|
+
- #511, couldn't take screenshots of signature pages <https://github.com/SuffolkLITLab/ALKiln/issues/511>
|
|
122
145
|
|
|
123
146
|
## [4.10.3] - 2023-01-11
|
|
147
|
+
|
|
124
148
|
### Removed
|
|
149
|
+
|
|
125
150
|
- Internal - ignore local test output files. Part 2 of the process out of 2.
|
|
126
151
|
|
|
127
152
|
## [4.10.2] - 2023-01-11
|
|
153
|
+
|
|
128
154
|
### Removed
|
|
155
|
+
|
|
129
156
|
- Internal - deleted unignored local files (since adding .npmignore). Part 1 of the process out of 2.
|
|
130
157
|
|
|
131
158
|
## [4.10.1] - 2023-01-07
|
|
159
|
+
|
|
132
160
|
### Changed
|
|
133
|
-
|
|
161
|
+
|
|
162
|
+
- Fix artifacts not being saved in GitHub. See <https://github.com/SuffolkLITLab/ALKiln/issues/629>.
|
|
134
163
|
- Make internal test folder names a bit simpler and more modular-izable.
|
|
135
164
|
|
|
136
165
|
## [4.10.0] - 2022-11-17
|
|
166
|
+
|
|
137
167
|
### Changed
|
|
168
|
+
|
|
138
169
|
- Don't mark `...there_in_another | False |` in story tables as invalid, as it's necessary for some
|
|
139
|
-
workflows (see https://github.com/SuffolkLITLab/ALKiln/pull/580 for a longer discussion).
|
|
170
|
+
workflows (see <https://github.com/SuffolkLITLab/ALKiln/pull/580> for a longer discussion).
|
|
140
171
|
- Explicitly **not** documented, as we don't want to encourage people to use it if it's not
|
|
141
172
|
necessary for their interviews.
|
|
142
173
|
- continuing between screens will no longer press button with the `btn-primary` class. This means
|
|
143
174
|
that it won't press "Exit", or "Restart" buttons, to avoid getting in an infinite loop.
|
|
144
175
|
- Shorten test report and artifact filenames, attempting to have fewer files whose whole paths are
|
|
145
|
-
longer than 260 characters. (See https://github.com/SuffolkLITLab/ALKiln/pull/626 for details).
|
|
176
|
+
longer than 260 characters. (See <https://github.com/SuffolkLITLab/ALKiln/pull/626> for details).
|
|
146
177
|
|
|
147
178
|
### Fixed
|
|
179
|
+
|
|
148
180
|
- Corrects the month in the artifact folder timestamp; was printing things like `81` for September
|
|
149
181
|
instead of `09`, because of a `+` being interpreted as Javascript string concatenation and not math.
|
|
150
182
|
|
|
151
183
|
## [4.9.3] - 2022-09-07
|
|
184
|
+
|
|
152
185
|
### Fixed
|
|
153
|
-
|
|
186
|
+
|
|
187
|
+
- `retry` of failed tests not implemented for developers. See <https://github.com/SuffolkLITLab/ALKiln/issues/601>.
|
|
154
188
|
|
|
155
189
|
## [4.9.2] - 2022-09-02
|
|
190
|
+
|
|
156
191
|
### Fixed
|
|
157
|
-
|
|
192
|
+
|
|
193
|
+
- 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>.
|
|
158
194
|
|
|
159
195
|
## [4.9.1] - 2022-09-01
|
|
196
|
+
|
|
160
197
|
### Fixed
|
|
161
|
-
|
|
198
|
+
|
|
199
|
+
- runtime_config.json gets created when needed when artifacts folder is created. See <https://github.com/SuffolkLITLab/ALKiln/issues/600>.
|
|
162
200
|
|
|
163
201
|
## [4.9.0] - 2022-09-01
|
|
202
|
+
|
|
164
203
|
### Changed
|
|
165
|
-
|
|
166
|
-
-
|
|
204
|
+
|
|
205
|
+
- Allow devs to test an arbitrary interview. See <https://github.com/SuffolkLITLab/ALKiln/issues/600>.
|
|
206
|
+
- Create artifacts folder even when setup has been skipped. See <https://github.com/SuffolkLITLab/ALKiln/issues/600>.
|
|
167
207
|
|
|
168
208
|
## [4.8.0] - 2022-08-30
|
|
209
|
+
|
|
169
210
|
### Changed
|
|
211
|
+
|
|
170
212
|
- Date for filenames. Format date in y-m-d format instead of d-m-y that it had by default. Include ms.
|
|
171
213
|
|
|
172
214
|
## [4.7.2] - 2022-08-09
|
|
215
|
+
|
|
173
216
|
### Changed
|
|
174
|
-
- Inform the developer when a test failure may have been caused by a server reload. See https://github.com/SuffolkLITLab/ALKiln/issues/392.
|
|
175
|
-
- Retry all failing tests once.
|
|
176
217
|
|
|
218
|
+
- Inform the developer when a test failure may have been caused by a server reload. See <https://github.com/SuffolkLITLab/ALKiln/issues/392>.
|
|
219
|
+
- Retry all failing tests once.
|
|
177
220
|
|
|
178
221
|
## [4.7.1] - 2022-08-07
|
|
222
|
+
|
|
179
223
|
### Changed
|
|
224
|
+
|
|
180
225
|
- Ensure unique folder names for random input screenshots in case developer uses multiple random steps in one Scenario.
|
|
181
226
|
- Ensure random input detects unexpected interview errors.
|
|
182
227
|
|
|
183
228
|
### Fixed
|
|
229
|
+
|
|
184
230
|
- Fix failure when signature page is the first screen.
|
|
185
231
|
- Internal tests failing even when failure status is as expected.
|
|
186
232
|
- Double printing in report of scenario failure, one of them even when Scenario was possibly non-failure, like skipped.
|
|
187
233
|
|
|
188
234
|
## [4.7.0] - 2022-07-27
|
|
235
|
+
|
|
189
236
|
### Added
|
|
237
|
+
|
|
190
238
|
- 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.
|
|
191
239
|
|
|
192
240
|
### Changed
|
|
241
|
+
|
|
193
242
|
- Add page id to the "Missing Variable or variables on page" error report
|
|
194
243
|
- Allows Story Tables to not include a header row, as long as they have 2 or 3 columns.
|
|
195
244
|
This isn't the suggested way at the moment, since including headers is more readable,
|
|
196
245
|
but can prevent confusing and unnecessary errors.
|
|
197
246
|
|
|
198
247
|
## [4.6.2] - 2022-06-28
|
|
248
|
+
|
|
199
249
|
### Changed
|
|
200
|
-
|
|
250
|
+
|
|
251
|
+
- Put cucumber tests' artifacts in one folder. See <https://github.com/SuffolkLITLab/ALKiln/issues/552>.
|
|
201
252
|
- Add separate artifacts dir for our own internal tests, like unit tests
|
|
202
253
|
- Abstract names of some of those artifact directories
|
|
203
254
|
|
|
204
255
|
## [4.6.1] - 2022-06-28
|
|
256
|
+
|
|
205
257
|
### Fixed
|
|
258
|
+
|
|
206
259
|
- Single dropdown fields on pages are now recognized as fields properly
|
|
207
260
|
|
|
208
261
|
## [4.6.0] - 2022-06-10
|
|
262
|
+
|
|
209
263
|
### Added
|
|
264
|
+
|
|
210
265
|
- Steps to test web accessibility either on individual page or for all subsequent pages.
|
|
211
266
|
|
|
212
267
|
## [4.5.2] - 2022-06-10
|
|
268
|
+
|
|
213
269
|
### Fixed
|
|
270
|
+
|
|
214
271
|
- (internal) Expected in report is reset properly
|
|
215
272
|
- if a test used "the Scenario report should include ...", then all tests that were
|
|
216
273
|
run after that would pass even if the test itself failed but wasn't expected to fail
|
|
217
274
|
|
|
218
275
|
## [4.5.1] - 2022-06-10
|
|
276
|
+
|
|
219
277
|
### Fixed
|
|
278
|
+
|
|
220
279
|
- Corrected some schema errors in the `action.yml` (the `run` key was specified twice, should only have been once, and `required: False` is needed
|
|
221
280
|
for optional inputs)
|
|
222
281
|
|
|
223
282
|
## [4.5.0] - 2022-05-23
|
|
283
|
+
|
|
224
284
|
### Added
|
|
285
|
+
|
|
225
286
|
- Steps that tap tabs (made using the `tabbed_templates_html` function from ALToolbox) and other arbitrary elements on the page.
|
|
226
287
|
|
|
227
288
|
## [4.4.0] - 2022-05-23
|
|
289
|
+
|
|
228
290
|
### Added
|
|
291
|
+
|
|
229
292
|
- 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.
|
|
230
293
|
|
|
231
294
|
### Fixed
|
|
295
|
+
|
|
232
296
|
- Prevent login info from being saved in the report or screenshots being taken on error. [#599](https://github.com/SuffolkLITLab/ALKiln/issues/559).
|
|
233
297
|
- Prevent error screenshots of screens that used a secret.
|
|
234
298
|
|
|
235
299
|
## [4.3.0] - 2022-04-07
|
|
300
|
+
|
|
236
301
|
### Added
|
|
302
|
+
|
|
237
303
|
- 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.
|
|
238
304
|
|
|
239
305
|
## [4.2.0] - 2022-04-05
|
|
306
|
+
|
|
240
307
|
### Changed
|
|
308
|
+
|
|
241
309
|
- Pin versions of dependencies in action.yml and package.json
|
|
242
310
|
- Change log.txt file to debug_log.txt and upload as github artifact.
|
|
243
311
|
- Update cheerio version to remove vulnerabilities.
|
|
244
312
|
|
|
245
313
|
## [4.1.1] - 2022-04-01
|
|
314
|
+
|
|
246
315
|
### Added
|
|
316
|
+
|
|
247
317
|
- 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.
|
|
248
318
|
|
|
249
319
|
## [4.0.0] - 2022-03-30
|
|
320
|
+
|
|
250
321
|
### Added
|
|
322
|
+
|
|
251
323
|
- BREAKING: Add package.json creation/overwriting to action.yml. Simplify package.json.
|
|
252
324
|
- 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.
|
|
253
325
|
- 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.
|
|
@@ -257,6 +329,7 @@ Format:
|
|
|
257
329
|
- Add control of alkiln npm version to the action.yml
|
|
258
330
|
|
|
259
331
|
### Changed
|
|
332
|
+
|
|
260
333
|
- BREAKING: NPM package is now suffolklitlab scoped package. Refer to @suffolklitlab/alkiln from now on.
|
|
261
334
|
- BREAKING: Update to v13 of puppeteer
|
|
262
335
|
- BREAKING: Update to v7 of cucumber
|
|
@@ -267,14 +340,16 @@ Format:
|
|
|
267
340
|
- Update test setup interview to v4 of ALKiln.
|
|
268
341
|
- Remove and ignore package-lock.json so that our tests will behave more like our users' tests
|
|
269
342
|
- Add warning in steps.js for name input with too many parts. Add test in reports.
|
|
270
|
-
- fix typo in the report
|
|
343
|
+
- fix typo in the report
|
|
271
344
|
- Allow a developer to wait as a first Step. See #387.
|
|
272
345
|
|
|
273
346
|
<!-- ## [3.0.1-peer-deps.1] - 2021-12-07 -->
|
|
274
347
|
### Removed
|
|
275
|
-
|
|
348
|
+
|
|
349
|
+
- 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.
|
|
276
350
|
|
|
277
351
|
### Fixed
|
|
352
|
+
|
|
278
353
|
- 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.
|
|
279
354
|
- Fixed interview name not allowing url parameters. #449
|
|
280
355
|
- Freeze colors npm package to before bug in both package.json and action.yml
|
|
@@ -283,222 +358,317 @@ Format:
|
|
|
283
358
|
- session_vars branch path regex not removing start of branch path
|
|
284
359
|
|
|
285
360
|
## [3.2.1] - 2022-02-09
|
|
361
|
+
|
|
286
362
|
### Fixed
|
|
363
|
+
|
|
287
364
|
- Typo in report that was messing up copy/paste of test table
|
|
288
365
|
|
|
289
366
|
## [3.2.0] - 2022-02-09
|
|
367
|
+
|
|
290
368
|
### Added
|
|
369
|
+
|
|
291
370
|
- Add Step to log into server account using GitHub SECRETs (environment variables). See #499.
|
|
292
371
|
|
|
293
372
|
## [3.1.11] - 2022-02-02
|
|
373
|
+
|
|
294
374
|
### Changed
|
|
375
|
+
|
|
295
376
|
- 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.
|
|
296
377
|
|
|
297
378
|
## [3.0.11] - 2022-01-25
|
|
379
|
+
|
|
298
380
|
### Added
|
|
381
|
+
|
|
299
382
|
- 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.
|
|
300
383
|
|
|
301
384
|
## [3.0.10] - 2022-01-24
|
|
385
|
+
|
|
302
386
|
### Added
|
|
387
|
+
|
|
303
388
|
- Step to log the page's JSON variables and values in the report. Future goal: save to file. See #454.
|
|
304
389
|
|
|
305
390
|
## [3.0.9] - 2022-01-10
|
|
391
|
+
|
|
306
392
|
### Security
|
|
393
|
+
|
|
307
394
|
- 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.
|
|
308
395
|
|
|
309
396
|
## [3.0.8] - 2022-01-10
|
|
397
|
+
|
|
310
398
|
### Security
|
|
399
|
+
|
|
311
400
|
- Fully publish the security fix in v3.0.7
|
|
312
401
|
|
|
313
402
|
## [3.0.7] - 2022-01-10
|
|
403
|
+
|
|
314
404
|
### Security
|
|
315
|
-
|
|
405
|
+
|
|
406
|
+
- 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.
|
|
316
407
|
|
|
317
408
|
## [3.0.6] - 2022-01-07
|
|
409
|
+
|
|
318
410
|
### Changed
|
|
411
|
+
|
|
319
412
|
- See #371
|
|
320
413
|
- Scenario heading tags are now on a second line
|
|
321
414
|
- Artifact filenames use dashes more and are created separately from Scenario headings
|
|
322
415
|
- Scenario ids are separated from filenames and Scenario headings
|
|
323
416
|
|
|
324
417
|
## [3.0.5] - 2022-01-06
|
|
418
|
+
|
|
325
419
|
### Added
|
|
420
|
+
|
|
326
421
|
- 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.
|
|
327
422
|
- Add package.json creation/overwriting to action.yml. Simplify package.json.
|
|
328
423
|
|
|
329
424
|
<!-- ## [3.0.1-peer-deps.1] - 2021-12-07 -->
|
|
330
425
|
### Removed
|
|
331
|
-
|
|
426
|
+
|
|
427
|
+
- 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.
|
|
332
428
|
|
|
333
429
|
### Fixed
|
|
430
|
+
|
|
334
431
|
- Fixed interview name not allowing url parameters. #449
|
|
335
432
|
|
|
336
433
|
## [3.0.4] - 2021-12-11
|
|
434
|
+
|
|
337
435
|
### Fixed
|
|
436
|
+
|
|
338
437
|
- Use different criteria for testing that the package was saved.
|
|
339
438
|
|
|
340
439
|
## [3.0.3] - 2021-12-11
|
|
440
|
+
|
|
341
441
|
### Fixed
|
|
342
|
-
|
|
442
|
+
|
|
443
|
+
- Implement a temporary fix for inability to pull private repos into empty da Projects. See <https://github.com/SuffolkLITLab/ALKiln/issues/417#issuecomment-991812294>
|
|
343
444
|
|
|
344
445
|
## [3.0.2] - 2021-12-10
|
|
446
|
+
|
|
345
447
|
### Changed
|
|
448
|
+
|
|
346
449
|
- Improve some error messages and handling for the new private repo workflow.
|
|
347
450
|
|
|
348
451
|
## [3.0.1] - 2021-12-10
|
|
452
|
+
|
|
349
453
|
### Fixed
|
|
350
|
-
- Allow authenticated GitHub user to pull from a private repository for which they have at least read permissions.
|
|
351
454
|
|
|
455
|
+
- Allow authenticated GitHub user to pull from a private repository for which they have at least read permissions.
|
|
352
456
|
|
|
353
457
|
## [3.0.0] - 2021-12-07
|
|
458
|
+
|
|
354
459
|
### Changed
|
|
460
|
+
|
|
355
461
|
- v3 release to update to da Bootstrap 5. Breaks for servers that have not yet updated to that da version.
|
|
356
462
|
|
|
357
463
|
## [2.7.0-pre-update-dom.4] - 2021-12-03
|
|
464
|
+
|
|
358
465
|
### Changed
|
|
466
|
+
|
|
359
467
|
- Give test resetting, a common failure point, a couple of tries and add a warning and instructions about simply re-running the tests.
|
|
360
468
|
|
|
361
469
|
## [2.7.0-pre-update-dom.3] - 2021-12-02
|
|
470
|
+
|
|
362
471
|
### Fixed
|
|
363
|
-
|
|
472
|
+
|
|
473
|
+
- 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>.
|
|
364
474
|
|
|
365
475
|
## [2.7.0-pre-update-dom.2] - 2021-12-02
|
|
476
|
+
|
|
366
477
|
### Fixed
|
|
367
|
-
|
|
478
|
+
|
|
479
|
+
- 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.
|
|
368
480
|
|
|
369
481
|
## [2.7.0-pre-update-dom] - 2021-11-22
|
|
482
|
+
|
|
370
483
|
### Changed
|
|
484
|
+
|
|
371
485
|
- Update to Bootstrap 5 Docassemble DOM changes
|
|
372
486
|
- Remove test(s?) for guessing proxy vars as we don't do that anymore #221
|
|
373
487
|
- Added instructions for using tags when running cucumber tests
|
|
374
488
|
- Handle clicking in `tapElement()` ourselves now instead of with puppeteer. See previous commit for the change.
|
|
375
489
|
|
|
376
490
|
## [2.6.0] - 2021-08-07
|
|
491
|
+
|
|
377
492
|
### Added
|
|
493
|
+
|
|
378
494
|
- 'today' and 'today - 1' for setting dates
|
|
379
495
|
|
|
380
496
|
## [2.5.4] - 2021-08-07
|
|
497
|
+
|
|
381
498
|
### Fixed
|
|
499
|
+
|
|
382
500
|
- In page load, total timeout needs to be checked in more places to give useful error message before Step fully times out.
|
|
383
501
|
|
|
384
502
|
## [2.5.3] - 2021-08-06
|
|
503
|
+
|
|
385
504
|
### Fixed
|
|
505
|
+
|
|
386
506
|
- Not giving enough time for package to load - failing too soon on error of module not found.
|
|
387
|
-
- Not waiting for package page to appear on setup: https://github.com/plocket/docassemble-cucumber/issues/367#issuecomment-892591770
|
|
507
|
+
- 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.
|
|
388
508
|
|
|
389
509
|
## [2.5.2] - 2021-08-03
|
|
510
|
+
|
|
390
511
|
### Fixed
|
|
512
|
+
|
|
391
513
|
- Wrong error when server times out on page load.
|
|
392
514
|
|
|
393
515
|
## [2.5.1] - 2021-07-31
|
|
516
|
+
|
|
394
517
|
### Added
|
|
518
|
+
|
|
395
519
|
- Tests for failed Scenarios and their reports
|
|
396
520
|
|
|
397
521
|
### Changed
|
|
522
|
+
|
|
398
523
|
- Tweak report wording
|
|
399
524
|
|
|
400
525
|
### Fixed
|
|
526
|
+
|
|
401
527
|
- Internal report check logic
|
|
402
528
|
- Loading page did not catch system error and re-trying without timeout was not robust.
|
|
403
529
|
|
|
404
530
|
## [2.5.0] - 2021-07-31
|
|
531
|
+
|
|
405
532
|
### Added
|
|
533
|
+
|
|
406
534
|
- Report line for error on load.
|
|
407
535
|
- Internal testing Step to test contents of reports include certain content.
|
|
408
536
|
- Internal testing Step to check passing tests should be passing and failing ones should be failing.
|
|
409
537
|
|
|
410
538
|
## [2.4.2] - 2021-07-31
|
|
539
|
+
|
|
411
540
|
### Fixed
|
|
541
|
+
|
|
412
542
|
- Steps that set vars (other than the story table) should fail when they can't set their var, but they did not fail.
|
|
413
543
|
|
|
414
544
|
## [2.4.1] - 2021-07-24
|
|
545
|
+
|
|
415
546
|
### Fixed
|
|
547
|
+
|
|
416
548
|
- Upload Step wasn't waiting for files to finish uploading
|
|
417
549
|
|
|
418
550
|
## [2.4.0] - 2021-07-23
|
|
551
|
+
|
|
419
552
|
### Added
|
|
553
|
+
|
|
420
554
|
- 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.
|
|
421
555
|
|
|
422
556
|
### Changed
|
|
557
|
+
|
|
423
558
|
- 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.
|
|
424
559
|
- Allow duplicates of '[class="file-caption-name"]' fields as they should not be dangerous.
|
|
425
560
|
|
|
426
561
|
## [2.3.0] - 2021-07-22
|
|
562
|
+
|
|
427
563
|
### Changed
|
|
564
|
+
|
|
428
565
|
- Report: List failed scenarios first, other non-passing scenarios second (should not run into those much I think), and passed scenarios last.
|
|
429
566
|
- Two internal tests adjusted to be 10 secs shorter each
|
|
430
567
|
- One internal test tag updated
|
|
431
568
|
|
|
432
569
|
### Fixed
|
|
570
|
+
|
|
433
571
|
- Some report ids not being recorded because old id from previous test was not different from new id in new scenario.
|
|
434
572
|
|
|
435
573
|
## [2.2.3] - 2021-07-18
|
|
574
|
+
|
|
436
575
|
### Changed
|
|
576
|
+
|
|
437
577
|
- Updated package-lock.json with `npm fix` based on `npm audit`
|
|
438
578
|
|
|
439
579
|
## [2.2.2] - 2021-07-16
|
|
580
|
+
|
|
440
581
|
### Fixed
|
|
582
|
+
|
|
441
583
|
- `toBase64` returns default valid base 64 value with clear name if needed
|
|
442
584
|
|
|
443
585
|
### Added
|
|
586
|
+
|
|
444
587
|
- Clarifying code comments
|
|
445
588
|
|
|
446
589
|
## [2.2.1] - 2021-07-14
|
|
590
|
+
|
|
447
591
|
### Fixed
|
|
592
|
+
|
|
448
593
|
- Variable undefined in scope.js (message)
|
|
449
594
|
|
|
450
595
|
## [2.2.0] - 2021-07-12
|
|
596
|
+
|
|
451
597
|
### Added
|
|
598
|
+
|
|
452
599
|
- Tests for reports for unexpected failures
|
|
453
600
|
|
|
454
601
|
### Changed
|
|
602
|
+
|
|
455
603
|
- Bump minor version for added timeout behavior, etc.
|
|
456
604
|
|
|
457
605
|
## [2.1.8] - 2021-07-11
|
|
606
|
+
|
|
458
607
|
### Added
|
|
608
|
+
|
|
459
609
|
- Step: Custom global timeout, #317, for when interviews know they'll need longer timeouts for such things as loading large documents.
|
|
460
610
|
|
|
461
611
|
### Changed
|
|
612
|
+
|
|
462
613
|
- 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.
|
|
463
614
|
|
|
464
615
|
## [2.1.7] - 2021-07-08
|
|
616
|
+
|
|
465
617
|
### Added
|
|
618
|
+
|
|
466
619
|
- 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
|
|
467
620
|
|
|
468
621
|
## [2.1.6] - 2021-07-07
|
|
622
|
+
|
|
469
623
|
### Added
|
|
624
|
+
|
|
470
625
|
- Backwards compatibility with `#sought_variable` element.
|
|
471
626
|
- Report tests
|
|
472
627
|
|
|
473
628
|
### Fixed
|
|
629
|
+
|
|
474
630
|
- Typo in report
|
|
475
631
|
|
|
476
632
|
## [2.1.5] - 2021-07-07
|
|
633
|
+
|
|
477
634
|
### Changed
|
|
635
|
+
|
|
478
636
|
- Not sure. Can't find this commit.
|
|
479
637
|
|
|
480
638
|
## [2.1.4] - 2021-07-06
|
|
639
|
+
|
|
481
640
|
### Fixed
|
|
641
|
+
|
|
482
642
|
- Var name typos in `scope.ensureSpecialRows()`
|
|
483
643
|
|
|
484
644
|
## [2.1.3] - 2021-07-06
|
|
645
|
+
|
|
485
646
|
### Added
|
|
647
|
+
|
|
486
648
|
- 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.
|
|
487
649
|
|
|
488
650
|
## [2.1.2] - 2021-07-04
|
|
651
|
+
|
|
489
652
|
### Changed
|
|
653
|
+
|
|
490
654
|
- Refactor `scope.processVar()`, including rename
|
|
491
655
|
|
|
492
656
|
## [2.1.1] - 2021-07-04
|
|
657
|
+
|
|
493
658
|
### Changed
|
|
659
|
+
|
|
494
660
|
- Use new Buffer reference instead of old deprecated reference.
|
|
495
661
|
|
|
496
662
|
## [2.1.0] - 2021-07-01
|
|
663
|
+
|
|
497
664
|
### Added
|
|
665
|
+
|
|
498
666
|
- Support interview filenames ending in `.yml` in the first step
|
|
499
667
|
|
|
500
668
|
## [2.0.0] - 2021-06-29
|
|
669
|
+
|
|
501
670
|
### Added
|
|
671
|
+
|
|
502
672
|
- Support for `.there_is_another` loops in story tables using `.target_number`
|
|
503
673
|
- New step: 'I should see the link to' and its test.
|
|
504
674
|
- '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'
|
|
@@ -509,7 +679,8 @@ Format:
|
|
|
509
679
|
- Move debug logs for getMatchingRow and getPageData to appropriate places.
|
|
510
680
|
|
|
511
681
|
### Changed
|
|
512
|
-
|
|
682
|
+
|
|
683
|
+
- 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.
|
|
513
684
|
- Tried to make element selectors more picky.
|
|
514
685
|
- Make screenshot names unique and line up alphabetically with timestamps.
|
|
515
686
|
- Allow more languages in scenario name.
|
|
@@ -520,42 +691,57 @@ Format:
|
|
|
520
691
|
- Updated tests to match new functionality.
|
|
521
692
|
|
|
522
693
|
### Deprecated
|
|
694
|
+
|
|
523
695
|
- Previous formats of the table: `| var | choice | value |` *and* `| var | value | checked |`
|
|
524
696
|
|
|
525
697
|
### Removed
|
|
698
|
+
|
|
526
699
|
- Some Steps that won't work with translations and are not currently being used by anyone. TODO: Look up and ennumerate which steps.
|
|
527
700
|
- `checked` column.
|
|
528
701
|
- `scope.getField()` and other now unused scope functionality.
|
|
529
702
|
|
|
530
703
|
### Fixed
|
|
704
|
+
|
|
531
705
|
- Assert found invalid input.
|
|
532
706
|
- 'I sign' was passing incorrect arguments.
|
|
533
707
|
- Regex testing for match to proxy var - both the regex itself being more strict and the test for a match being more predictable.
|
|
534
708
|
- #202 handles accidental mixup of single quotes for double quotes or visa versa in all columns.
|
|
535
709
|
|
|
536
710
|
## [1.3.5] - 2021-05-04
|
|
711
|
+
|
|
537
712
|
### Added
|
|
713
|
+
|
|
538
714
|
- 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).
|
|
539
715
|
|
|
540
716
|
## [1.3.4] - 2021-04-21
|
|
717
|
+
|
|
541
718
|
### Fixed
|
|
719
|
+
|
|
542
720
|
- Dropdowns created with objects always fail.
|
|
543
721
|
|
|
544
722
|
## [1.3.3] - 2021-04-16
|
|
723
|
+
|
|
545
724
|
### Changed
|
|
546
|
-
|
|
725
|
+
|
|
726
|
+
- 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.
|
|
547
727
|
|
|
548
728
|
## [1.3.2] - 2021-04-07
|
|
729
|
+
|
|
549
730
|
### Changed
|
|
731
|
+
|
|
550
732
|
- Each test run creates a unique da Project now. No need to wait for previous tests to finish.
|
|
551
733
|
|
|
552
734
|
## [1.3.1] - 2021-04-07
|
|
735
|
+
|
|
553
736
|
### Fixed
|
|
737
|
+
|
|
554
738
|
- Message about duplicate selector matches.
|
|
555
|
-
- Bump
|
|
739
|
+
- Bump *minor* version number appropriately.
|
|
556
740
|
|
|
557
741
|
## [1.2.8] - 2021-04-06
|
|
742
|
+
|
|
558
743
|
### Fixed
|
|
744
|
+
|
|
559
745
|
- 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).
|
|
560
746
|
- 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).
|
|
561
747
|
- Fix all checkboxes getting checked no matter what.
|
|
@@ -563,73 +749,98 @@ Format:
|
|
|
563
749
|
- Incorrect truthy test.
|
|
564
750
|
|
|
565
751
|
### Added
|
|
752
|
+
|
|
566
753
|
- New warning in report about variable appearing on a page in multiple places.
|
|
567
754
|
|
|
568
755
|
## [1.2.7] - 2021-04-05
|
|
756
|
+
|
|
569
757
|
### Changed
|
|
758
|
+
|
|
570
759
|
- 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).
|
|
571
760
|
- Basically, address much of [#158](https://github.com/plocket/docassemble-cucumber/issues/158), as noted below.
|
|
572
761
|
|
|
573
762
|
### Deprecated
|
|
763
|
+
|
|
574
764
|
- 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.
|
|
575
765
|
|
|
576
766
|
### Fixed
|
|
767
|
+
|
|
577
768
|
- Some proxy field var name finding
|
|
578
769
|
- Improved page var name finding in general
|
|
579
770
|
- Refactored to get all fields from the page first, then compare to a new format of table
|
|
580
771
|
|
|
581
772
|
## [1.2.6] - 2021-03-14
|
|
773
|
+
|
|
582
774
|
### Added
|
|
775
|
+
|
|
583
776
|
- Automated integrated self-testing
|
|
584
777
|
- Unit tests for getField with cheerio
|
|
585
778
|
- Refactor getField to use data
|
|
586
779
|
|
|
587
780
|
### Fixed
|
|
781
|
+
|
|
588
782
|
- Infinite loop when specific button tap causes error #168
|
|
589
783
|
- Some items not getting selected at all (scroll into view problem)
|
|
590
784
|
|
|
591
785
|
## [1.2.5] - 2021-03-06
|
|
786
|
+
|
|
592
787
|
### Fixed
|
|
788
|
+
|
|
593
789
|
- Simplest case of [index var](https://github.com/plocket/docassemble-cucumber/issues/158) (i.e. `i`) question.
|
|
594
790
|
|
|
595
791
|
## [1.2.4] - 2021-03-03
|
|
792
|
+
|
|
596
793
|
### Fixed
|
|
794
|
+
|
|
597
795
|
- Race condition where puppeteer thinks the page has progressed but it really hasn't.
|
|
598
796
|
|
|
599
797
|
## [1.2.3] - 2021-02-07
|
|
798
|
+
|
|
600
799
|
### Fixed
|
|
800
|
+
|
|
601
801
|
- Options of dropdown fields created with objects are not found [#149](https://github.com/plocket/docassemble-cucumber/issues/149)
|
|
602
802
|
|
|
603
803
|
## [1.2.2] - 2021-02-03
|
|
804
|
+
|
|
604
805
|
### Fixed
|
|
806
|
+
|
|
605
807
|
- Signature field rows (`/sign`) are not used up all in one loop
|
|
606
808
|
|
|
607
809
|
### Added
|
|
810
|
+
|
|
608
811
|
- .env-example file to files that will be pushed to dependants
|
|
609
812
|
|
|
610
813
|
## [1.2.1] - 2021-01-26
|
|
814
|
+
|
|
611
815
|
### Fixed
|
|
816
|
+
|
|
612
817
|
- #79, race condition breaks story table scenarios (ex: MADE `rental agreement`)
|
|
613
818
|
- #115, order of table items matter - continue button pressed too soon
|
|
614
819
|
- #139, `scope.getField()` `set_to` doesn't find all the fields
|
|
615
820
|
|
|
616
|
-
|
|
617
821
|
## [1.2.0] - 2021-01-13
|
|
822
|
+
|
|
618
823
|
### Changed
|
|
824
|
+
|
|
619
825
|
- Reports are saved as `.txt` files instead of `.md` files.
|
|
620
826
|
- Reports are prettier.
|
|
621
827
|
- 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.
|
|
622
828
|
- Automatically generated language tags now handle spaces.
|
|
623
829
|
|
|
624
830
|
### Fixed
|
|
831
|
+
|
|
625
832
|
- Broken error message - showed the wrong error.
|
|
626
833
|
|
|
627
834
|
## [1.1.0] - 2021-01-13
|
|
835
|
+
|
|
628
836
|
### Changed
|
|
837
|
+
|
|
629
838
|
- Skipped this version somehow. Was sure it was in there somewhere...
|
|
630
839
|
|
|
631
840
|
## [1.0.0] - 2021-01-13
|
|
841
|
+
|
|
632
842
|
### Added
|
|
843
|
+
|
|
633
844
|
- Steps for setting variables, interacting with elements, and observing (to be documented elsewhere TODO: add link)
|
|
634
845
|
- 'Story' table - a Step with a cucumber table that can set several variables until a specified `question id` is reached
|
|
635
846
|
- 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/run_cucumber.js
CHANGED
|
@@ -6,95 +6,64 @@ const session_vars = require('./utils/session_vars');
|
|
|
6
6
|
|
|
7
7
|
const cucumber_api = require('@cucumber/cucumber/api');
|
|
8
8
|
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
(async function main() {
|
|
10
|
+
let argv = process.argv;
|
|
11
|
+
|
|
12
|
+
const environment = { cwd: process.cwd() };
|
|
13
|
+
console.log("alkiln-run: environment: %o", environment);
|
|
14
|
+
const provided_config = {
|
|
15
|
+
"publishQuiet": true,
|
|
16
|
+
"require": "./lib/index.js",
|
|
17
|
+
"format": ["progress", "summary:cucumber-report.txt"],
|
|
18
|
+
"paths": ["docassemble/*/data/sources/*.feature"],
|
|
19
|
+
"retry": 1,
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
// If they're running it from an interview on their server instead of from GitHub
|
|
24
|
+
if ( session_vars.get_origin() === `playground` ) {
|
|
25
|
+
provided_config.paths.push(`/usr/share/docassemble/files/playgroundsources/${session_vars.get_user_id()}/${session_vars.get_user_project_name()}/*.feature`);
|
|
26
|
+
// For S3
|
|
27
|
+
provided_config.paths.push(`/tmp/playgroundsources/${session_vars.get_user_id()}/${session_vars.get_user_project_name()}/*.feature`);
|
|
23
28
|
}
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// Avoid breaking old versions of ALKilnInThePlayground
|
|
28
|
-
if ( tags.length === 0 && session_vars.get_origin() === `playground` ) {
|
|
30
|
+
let tags = argv.slice(2);
|
|
31
|
+
if ( session_vars.get_origin() === `playground` ) {
|
|
29
32
|
tags = session_vars.get_tags();
|
|
30
33
|
}
|
|
34
|
+
|
|
31
35
|
if (tags.length > 0) {
|
|
32
36
|
let joined_tags = '';
|
|
33
37
|
// Cucumber expects tags in boolean expressions, like (@a0 or @a1) and @random.
|
|
34
38
|
// If we get a list of only tags, then "or" them all together
|
|
35
|
-
if (tags.every((val) => val.startsWith(
|
|
36
|
-
joined_tags = tags.join(
|
|
39
|
+
if (tags.every((val) => val.startsWith("@"))) {
|
|
40
|
+
joined_tags = tags.join(' or ');
|
|
37
41
|
}
|
|
38
42
|
// If we get a list of seemingly no tags, assume they meant to use tags
|
|
39
|
-
else if (tags.every((val) => !val.startsWith(
|
|
40
|
-
joined_tags = tags.map((val) =>
|
|
43
|
+
else if (tags.every((val) => !val.startsWith("@"))) {
|
|
44
|
+
joined_tags = tags.map((val) => "@" + val).join(' or ');
|
|
41
45
|
}
|
|
42
46
|
// If it's a mix of tags and no tags, it's probably a boolean expression!
|
|
43
47
|
else {
|
|
44
|
-
joined_tags = tags.join(
|
|
48
|
+
joined_tags = tags.join(' ');
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return config;
|
|
51
|
-
}; // Ends build_config()
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(async function main() {
|
|
55
|
-
/** Create the cucumber config, run the tests, create and
|
|
56
|
-
* manipluate the output. */
|
|
57
|
-
const environment = { cwd: process.cwd() };
|
|
58
|
-
console.log("alkiln-run: environment: %o", environment);
|
|
59
|
-
|
|
60
|
-
// process.argv is a list of strings of commands and args.
|
|
61
|
-
// If using `npm run cucumber`, use `--` before `--sources=./foo`
|
|
62
|
-
let argv = require(`minimist`)( process.argv.slice(2), {
|
|
63
|
-
default: {
|
|
64
|
-
// Testing from GitHub. TODO: Do we want to allow multiple sources paths?
|
|
65
|
-
sources: [ `./docassemble/*/data/sources` ],
|
|
66
|
-
// From playground: `/usr/share/docassemble/files/playgroundsources/<user_id>/<project>/*.feature`
|
|
67
|
-
// From playground with S3: `/tmp/playgroundsources/<user_id>/<project>/*.feature`
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// Make sure `sources` is always a list
|
|
72
|
-
let sources_list = argv.sources;
|
|
73
|
-
if ( typeof argv.sources === `string` ) {
|
|
74
|
-
sources_list = [ argv.sources ];
|
|
75
|
-
}
|
|
51
|
+
provided_config.tags = joined_tags;
|
|
52
|
+
} // end if there are tags
|
|
76
53
|
|
|
77
|
-
let one_dir_exists = session_vars.set_sources_paths( sources_list );
|
|
78
|
-
if ( !one_dir_exists ) {
|
|
79
|
-
// If we don't throw, it'll be more confusing when no tests run
|
|
80
|
-
throw new ReferenceError( `ALKiln ERROR: ALKiln can't find your "sources" folder(s). See above for details.`);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
54
|
const { runConfiguration } = await cucumber_api.loadConfiguration({
|
|
84
|
-
provided:
|
|
55
|
+
provided: provided_config
|
|
85
56
|
}, environment);
|
|
86
|
-
|
|
87
57
|
console.log("alkiln-run: runConfiguration: %o", runConfiguration);
|
|
88
|
-
|
|
89
58
|
var path = require('path');
|
|
90
59
|
var codeDir = path.dirname(require.main.filename);
|
|
91
|
-
console.log("alkiln-run: working directory: %o", codeDir);
|
|
92
60
|
const support = await cucumber_api.loadSupport({ support: {
|
|
93
|
-
requireModules: [
|
|
94
|
-
requirePaths: [ `${ codeDir }/index.js`
|
|
61
|
+
requireModules: [`${ codeDir }/index.js`],
|
|
62
|
+
requirePaths: [ `${ codeDir }/index.js`],
|
|
95
63
|
importPaths: [],
|
|
96
64
|
}, sources: {paths: []}}, environment);
|
|
97
65
|
|
|
66
|
+
console.log("alkiln-run: working directory: %o", codeDir);
|
|
98
67
|
console.log(`\n\n`);
|
|
99
68
|
|
|
100
69
|
const { success } = await cucumber_api.runCucumber({...runConfiguration, support});
|
|
@@ -117,6 +86,6 @@ function build_config( command_args ) {
|
|
|
117
86
|
|
|
118
87
|
// Put it in the correct file in the correct folder
|
|
119
88
|
let artifacts_path = session_vars.get_artifacts_path_name();
|
|
120
|
-
fs.appendFileSync( `${ artifacts_path
|
|
89
|
+
fs.appendFileSync( `${ artifacts_path}/${ log.debug_log_file }`, data);
|
|
121
90
|
});
|
|
122
91
|
})();
|
package/lib/scope.js
CHANGED
|
@@ -1788,40 +1788,72 @@ module.exports = {
|
|
|
1788
1788
|
let uploads_names = answer.split(`,`);
|
|
1789
1789
|
if ( uploads_names.length === 0 ) {
|
|
1790
1790
|
await scope.addToReport( scope, {
|
|
1791
|
-
type: `
|
|
1791
|
+
type: `error`,
|
|
1792
1792
|
value: `Your list of files to upload is empty.`
|
|
1793
1793
|
});
|
|
1794
1794
|
return false; // The row wasn't used
|
|
1795
1795
|
}
|
|
1796
1796
|
|
|
1797
|
-
let
|
|
1798
|
-
|
|
1797
|
+
let dirs = [];
|
|
1798
|
+
if ( session_vars.get_origin() === `playground` ) {
|
|
1799
|
+
let files_playground = fg.sync(
|
|
1800
|
+
[ `/usr/share/docassemble/files/playgroundsources/${session_vars.get_user_id()}/${session_vars.get_user_project_name()}` ],
|
|
1801
|
+
{ onlyFiles: false, suppressErrors: true }
|
|
1802
|
+
);
|
|
1803
|
+
let files_s3 = fg.sync(
|
|
1804
|
+
[ `/tmp/playgroundsources/${session_vars.get_user_id()}/${session_vars.get_user_project_name()}` ],
|
|
1805
|
+
{ onlyFiles: false, suppressErrors: true }
|
|
1806
|
+
);
|
|
1807
|
+
|
|
1808
|
+
dirs = files_playground.concat( files_s3 );
|
|
1809
|
+
} else {
|
|
1810
|
+
dirs = fg.sync(
|
|
1811
|
+
[ `**/docassemble/**/data/sources` ],
|
|
1812
|
+
{ onlyFiles: false, suppressErrors: true }
|
|
1813
|
+
);
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
if ( session_vars.get_debug() ) {
|
|
1817
|
+
console.log( `All discovered dirs to upload from:`, dirs );
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
// Make sure sources directory exists and has files in it
|
|
1821
|
+
if ( dirs.length === 0 ) {
|
|
1822
|
+
await scope.addToReport( scope, {
|
|
1823
|
+
type: `warning`,
|
|
1824
|
+
value: `The test files need to be in the "sources" directory, `
|
|
1825
|
+
+ `but ALKiln couldn't find the directory or it was empty.`
|
|
1826
|
+
});
|
|
1827
|
+
return false; // The row wasn't used
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
// Get the full paths of all the files
|
|
1831
|
+
let dir = null;
|
|
1799
1832
|
let paths = [];
|
|
1800
1833
|
let missing_files = []; // For any user warnings
|
|
1801
1834
|
for ( let name of uploads_names ) {
|
|
1802
|
-
|
|
1835
|
+
|
|
1803
1836
|
let trimmed_name = name.trim();
|
|
1804
1837
|
let matching_paths = [];
|
|
1805
|
-
|
|
1806
|
-
for ( let one_dir of
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
{ suppressErrors: true }
|
|
1810
|
-
);
|
|
1838
|
+
|
|
1839
|
+
for ( let one_dir of dirs ) {
|
|
1840
|
+
// accumulate all matching paths
|
|
1841
|
+
let new_paths = fg.sync([ `${ one_dir }/${ trimmed_name }` ]);
|
|
1811
1842
|
matching_paths.push( ...new_paths );
|
|
1812
|
-
}
|
|
1843
|
+
} // ends for each dir
|
|
1813
1844
|
|
|
1814
1845
|
if ( matching_paths.length === 0 ) {
|
|
1815
1846
|
missing_files.push( trimmed_name );
|
|
1816
1847
|
} else {
|
|
1817
1848
|
paths.push( ...matching_paths );
|
|
1818
1849
|
}
|
|
1850
|
+
|
|
1819
1851
|
} // ends for each file
|
|
1820
1852
|
|
|
1821
1853
|
if ( missing_files.length > 0 ) {
|
|
1822
1854
|
await scope.addToReport( scope, {
|
|
1823
1855
|
type: `warning`,
|
|
1824
|
-
value: `ALKiln could not find "${ missing_files.join('", "') }" in
|
|
1856
|
+
value: `ALKiln could not find "${ missing_files.join('", "') }" in any of these folders: "${ dirs.join('", "') }".`
|
|
1825
1857
|
});
|
|
1826
1858
|
}
|
|
1827
1859
|
|
|
@@ -2053,7 +2085,7 @@ module.exports = {
|
|
|
2053
2085
|
}
|
|
2054
2086
|
if ( num_unused_rows > 0 ) {
|
|
2055
2087
|
let { id } = await scope.examinePageID( scope, 'none to match' );
|
|
2056
|
-
let msg = `
|
|
2088
|
+
let msg = `Missing variable or variables on page "${id}"`;
|
|
2057
2089
|
await scope.addToReport(scope, { type: `error`, value: msg });
|
|
2058
2090
|
expect( num_unused_rows, msg ).to.equal( 0 );
|
|
2059
2091
|
}
|
package/lib/steps.js
CHANGED
|
@@ -722,7 +722,7 @@ Then(/the "([^"]+)" link opens a working page/, { timeout: -1 }, async ( linkTex
|
|
|
722
722
|
);
|
|
723
723
|
});
|
|
724
724
|
|
|
725
|
-
When(
|
|
725
|
+
When(/I tap to continue/i, { timeout: -1 }, async () => {
|
|
726
726
|
// Any selectors for this seem somewhat precarious
|
|
727
727
|
// No data will cause an automatic continue when `ensure_navigation` is true
|
|
728
728
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
-
const fg = require('fast-glob');
|
|
3
2
|
const path = require('path');
|
|
4
3
|
require('dotenv').config();
|
|
5
4
|
|
|
@@ -38,7 +37,6 @@ session_vars.get_origin = function () {
|
|
|
38
37
|
};
|
|
39
38
|
session_vars.get_user_project_name = function () { return process.env._PROJECT_NAME || null; };
|
|
40
39
|
session_vars.get_user_id = function () { return process.env._USER_ID || null; };
|
|
41
|
-
// Avoid breaking old versions of ALKilnInThePlayground
|
|
42
40
|
session_vars.get_tags = function () {
|
|
43
41
|
if ( process.env._TAGS ) {
|
|
44
42
|
return process.env._TAGS.split(` `);
|
|
@@ -212,61 +210,6 @@ session_vars.get_artifacts_path_name = function () {
|
|
|
212
210
|
}
|
|
213
211
|
}; // Ends get_artifacts_path_name()
|
|
214
212
|
|
|
215
|
-
session_vars.set_sources_paths = function ( paths ) {
|
|
216
|
-
/** Returns whether at least one of the given path exists. Store
|
|
217
|
-
* a list of the existing paths. Warn of any missing paths. Can be
|
|
218
|
-
* used for getting, e.g .feature files, files to upload, etc.
|
|
219
|
-
*
|
|
220
|
-
* Our code should ensure this gets run before cucumber tests get triggered.
|
|
221
|
-
*
|
|
222
|
-
* @param paths { [str] } List of paths to the 'sources' folder.
|
|
223
|
-
*
|
|
224
|
-
* @returns bool
|
|
225
|
-
*/
|
|
226
|
-
|
|
227
|
-
// Check every path, tracking which exist and which are missing
|
|
228
|
-
let existing_paths = [];
|
|
229
|
-
let missing_paths = [];
|
|
230
|
-
for ( let path of paths ) {
|
|
231
|
-
let dirs = fg.sync(
|
|
232
|
-
[ path ],
|
|
233
|
-
{ onlyFiles: false, suppressErrors: true }
|
|
234
|
-
);
|
|
235
|
-
|
|
236
|
-
if ( dirs.length > 0 ) {
|
|
237
|
-
existing_paths.push( ...dirs );
|
|
238
|
-
} else {
|
|
239
|
-
missing_paths.push( path );
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// Warn about missing paths
|
|
244
|
-
if ( missing_paths.length > 0 ) {
|
|
245
|
-
console.warn(
|
|
246
|
-
`ALKiln WARNING: ALKiln can't find folders at "${ paths.join(", ") }".`
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// If no paths were valid
|
|
251
|
-
if ( existing_paths.length <= 0 ) {
|
|
252
|
-
session_vars._sources_paths = null;
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// Otherwise, store valid paths
|
|
257
|
-
session_vars._sources_paths = existing_paths;
|
|
258
|
-
return true;
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
session_vars.get_sources_paths = function () {
|
|
262
|
-
/** Get the "sources" folder path. Should never be undefined during
|
|
263
|
-
* a run of the test. run_cucumber.js should make sure it has
|
|
264
|
-
* a default value.
|
|
265
|
-
*
|
|
266
|
-
* @returns str || null */
|
|
267
|
-
return session_vars._sources_paths;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
213
|
session_vars.validateEnvironment = function() {
|
|
271
214
|
/** Throw a useful error for the developer if any of the env vars
|
|
272
215
|
* required by absolutely all tests are missing. Gather all
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suffolklitlab/alkiln",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.0.0-pre-11",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@suffolklitlab/alkiln",
|
|
9
|
-
"version": "5.
|
|
9
|
+
"version": "5.0.0-pre-11",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@axe-core/puppeteer": "4.7.3",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"dotenv": "8.2.0",
|
|
20
20
|
"fast-glob": "3.2.12",
|
|
21
21
|
"minimatch": "3.0.5",
|
|
22
|
-
"minimist": "1.2.8",
|
|
23
22
|
"mocha": "9.2.2",
|
|
24
23
|
"puppeteer": "20.8.2",
|
|
25
24
|
"qs": "6.10.3",
|
|
@@ -1941,14 +1940,6 @@
|
|
|
1941
1940
|
"node": "*"
|
|
1942
1941
|
}
|
|
1943
1942
|
},
|
|
1944
|
-
"node_modules/minimist": {
|
|
1945
|
-
"version": "1.2.8",
|
|
1946
|
-
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
|
1947
|
-
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
|
1948
|
-
"funding": {
|
|
1949
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
1950
|
-
}
|
|
1951
|
-
},
|
|
1952
1943
|
"node_modules/mitt": {
|
|
1953
1944
|
"version": "3.0.0",
|
|
1954
1945
|
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz",
|
|
@@ -4525,11 +4516,6 @@
|
|
|
4525
4516
|
"brace-expansion": "^1.1.7"
|
|
4526
4517
|
}
|
|
4527
4518
|
},
|
|
4528
|
-
"minimist": {
|
|
4529
|
-
"version": "1.2.8",
|
|
4530
|
-
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
|
4531
|
-
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
|
|
4532
|
-
},
|
|
4533
4519
|
"mitt": {
|
|
4534
4520
|
"version": "3.0.0",
|
|
4535
4521
|
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suffolklitlab/alkiln",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"dotenv": "8.2.0",
|
|
41
41
|
"fast-glob": "3.2.12",
|
|
42
42
|
"minimatch": "3.0.5",
|
|
43
|
-
"minimist": "1.2.8",
|
|
44
43
|
"mocha": "9.2.2",
|
|
45
44
|
"puppeteer": "20.8.2",
|
|
46
45
|
"qs": "6.10.3",
|