testilo 47.1.1 → 48.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "47.1.1",
3
+ "version": "48.0.0",
4
4
  "description": "Prepares Testaro jobs and processes Testaro reports",
5
5
  "main": "call.js",
6
6
  "scripts": {
@@ -62,8 +62,10 @@ exports.collateExcerpts = report => {
62
62
  if (pathID) {
63
63
  // Add the excerpt to the excerpt directory unless one already exists.
64
64
  excerpts[pathID][which] ??= excerpt;
65
- // Add the text to the text directory unless one already exists.
66
- texts[pathID][which] ??= text;
65
+ // Add the text, if non-empty, to the text directory unless one already exists.
66
+ if (text.length) {
67
+ texts[pathID][which] ??= text;
68
+ }
67
69
  }
68
70
  });
69
71
  }
@@ -72,15 +74,8 @@ exports.collateExcerpts = report => {
72
74
  if (Object.keys(texts).length) {
73
75
  // For each path ID in it:
74
76
  Object.keys(texts).forEach(pathID => {
75
- let toolNames = Object.keys(texts[pathID]);
76
- // Delete all empty texts.
77
- toolNames.forEach(toolName => {
78
- if (! texts[pathID][toolName]) {
79
- delete texts[pathID][toolName];
80
- }
81
- });
82
- toolNames = Object.keys(texts[pathID]);
83
- // If the element has only 1 remaining text:
77
+ const toolNames = Object.keys(texts[pathID]);
78
+ // If the element has only 1 text:
84
79
  if (toolNames.length === 1) {
85
80
  // Change its key to unanimous.
86
81
  texts[pathID].unanimous = texts[pathID][toolNames[0]];
@@ -93,7 +88,9 @@ exports.collateExcerpts = report => {
93
88
  Object
94
89
  .values(texts[pathID])
95
90
  .slice(1)
96
- .every(text => text === texts[pathID][toolNames[0]])
91
+ .every(
92
+ text => text.every((value, index) => value === texts[pathID][toolNames[0]][index])
93
+ )
97
94
  ) {
98
95
  // Consolidate the texts to 1 unanimous text.
99
96
  texts[pathID].unanimous = texts[pathID][toolNames[0]];
@@ -2463,7 +2463,7 @@ exports.issues = {
2463
2463
  }
2464
2464
  },
2465
2465
  imageLinkNoText: {
2466
- summary: 'link not named',
2466
+ summary: 'image link not named',
2467
2467
  why: 'User cannot get help understanding what a link points to',
2468
2468
  wcag: '2.4.4',
2469
2469
  weight: 4,