@suffolklitlab/alkiln 5.12.0 → 5.13.0-logs1
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/.env.example +29 -0
- package/.github/workflows/github_server.yml +59 -12
- package/.github/workflows/playground.yml +11 -4
- package/CHANGELOG.md +41 -1
- package/CONTRIBUTING.md +98 -83
- package/README.md +1 -1
- package/action.yml +67 -29
- package/action_for_github_server/action.yml +59 -31
- package/docs/decisions/006_which_log_level_to_pick_2024_09_5.md +46 -0
- package/docs/decisions/adopt_architectural_decision_records.md +58 -0
- package/docs/decisions/detect_sign_in.md +124 -0
- package/docs/decisions/pdfjs_version_2024_08_08.md +18 -0
- package/docs/decisions/reports_and_logs_2024_08_11.md +141 -0
- package/docs/decisions/update_puppeteer_2024_07_28.md +62 -0
- package/docs/story_tables.md +1 -1
- package/lib/docassemble/docassemble_api_REST.js +67 -1
- package/lib/docassemble/docassemble_api_interface.js +225 -18
- package/lib/docassemble/server_install.js +23 -9
- package/lib/docassemble/setup.js +33 -20
- package/lib/docassemble/takedown.js +27 -7
- package/lib/run_cucumber.js +83 -33
- package/lib/scope.js +222 -82
- package/lib/steps.js +206 -62
- package/lib/utils/files.js +8 -6
- package/lib/utils/log.js +477 -84
- package/lib/utils/reports.js +14 -5
- package/lib/utils/session_vars.js +25 -18
- package/lib/utils/time.js +44 -0
- package/npm-shrinkwrap.json +635 -193
- package/package.json +8 -8
- package/setup.py +1 -1
- package/tests/log_codes/check_codes.sh +163 -108
- package/tests/log_codes/log_code_expected_instances.txt +213 -0
- package/tests/unit_tests/getAllFields.test.js +5 -0
- package/tests/unit_tests/getMatchingRows.test.js +5 -0
- package/tests/unit_tests/log.test.js +20 -0
- package/tests/unit_tests/normalizeTable.test.js +5 -0
- package/tests/log_codes/deleted_codes.json +0 -8
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suffolklitlab/alkiln",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.0-logs1",
|
|
4
4
|
"description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "npm run unit && npm run codes && npm run cucumber",
|
|
8
8
|
"cucumber": "./lib/run_cucumber.js",
|
|
9
9
|
"local": "npm run setup && npm run cucumber; npm run takedown",
|
|
10
|
-
"pass": "npm run cucumber 'not @error'",
|
|
10
|
+
"pass": "npm run cucumber 'not @error and not @temp_error'",
|
|
11
11
|
"fail": "npm run cucumber '@error'",
|
|
12
12
|
"setup": "./lib/docassemble/setup.js",
|
|
13
13
|
"takedown": "./lib/docassemble/takedown.js",
|
|
@@ -32,26 +32,26 @@
|
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/SuffolkLITLab/ALKiln/issues"
|
|
34
34
|
},
|
|
35
|
-
"homepage": "https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/
|
|
35
|
+
"homepage": "https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/alkiln/intro",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@axe-core/puppeteer": "4.7.3",
|
|
38
38
|
"@cucumber/cucumber": "9.3.0",
|
|
39
39
|
"@faker-js/faker": "7.3.0",
|
|
40
|
-
"axios": "
|
|
40
|
+
"axios": "1.7.3",
|
|
41
41
|
"chai": "4.2.0",
|
|
42
42
|
"cheerio": "1.0.0-rc.10",
|
|
43
43
|
"deep-equal-in-any-order": "2.0.0",
|
|
44
|
+
"diff": "5.0.0",
|
|
44
45
|
"dotenv": "8.2.0",
|
|
45
46
|
"fast-glob": "3.2.12",
|
|
46
47
|
"minimatch": "3.0.5",
|
|
47
48
|
"minimist": "1.2.8",
|
|
48
49
|
"mocha": "9.2.2",
|
|
49
|
-
"
|
|
50
|
+
"pdfjs-dist": "3.2.146",
|
|
51
|
+
"puppeteer": "22.15.0",
|
|
50
52
|
"qs": "6.10.3",
|
|
51
53
|
"sanitize-filename": "1.6.3",
|
|
52
|
-
"uuid": "8.3.2"
|
|
53
|
-
"pdfjs-dist": "3.2.146",
|
|
54
|
-
"diff": "5.0.0"
|
|
54
|
+
"uuid": "8.3.2"
|
|
55
55
|
},
|
|
56
56
|
"bin": {
|
|
57
57
|
"alkiln-server-install": "./lib/docassemble/server_install.js",
|
package/setup.py
CHANGED
|
@@ -50,7 +50,7 @@ setup(name='docassemble.ALKilnTests',
|
|
|
50
50
|
author='plocket',
|
|
51
51
|
author_email='example@example.com',
|
|
52
52
|
license='The MIT License (MIT)',
|
|
53
|
-
url='https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/alkiln',
|
|
53
|
+
url='https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/alkiln/intro',
|
|
54
54
|
packages=find_packages(),
|
|
55
55
|
namespace_packages=['docassemble'],
|
|
56
56
|
install_requires=['docassemble.ALToolbox>=0.8.2', 'docassemble.AssemblyLine>=2.24.0'],
|
|
@@ -1,139 +1,194 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
# Identify missing and duplicate
|
|
3
|
+
# Identify missing and/or duplicate log codes
|
|
4
|
+
|
|
5
|
+
# Profiling performance
|
|
6
|
+
# set -x
|
|
7
|
+
# PS4='+ $EPOCHREALTIME ($LINENO) '
|
|
8
|
+
# alias echo='time echo'
|
|
4
9
|
|
|
5
10
|
exit_code=0
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
echo " -------------------------------------------------------
|
|
13
|
+
| Usage: |
|
|
14
|
+
| bash $(basename $0) [dir] [c file] [c folder] [-l arg]
|
|
15
|
+
| dir: The directory in which to search for logs |
|
|
16
|
+
| c file: Name of the log instance counter file |
|
|
17
|
+
| c folder: Path to the folder of the log counter file |
|
|
18
|
+
| -l arg: \"1\" prints extra logs |
|
|
19
|
+
-------------------------------------------------------"
|
|
20
|
+
|
|
21
|
+
# Get flags and their values
|
|
22
|
+
loudness="0"
|
|
23
|
+
while getopts ':l:' opt; do
|
|
24
|
+
case "${opt}" in
|
|
25
|
+
l) loudness="${OPTARG}";;
|
|
26
|
+
\?) script_args+=("-$OPTARG");;
|
|
27
|
+
esac
|
|
28
|
+
done
|
|
15
29
|
|
|
16
|
-
#
|
|
17
|
-
# removed and are no longer used. Syntax used works with GitHub cli ([[:digit:]])
|
|
18
|
-
# https://stackoverflow.com/a/6901221
|
|
19
|
-
lines=$(grep -roh --exclude="tests/log_codes/check_codes.sh" --exclude="debug_log.txt" --exclude="cucumber-report.txt" --exclude-dir="node_modules" --exclude-dir='alkiln-*' --exclude-dir='_alkiln*' 'ALK[[:digit:]][[:digit:]][[:digit:]][[:digit:]]' "$directory")
|
|
20
|
-
sorted=$(echo "$lines" | sort -n)
|
|
30
|
+
# Use global "option index" to get the next args
|
|
21
31
|
|
|
32
|
+
where_to_look=${@:$OPTIND:1} # User's value
|
|
33
|
+
if [ "$where_to_look" = "" ]; then
|
|
34
|
+
where_to_look="../.." # Default value
|
|
35
|
+
fi
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
expected_instances_file=${@:$OPTIND+1:1} # User's value
|
|
38
|
+
if [ "$expected_instances_file" = "" ]; then
|
|
39
|
+
expected_instances_file="log_code_expected_instances.txt" # Default value
|
|
40
|
+
fi
|
|
24
41
|
|
|
25
|
-
#
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
expected_instances_folder=${@:$OPTIND+2:1} # User's value
|
|
43
|
+
if [ "$expected_instances_folder" = "" ]; then
|
|
44
|
+
expected_instances_folder="$where_to_look/tests/log_codes" # Default value
|
|
45
|
+
fi
|
|
29
46
|
|
|
30
|
-
|
|
31
|
-
# prev_number=0
|
|
32
|
-
# echo "$nums" | while read -r current_number; do
|
|
47
|
+
expected_instances_path="$expected_instances_folder/$expected_instances_file"
|
|
33
48
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# printf -v missing_number "ALK%04d" $i
|
|
40
|
-
# missing_numbers+=("$missing_number")
|
|
41
|
-
# echo $missing_number
|
|
42
|
-
# # missing_numbers+=$(echo "%04d\n" $missing_number)
|
|
43
|
-
# done
|
|
44
|
-
# echo "---"
|
|
45
|
-
# fi
|
|
49
|
+
if [[ "$loudness" != "0" ]]; then
|
|
50
|
+
echo "loudness: $loudness"
|
|
51
|
+
echo "where_to_look: $where_to_look"
|
|
52
|
+
echo "File showing expected instances of log codes: $expected_instances_path"
|
|
53
|
+
fi
|
|
46
54
|
|
|
47
|
-
# prev_number=$current_number
|
|
48
55
|
|
|
49
|
-
#
|
|
56
|
+
# removed and are no longer used. Syntax used works with GitHub cli - [[:digit:]]
|
|
57
|
+
# https://stackoverflow.com/a/6901221
|
|
58
|
+
# Exclude files and paths
|
|
59
|
+
instances=$(find "$where_to_look" -type f ! -name "check_codes.sh" ! -name "CONTRIBUTING.md" ! -name "$expected_instances_file" ! -name "debug_log.txt" ! -name "cucumber-report.txt" ! -path "*/node_modules/*" ! -path "*/ALKilnTests/*" ! -path "*/alkiln-*/*" ! -path "*/_alkiln*/*" ! -path "*/docs/decisions/*" ! -path "*/\.*" -print0 | xargs -0 -P 4 grep -0 -ro 'ALK[[:digit:]][[:digit:]][[:digit:]][[:digit:]]' | grep -v -- '--' )
|
|
50
60
|
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
if [[ "$loudness" != "0" ]]; then
|
|
62
|
+
total_instances=$(echo "$instances" | wc -l)
|
|
63
|
+
echo "Number 'ALK' logs found: $total_instances"
|
|
64
|
+
fi
|
|
53
65
|
|
|
66
|
+
# Get the unique paths for every code
|
|
67
|
+
codes_unique_paths=()
|
|
68
|
+
# Also get the actual highest code by its number
|
|
69
|
+
highest_code="1"
|
|
70
|
+
for one_code in $instances; do
|
|
71
|
+
# Format of the string is "the/path:ALK####"
|
|
72
|
+
# Split around the ":"
|
|
73
|
+
path=$(echo "$one_code" | cut -d ":" -f 1)
|
|
74
|
+
code=$(echo "$one_code" | cut -d ":" -f 2)
|
|
75
|
+
# Get the code as an integer
|
|
76
|
+
item_index=$(echo "$code" | sed 's/^ALK0*//')
|
|
77
|
+
if [[ $item_index == "" ]]; then
|
|
78
|
+
item_index=0
|
|
79
|
+
fi
|
|
80
|
+
# This name is bad. It's really each log code's
|
|
81
|
+
# unique appearance. We could just use any string,
|
|
82
|
+
# but the path name gives a little more info.
|
|
83
|
+
# ¯\_(ツ)_/¯
|
|
84
|
+
# Also, we really want a list here, but bash can't
|
|
85
|
+
# make nested lists, so we're using ";" as a safe
|
|
86
|
+
# delimiter. If the user wants verbose output,
|
|
87
|
+
# we can also use it to help format the output.
|
|
88
|
+
codes_unique_paths[$item_index]+=";$path"
|
|
89
|
+
|
|
90
|
+
if (( highest_code < item_index )); then
|
|
91
|
+
highest_code="$item_index"
|
|
92
|
+
fi
|
|
93
|
+
done
|
|
54
94
|
|
|
55
|
-
|
|
56
|
-
|
|
95
|
+
if [[ "$loudness" != "0" ]]; then
|
|
96
|
+
echo "Instance count: ${#codes_unique_paths[@]}"
|
|
97
|
+
echo ">>> highest_code <<<: $highest_code"
|
|
98
|
+
echo "Paths of ALK0000: ${codes_unique_paths[0]}"
|
|
99
|
+
fi
|
|
57
100
|
|
|
58
|
-
|
|
59
|
-
|
|
101
|
+
indx=0
|
|
102
|
+
too_many=()
|
|
103
|
+
missing=()
|
|
104
|
+
while [ "$indx" -lt "$highest_code" ]; do
|
|
105
|
+
# Turn the index into a log code by prepending ALK and adding leading zeros
|
|
106
|
+
log_code=$(printf "ALK%04d" "$indx")
|
|
107
|
+
# Count ";" - a stand-in for the number of
|
|
108
|
+
# instances of the log code
|
|
109
|
+
num_paths=$(echo "${codes_unique_paths[$indx]}" | awk '{orig_len = length($0); gsub(/;/, "", $0); new_len = length($0); print orig_len - new_len}')
|
|
110
|
+
# The # of expected instances of the log code
|
|
111
|
+
# in all the relevant ALKiln files.
|
|
112
|
+
num_expected=($(grep -oh "$log_code:[[:digit:]]" "$expected_instances_path" | sed 's/^ALK[[:digit:]][[:digit:]][[:digit:]][[:digit:]]://'))
|
|
113
|
+
# The file tracking the # of expected instances
|
|
114
|
+
# may have a typo. One likely typo is we can catch:
|
|
115
|
+
# Putting 2 entries for one log code in the file.
|
|
116
|
+
num_expectations_found=${#num_expected[@]}
|
|
117
|
+
if [[ "$num_expectations_found" -gt "1" ]]; then
|
|
118
|
+
echo "WARNING: Multiple entries of '$log_code' in $expected_instances_path. Using the first one because that's easiest: ${num_expected[0]}"
|
|
119
|
+
num_expected=${num_expected[0]}
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
if [[ "$num_expected" == "" ]]; then
|
|
123
|
+
num_expected="1"
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
# To add to the list of strings to print later
|
|
127
|
+
short_msg="$log_code $num_paths/$num_expected"
|
|
128
|
+
long_msg="$log_code act/exp "
|
|
129
|
+
long_msg+="$num_paths/$num_expected:"
|
|
130
|
+
long_msg+=$(echo "${codes_unique_paths[$indx]}" | sed 's/;/\n - /g')
|
|
131
|
+
|
|
132
|
+
# missing
|
|
133
|
+
if [ "$num_paths" -lt "$num_expected" ]; then
|
|
134
|
+
if [[ "$loudness" != "0" ]]; then
|
|
135
|
+
missing+=("$long_msg")
|
|
136
|
+
else
|
|
137
|
+
missing+=("$short_msg")
|
|
138
|
+
fi
|
|
139
|
+
|
|
140
|
+
# too_many
|
|
141
|
+
elif [ "$num_paths" -gt "$num_expected" ]; then
|
|
142
|
+
if [[ "$loudness" != "0" ]]; then
|
|
143
|
+
too_many+=("$long_msg")
|
|
144
|
+
else
|
|
145
|
+
too_many+=("$short_msg")
|
|
146
|
+
fi
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
let indx++
|
|
150
|
+
done
|
|
60
151
|
|
|
61
|
-
# Convert the list into an array
|
|
62
|
-
IFS=$'\n' read -rd '' -a num_array <<<"$just_numbers"
|
|
63
|
-
# Find the minimum and maximum numbers in the array
|
|
64
|
-
min_num=$(printf "%s\n" "${num_array[@]}" | sort -n | head -n 1)
|
|
65
|
-
max_num=$(printf "%s\n" "${num_array[@]}" | sort -n | tail -n 1)
|
|
66
152
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
expected_sequence+=$(printf "ALK%04d" $i)$'\n'
|
|
72
|
-
done
|
|
73
|
-
# # Alternative code for above. seq doesn't exist everywhere. Keep this
|
|
74
|
-
# till we look up installing seq to avoid loop)
|
|
75
|
-
# expected_sequence=$(printf "ALK%04d\n" $(seq $min_num $max_num))
|
|
76
|
-
|
|
77
|
-
# Compare the expected sequence with the actual numbers
|
|
78
|
-
missing_numbers=$(comm -23 <(printf "%s\n" "$expected_sequence" | sort -n) <(printf "%s\n" "$sorted"))
|
|
79
|
-
if [ -z "$missing_numbers" ]; then
|
|
80
|
-
echo "None"
|
|
81
|
-
else
|
|
82
|
-
echo "$missing_numbers"
|
|
83
|
-
((exit_code+=2))
|
|
153
|
+
if [[ "$loudness" != "0" ]]; then
|
|
154
|
+
echo ""
|
|
155
|
+
echo "Missing count: ${#missing[@]}"
|
|
156
|
+
echo "Too many count: ${#too_many[@]}"
|
|
84
157
|
fi
|
|
85
158
|
|
|
159
|
+
# === Results ===
|
|
86
160
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
accepted_duplicates="ALK0000
|
|
92
|
-
ALK0002
|
|
93
|
-
ALK0003
|
|
94
|
-
ALK0006
|
|
95
|
-
ALK0007
|
|
96
|
-
ALK0008
|
|
97
|
-
ALK0009
|
|
98
|
-
ALK0010
|
|
99
|
-
ALK0011
|
|
100
|
-
ALK0012
|
|
101
|
-
ALK0018
|
|
102
|
-
ALK0019
|
|
103
|
-
ALK0023
|
|
104
|
-
ALK0024
|
|
105
|
-
ALK0026
|
|
106
|
-
ALK0027
|
|
107
|
-
ALK0028
|
|
108
|
-
ALK0030
|
|
109
|
-
ALK0049
|
|
110
|
-
ALK0184"
|
|
111
|
-
|
|
112
|
-
# Use a sorted list. `uniq` only detects consecutive duplicates
|
|
113
|
-
duplicates=$(echo "$sorted" | uniq -d)
|
|
114
|
-
unaccepted_duplicates=$(echo "$duplicates" | grep -v -f <(echo "$accepted_duplicates"))
|
|
115
|
-
|
|
116
|
-
if [ -z "$unaccepted_duplicates" ]; then
|
|
117
|
-
echo "None"
|
|
161
|
+
printf "\n=== Missing instances (actual/expected) ===\n"
|
|
162
|
+
if [[ "${#missing[@]}" > 0 ]]; then
|
|
163
|
+
printf '%s\n' "${missing[@]}"
|
|
164
|
+
((exit_code+=2))
|
|
118
165
|
else
|
|
119
|
-
|
|
120
|
-
((exit_code+=20))
|
|
166
|
+
printf "None"
|
|
121
167
|
fi
|
|
122
168
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
169
|
+
printf "\n\n=== Too many instances (actual/expected) ===\n"
|
|
170
|
+
if [[ "${#too_many[@]}" > 0 ]]; then
|
|
171
|
+
printf '%s\n' "${too_many[@]}"
|
|
172
|
+
((exit_code+=20))
|
|
173
|
+
else
|
|
174
|
+
printf "None"
|
|
175
|
+
fi
|
|
130
176
|
|
|
131
177
|
if test $exit_code -eq 0; then
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
echo "The highest log code is $highest"
|
|
178
|
+
printf "\n\n🌈 Passed! The codes for logs are as they should be."
|
|
179
|
+
printf "\n\n💡 Highest log code: $highest_code\n"
|
|
135
180
|
else
|
|
136
|
-
|
|
181
|
+
printf "\n\n🤕 ERROR: "
|
|
182
|
+
if [[ "$exit_code" == "2" ]]; then
|
|
183
|
+
printf "Missing codes"
|
|
184
|
+
elif [[ "$exit_code" == "20" ]]; then
|
|
185
|
+
printf "Duplicate codes"
|
|
186
|
+
elif [[ "$exit_code" == "22" ]]; then
|
|
187
|
+
printf "Both missing and duplicate codes"
|
|
188
|
+
fi
|
|
189
|
+
echo ""
|
|
190
|
+
echo "Exit code: $exit_code"
|
|
137
191
|
fi
|
|
138
192
|
|
|
193
|
+
|
|
139
194
|
exit $exit_code
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
The log codes we have or have had in our ALKiln code base and the number of times each log code should appear in our code base to make sure that we don't repeat codes where we shouldn't and that we don't leave out/skip code numbers. 0 means a code we have deleted from ALKiln.
|
|
2
|
+
|
|
3
|
+
Why we need duplicate codes sometimes: GitHub actions sometimes don't have ways to avoid writing a code in both the `name` of a step and in the `run` value. Using it in both places is a decision we've currently made. Other codes are used in multiple places as defaults. These are a couple of examples of why this can be useful.
|
|
4
|
+
|
|
5
|
+
The script that tests the log codes will ignore this file (or any file with this name), and any file with these names: check_codes.sh, debug_log.txt, cucumber-report.txt. It will also ignore files in folders with these names:, node_modules, ALKilnTests, alkiln-*, _alkiln*. That list might get updated, so for an up-to-date list, always check the file check_codes.sh where we use `--exclude=` and such.
|
|
6
|
+
|
|
7
|
+
Reasons for deletion:
|
|
8
|
+
0053 - duplicate log
|
|
9
|
+
0173 - redundant
|
|
10
|
+
|
|
11
|
+
ALK0000:0
|
|
12
|
+
ALK0001:1
|
|
13
|
+
ALK0002:2
|
|
14
|
+
ALK0003:2
|
|
15
|
+
ALK0004:1
|
|
16
|
+
ALK0005:1
|
|
17
|
+
ALK0006:2
|
|
18
|
+
ALK0007:3
|
|
19
|
+
ALK0008:3
|
|
20
|
+
ALK0009:2
|
|
21
|
+
ALK0010:2
|
|
22
|
+
ALK0011:3
|
|
23
|
+
ALK0012:2
|
|
24
|
+
ALK0013:1
|
|
25
|
+
ALK0014:1
|
|
26
|
+
ALK0015:1
|
|
27
|
+
ALK0016:1
|
|
28
|
+
ALK0017:1
|
|
29
|
+
ALK0018:2
|
|
30
|
+
ALK0019:2
|
|
31
|
+
ALK0020:1
|
|
32
|
+
ALK0021:1
|
|
33
|
+
ALK0022:1
|
|
34
|
+
ALK0023:2
|
|
35
|
+
ALK0024:2
|
|
36
|
+
ALK0025:1
|
|
37
|
+
ALK0026:2
|
|
38
|
+
ALK0027:2
|
|
39
|
+
ALK0028:3
|
|
40
|
+
ALK0029:2
|
|
41
|
+
ALK0030:2
|
|
42
|
+
ALK0031:2
|
|
43
|
+
ALK0032:2
|
|
44
|
+
ALK0033:1
|
|
45
|
+
ALK0034:1
|
|
46
|
+
ALK0035:1
|
|
47
|
+
ALK0036:1
|
|
48
|
+
ALK0037:1
|
|
49
|
+
ALK0038:1
|
|
50
|
+
ALK0039:1
|
|
51
|
+
ALK0040:1
|
|
52
|
+
ALK0041:1
|
|
53
|
+
ALK0042:1
|
|
54
|
+
ALK0043:1
|
|
55
|
+
ALK0044:1
|
|
56
|
+
ALK0045:1
|
|
57
|
+
ALK0046:1
|
|
58
|
+
ALK0047:1
|
|
59
|
+
ALK0048:1
|
|
60
|
+
ALK0049:1
|
|
61
|
+
ALK0050:1
|
|
62
|
+
ALK0051:1
|
|
63
|
+
ALK0052:1
|
|
64
|
+
ALK0053:0
|
|
65
|
+
ALK0054:1
|
|
66
|
+
ALK0055:1
|
|
67
|
+
ALK0056:1
|
|
68
|
+
ALK0057:1
|
|
69
|
+
ALK0058:1
|
|
70
|
+
ALK0059:1
|
|
71
|
+
ALK0060:1
|
|
72
|
+
ALK0061:1
|
|
73
|
+
ALK0062:1
|
|
74
|
+
ALK0063:1
|
|
75
|
+
ALK0064:1
|
|
76
|
+
ALK0065:1
|
|
77
|
+
ALK0066:1
|
|
78
|
+
ALK0067:1
|
|
79
|
+
ALK0068:1
|
|
80
|
+
ALK0069:1
|
|
81
|
+
ALK0070:1
|
|
82
|
+
ALK0071:1
|
|
83
|
+
ALK0072:1
|
|
84
|
+
ALK0073:1
|
|
85
|
+
ALK0074:1
|
|
86
|
+
ALK0075:1
|
|
87
|
+
ALK0076:1
|
|
88
|
+
ALK0077:1
|
|
89
|
+
ALK0078:1
|
|
90
|
+
ALK0079:1
|
|
91
|
+
ALK0080:1
|
|
92
|
+
ALK0081:1
|
|
93
|
+
ALK0082:1
|
|
94
|
+
ALK0083:1
|
|
95
|
+
ALK0084:1
|
|
96
|
+
ALK0085:1
|
|
97
|
+
ALK0086:1
|
|
98
|
+
ALK0087:1
|
|
99
|
+
ALK0088:1
|
|
100
|
+
ALK0089:1
|
|
101
|
+
ALK0090:1
|
|
102
|
+
ALK0091:1
|
|
103
|
+
ALK0092:1
|
|
104
|
+
ALK0093:1
|
|
105
|
+
ALK0094:1
|
|
106
|
+
ALK0095:1
|
|
107
|
+
ALK0096:1
|
|
108
|
+
ALK0097:1
|
|
109
|
+
ALK0098:1
|
|
110
|
+
ALK0099:1
|
|
111
|
+
ALK0100:1
|
|
112
|
+
ALK0101:1
|
|
113
|
+
ALK0102:1
|
|
114
|
+
ALK0103:1
|
|
115
|
+
ALK0104:1
|
|
116
|
+
ALK0105:1
|
|
117
|
+
ALK0106:1
|
|
118
|
+
ALK0107:1
|
|
119
|
+
ALK0108:1
|
|
120
|
+
ALK0109:1
|
|
121
|
+
ALK0110:1
|
|
122
|
+
ALK0111:1
|
|
123
|
+
ALK0112:1
|
|
124
|
+
ALK0113:1
|
|
125
|
+
ALK0114:1
|
|
126
|
+
ALK0115:1
|
|
127
|
+
ALK0116:1
|
|
128
|
+
ALK0117:1
|
|
129
|
+
ALK0118:1
|
|
130
|
+
ALK0119:1
|
|
131
|
+
ALK0120:1
|
|
132
|
+
ALK0121:1
|
|
133
|
+
ALK0122:1
|
|
134
|
+
ALK0123:1
|
|
135
|
+
ALK0124:1
|
|
136
|
+
ALK0125:1
|
|
137
|
+
ALK0126:1
|
|
138
|
+
ALK0127:1
|
|
139
|
+
ALK0128:1
|
|
140
|
+
ALK0129:1
|
|
141
|
+
ALK0130:1
|
|
142
|
+
ALK0131:1
|
|
143
|
+
ALK0132:1
|
|
144
|
+
ALK0133:1
|
|
145
|
+
ALK0134:1
|
|
146
|
+
ALK0135:1
|
|
147
|
+
ALK0136:1
|
|
148
|
+
ALK0137:1
|
|
149
|
+
ALK0138:1
|
|
150
|
+
ALK0139:1
|
|
151
|
+
ALK0140:1
|
|
152
|
+
ALK0141:1
|
|
153
|
+
ALK0142:1
|
|
154
|
+
ALK0143:1
|
|
155
|
+
ALK0144:1
|
|
156
|
+
ALK0145:1
|
|
157
|
+
ALK0146:1
|
|
158
|
+
ALK0147:1
|
|
159
|
+
ALK0148:1
|
|
160
|
+
ALK0149:1
|
|
161
|
+
ALK0150:1
|
|
162
|
+
ALK0151:1
|
|
163
|
+
ALK0152:1
|
|
164
|
+
ALK0153:1
|
|
165
|
+
ALK0154:1
|
|
166
|
+
ALK0155:1
|
|
167
|
+
ALK0156:1
|
|
168
|
+
ALK0157:1
|
|
169
|
+
ALK0158:1
|
|
170
|
+
ALK0159:1
|
|
171
|
+
ALK0160:1
|
|
172
|
+
ALK0161:1
|
|
173
|
+
ALK0162:1
|
|
174
|
+
ALK0163:1
|
|
175
|
+
ALK0164:1
|
|
176
|
+
ALK0165:1
|
|
177
|
+
ALK0166:1
|
|
178
|
+
ALK0167:1
|
|
179
|
+
ALK0168:1
|
|
180
|
+
ALK0169:1
|
|
181
|
+
ALK0170:1
|
|
182
|
+
ALK0171:1
|
|
183
|
+
ALK0172:1
|
|
184
|
+
ALK0173:0
|
|
185
|
+
ALK0174:1
|
|
186
|
+
ALK0175:1
|
|
187
|
+
ALK0176:1
|
|
188
|
+
ALK0177:1
|
|
189
|
+
ALK0178:1
|
|
190
|
+
ALK0179:1
|
|
191
|
+
ALK0180:1
|
|
192
|
+
ALK0181:1
|
|
193
|
+
ALK0182:1
|
|
194
|
+
ALK0183:1
|
|
195
|
+
ALK0184:2
|
|
196
|
+
ALK0185:1
|
|
197
|
+
ALK0186:1
|
|
198
|
+
ALK0187:1
|
|
199
|
+
ALK0188:1
|
|
200
|
+
ALK0189:1
|
|
201
|
+
ALK0190:1
|
|
202
|
+
ALK0191:1
|
|
203
|
+
ALK0192:1
|
|
204
|
+
ALK0193:1
|
|
205
|
+
ALK0194:1
|
|
206
|
+
ALK0195:1
|
|
207
|
+
ALK0196:1
|
|
208
|
+
ALK0197:1
|
|
209
|
+
ALK0198:1
|
|
210
|
+
ALK0199:1
|
|
211
|
+
ALK0200:1
|
|
212
|
+
ALK0201:1
|
|
213
|
+
ALK0202:1
|
|
@@ -7,6 +7,11 @@ chai.use(deepEqualInAnyOrder);
|
|
|
7
7
|
const html = require('./html.fixtures.js');
|
|
8
8
|
const fields = require('./fields.fixtures.js');
|
|
9
9
|
const scope = require('../../lib/scope.js');
|
|
10
|
+
|
|
11
|
+
const Log = require(`../../lib/utils/log.js`);
|
|
12
|
+
const log = new Log({ path: `_alkiln-misc_artifacts`, context: `unit_tests getAllFields` });
|
|
13
|
+
scope.set_log({ log_obj: log });
|
|
14
|
+
|
|
10
15
|
const getAllFields = scope.getAllFields;
|
|
11
16
|
|
|
12
17
|
chai.config.truncateThreshold = 0
|
|
@@ -6,6 +6,11 @@ const tables = require('./tables.fixtures.js');
|
|
|
6
6
|
const fields = require('./fields.fixtures.js');
|
|
7
7
|
const matches = require('./matches.fixtures.js');
|
|
8
8
|
const scope = require('../../lib/scope.js');
|
|
9
|
+
|
|
10
|
+
const Log = require(`../../lib/utils/log.js`);
|
|
11
|
+
const log = new Log({ path: `_alkiln-misc_artifacts`, context: `unit_tests getMatchingRows` });
|
|
12
|
+
scope.set_log({ log_obj: log });
|
|
13
|
+
|
|
9
14
|
const getMatchingRows = scope.getMatchingRows;
|
|
10
15
|
// Match state var instantiated in steps.js. TODO: Add tests for such rows.
|
|
11
16
|
scope.row_needs_trigger_flag = `ALKiln: no trigger variable needed`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const chai = require('chai');
|
|
2
|
+
const expect = chai.expect;
|
|
3
|
+
|
|
4
|
+
const Log = require('../../lib/utils/log.js');
|
|
5
|
+
|
|
6
|
+
const path = `_alkiln-misc_artifacts`;
|
|
7
|
+
const log = new Log({ path, context: `unit_tests log_tests` });
|
|
8
|
+
|
|
9
|
+
describe(`log`, async function () {
|
|
10
|
+
|
|
11
|
+
// Test it creates a new folder?
|
|
12
|
+
// Test the contents that it saves to various files?
|
|
13
|
+
|
|
14
|
+
it(`returns a debug message from an empty log.debug`, async function() {
|
|
15
|
+
let result = log.debug();
|
|
16
|
+
expect( result ).to.include( `🐛 ALK000v DEBUG` );
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
});
|
|
20
|
+
|
|
@@ -5,6 +5,11 @@ const expect = chai.expect;
|
|
|
5
5
|
|
|
6
6
|
const tables = require('./tables.fixtures.js');
|
|
7
7
|
const scope = require('../../lib/scope.js');
|
|
8
|
+
|
|
9
|
+
const Log = require(`../../lib/utils/log.js`);
|
|
10
|
+
const log = new Log({ path: `_alkiln-misc_artifacts`, context: `unit_tests normalizeTable` });
|
|
11
|
+
scope.set_log({ log_obj: log });
|
|
12
|
+
|
|
8
13
|
const normalizeTable = scope.normalizeTable;
|
|
9
14
|
|
|
10
15
|
|