@@ -76,9 +76,12 @@ export function containsNoteGroupIdOrProductId(note) {
76
76
* @param {any } doc
77
77
*/
78
78
export function recommendedTest_6_2_40 ( doc ) {
79
- /** @type {Array<{ message: string; instancePath: string }> } */
80
- const warnings = [ ]
81
- const context = { warnings }
79
+ /** @type { {warnings: Array<{ message: string; instancePath: string }>;
80
+ * infos: Array<{ message: string; instancePath: string }> }} */
81
+ const context = {
82
+ warnings : [ ] ,
83
+ infos : [ ] ,
84
+ }
82
85
83
86
if ( ! validate ( doc ) ) {
84
87
return context
@@ -92,7 +95,7 @@ export function recommendedTest_6_2_40(doc) {
92
95
context . warnings . push ( {
93
96
instancePath : `/document/notes/${ noteIndex } ` ,
94
97
message :
95
- 'The given note item must include one of the elements "group_id" or "product_id"' ,
98
+ 'the given note item must include one of the elements "group_id" or "product_id"' ,
96
99
} )
97
100
}
98
101
}
@@ -106,10 +109,7 @@ export function recommendedTest_6_2_40(doc) {
106
109
'product_description'
107
110
)
108
111
if ( ! translation ) {
109
- //TODO: The warning is just a placeholder. The test should "...be skipped and a output should be shown to the
110
- // user with the text that no translation available...".
111
- // How this output should be implemented has to be clarified
112
- context . warnings . push ( {
112
+ context . infos . push ( {
113
113
instancePath : `/document/notes/${ noteIndex } ` ,
114
114
message :
115
115
'no language specific translation for the "title" of this note has been recorded' ,
@@ -121,7 +121,7 @@ export function recommendedTest_6_2_40(doc) {
121
121
context . warnings . push ( {
122
122
instancePath : `/document/notes/${ noteIndex } ` ,
123
123
message :
124
- 'The given note item must include one of the elements "group_id" or "product_id"' ,
124
+ 'the given note item must include one of the elements "group_id" or "product_id"' ,
125
125
} )
126
126
}
127
127
}
0 commit comments