فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): require exact category option selection in hostile expense probe
davoodmehraban89 committed
Oct 31, 2026 at 06:46 UTC
ae2b74908d10db316bc047463e6a4ad4ffa85800
1 file changed
+4
tests/ui-control-structure.test.mjs
+4
@@ -144,6 +144,10 @@ test('A03: expense table escapes imported values in HTML and inline action argum
144
]) assert.ok(src.includes(fragment), 'unescaped expense HTML found: '+fragment);
145
assert.ok(native.includes('expenseUnsafeHtmlEscaped:true'));
146
assert.ok(native.includes('Untrusted expense list fields created executable markup'));
147
+ // The first category option is the legitimate 'all' filter, never the injected row.
148
+ assert.match(native, /filter\(option=>option\.value===hostileCategory\)/);
149
+ assert.match(native, /matchingOptions\.length!==1/);
150
+ assert.doesNotMatch(native, /select\[aria-label="سرفصل سند"\] option'\)\?\.value!==hostileCategory/);
151
assert.ok(native.includes('Expense row identifier escaped the safe JS argument'));
152
});
153