@suffolklitlab/alkiln 4.6.1 → 4.7.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.
@@ -39,6 +39,11 @@ jobs:
39
39
 
40
40
  name: Run Puppeteer tests
41
41
  steps:
42
+ - name: Set name of artifact folder with date and UTC time
43
+ # https://www.shell-tips.com/linux/how-to-format-date-and-time-in-linux-macos-and-bash/#how-to-format-a-date-in-bash
44
+ run: |
45
+ echo "ARTIFACT_NAME=alkiln_tests_output-$(date +'%Y-%m-%d at %Hhrs %Mmins %Ssecs' -u) UTC" >> $GITHUB_ENV
46
+ echo "UNIT_TESTS_ARTIFACT_NAME=_alkiln_tests_misc-$(date +'%Y-%m-%d at %Hhrs %Mmins %Ssecs' -u) UTC" >> $GITHUB_ENV
42
47
  - name: Set languages
43
48
  run: echo "EXTRA_LANGUAGES=${{ github.event.inputs.extra_languages }}" >> $GITHUB_ENV
44
49
  if: ${{ github.event.inputs.extra_languages != '' }}
@@ -53,46 +58,21 @@ jobs:
53
58
  - run: npm install
54
59
  - run: npm run setup
55
60
  - run: npm run test -- ${{ github.event.inputs.tags && format('"--tags" "{0}"', github.event.inputs.tags) }}
56
- - name: upload error artifacts
61
+ # Artifacts
62
+ - name: upload unit tests artifacts folder
57
63
  uses: actions/upload-artifact@v2
58
- if: ${{ failure() }}
59
- with:
60
- name: errors
61
- path: ./**/error*.jpg
62
- - name: upload screenshot steps
63
- uses: actions/upload-artifact@v2
64
- # They will upload even if a previosu step has failed
65
- if: ${{ always() }}
66
- with:
67
- name: screenshots
68
- path: ./**/screenshot*.jpg
69
- - name: upload downloads
70
- uses: actions/upload-artifact@v2
71
- # They will upload even if a previous step has failed
72
- if: ${{ always() }}
73
- with:
74
- name: downloads
75
- path: ./**/downloads_*
76
- - name: upload report
77
- uses: actions/upload-artifact@v2
78
- # They will upload even if a previous step has failed
79
- if: ${{ always() }}
80
- with:
81
- name: report
82
- path: ./**/*_report_*
83
- - name: upload a11y reports
84
- uses: actions/upload-artifact@v2
85
- # They will upload even if a previous step has failed
64
+ # This will upload even if a previous step has failed
86
65
  if: ${{ always() }}
87
66
  with:
88
- name: a11y report
89
- path: ./**/aXe_failure_*
90
- - name: upload debug_log artifact
67
+ name: ${{ env.UNIT_TESTS_ARTIFACT_NAME }}
68
+ path: ./_alkiln_tests_misc-*
69
+ - name: upload integration tests artifacts folder
91
70
  uses: actions/upload-artifact@v2
92
71
  if: ${{ always() }}
93
72
  with:
94
- name: debug_log file
95
- path: ./debug_log.txt
73
+ name: ${{ env.ARTIFACT_NAME }}
74
+ path: ./alkiln_tests_output-*
75
+ # Delete Playground Project and project name file
96
76
  - name: Cleanup
97
77
  if: ${{ always() }}
98
78
  run: npm run takedown
package/CHANGELOG.md CHANGED
@@ -40,6 +40,32 @@ Format:
40
40
  -->
41
41
  <!-- ## [Unreleased] -->
42
42
 
43
+ ## [4.7.1] - 2022-08-07
44
+ ### Changed
45
+ - Ensure unique folder names for random input screenshots in case developer uses multiple random steps in one Scenario.
46
+ - Ensure random input detects unexpected interview errors.
47
+
48
+ ### Fixed
49
+ - Fix failure when signature page is the first screen.
50
+ - Internal tests failing even when failure status is as expected.
51
+ - Double printing in report of scenario failure, one of them even when Scenario was possibly non-failure, like skipped.
52
+
53
+ ## [4.7.0] - 2022-07-27
54
+ ### Added
55
+ - 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.
56
+
57
+ ### Changed
58
+ - Add page id to the "Missing Variable or variables on page" error report
59
+ - Allows Story Tables to not include a header row, as long as they have 2 or 3 columns.
60
+ This isn't the suggested way at the moment, since including headers is more readable,
61
+ but can prevent confusing and unnecessary errors.
62
+
63
+ ## [4.6.2] - 2022-06-28
64
+ ### Changed
65
+ - Put cucumber tests' artifacts in one folder. See https://github.com/SuffolkLITLab/ALKiln/issues/552.
66
+ - Add separate artifacts dir for our own internal tests, like unit tests
67
+ - Abstract names of some of those artifact directories
68
+
43
69
  ## [4.6.1] - 2022-06-28
44
70
  ### Fixed
45
71
  - Single dropdown fields on pages are now recognized as fields properly
package/action.yml CHANGED
@@ -36,12 +36,14 @@ inputs:
36
36
  runs:
37
37
  using: "composite"
38
38
  steps:
39
-
40
39
  # Set environment variables
41
40
  - name: "ALKiln: Set environment variables"
42
41
  # If extra languages were set manually, override the repository
43
42
  # EXTRA_LANGUAGES secret with the manually set values
43
+ # Human-readable date/time:
44
+ # https://www.shell-tips.com/linux/how-to-format-date-and-time-in-linux-macos-and-bash/#how-to-format-a-date-in-bash
44
45
  run: |
46
+ echo "ARTIFACT_NAME=alkiln_tests_output $(date +'%Y-%m-%d at %Hhrs %Mmins %Ssecs' -u) UTC" >> $GITHUB_ENV
45
47
  if ${{ github.event.inputs.extra_languages != '' }}
46
48
  then
47
49
  echo "Manually set languages: ${{ github.event.inputs.extra_languages }}"
@@ -121,39 +123,12 @@ runs:
121
123
  shell: bash
122
124
 
123
125
  # Upload artifacts that subscribers can download on the Actions summary page
124
- - name: "ALKiln: Upload errors to action summary artifacts"
125
- if: ${{ failure() }}
126
- uses: actions/upload-artifact@v2
127
- with:
128
- name: errors
129
- path: ./**/error*.jpg
130
- - name: "ALKiln: Upload screenshots to action summary artifacts"
131
- if: ${{ always() }}
132
- uses: actions/upload-artifact@v2
133
- #if-no-files-found: ignore
134
- with:
135
- name: screenshots
136
- path: ./**/screenshot*.jpg
137
- - name: "ALKiln: Upload downloaded files to action summary artifacts"
138
- if: ${{ always() }}
139
- uses: actions/upload-artifact@v2
140
- #if-no-files-found: ignore
141
- with:
142
- name: downloads
143
- path: ./**/downloads_*
144
- - name: "ALKiln: Upload report to action summary artifacts"
145
- if: ${{ always() }}
146
- uses: actions/upload-artifact@v2
147
- with:
148
- name: report
149
- path: ./**/*_report_*
150
- - name: "ALKiln: Upload Accessibility failures, if any, to action summary artifacts"
126
+ - name: "ALKiln: Upload artifacts folder"
151
127
  if: ${{ always() }}
152
128
  uses: actions/upload-artifact@v2
153
- # They will upload even if a previous step has failed
154
129
  with:
155
- name: a11y report
156
- path: ./**/aXe_failure*
130
+ name: ${{ env.ARTIFACT_NAME }}
131
+ path: ./alkiln_tests_output-*
157
132
 
158
133
  # ##################################
159
134
  # # A developer's workflow should look similar to the below
@@ -184,8 +159,4 @@ runs:
184
159
  # with:
185
160
  # SERVER_URL: "${{ secrets.SERVER_URL }}"
186
161
  # DOCASSEMBLE_DEVELOPER_API_KEY: "${{ secrets.DOCASSEMBLE_DEVELOPER_API_KEY }}"
187
- # PLAYGROUND_EMAIL: "${{ secrets.PLAYGROUND_EMAIL }}"
188
- # PLAYGROUND_PASSWORD: "${{ secrets.PLAYGROUND_PASSWORD }}"
189
- # PLAYGROUND_ID: "${{ secrets.PLAYGROUND_ID }}"
190
- # EXTRA_LANGUAGES: "${{ secrets.EXTRA_LANGUAGES }}"
191
162
  # - run: echo "Finished running ALKiln tests"
@@ -3,6 +3,7 @@
3
3
  const da_i = require('./docassemble_api_interface');
4
4
  const log = require('../utils/log');
5
5
  const session_vars = require('../utils/session_vars' );
6
+ const files = require('../utils/files' );
6
7
 
7
8
 
8
9
  const setup = async () => {
@@ -30,6 +31,11 @@ const setup = async () => {
30
31
  await da_i.wait_for_server_to_restart( task_id );
31
32
  }
32
33
 
34
+ // Make the folder to store all the files for this run of the tests
35
+ const artifacts_path_name = files.make_artifacts_folder();
36
+ // Save its name in a file. `session_vars` can get it back later.
37
+ session_vars.save_artifacts_path_name( artifacts_path_name );
38
+
33
39
  // Finish
34
40
  log.info({ type: `setup`, pre: `Success! Test setup has finished successfully.` });
35
41
  }; // Ends setup();