فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(a02): parse Excel import selector without malformed regex escaping
davoodmehraban89 committed
Oct 31, 2026 at 00:39 UTC
d7bb3d29af9bdbaa86d088d3406cc9d2db3d806a
1 file changed
+1
-1
tests/ui-control-structure.test.mjs
+1
-1
@@ -191,7 +191,7 @@ test('A02: Excel imports reject destructive replacement before touching master d
191
'both contact and product imports must fail closed');
192
assert.doesNotMatch(controller,/if \(mode === 'replace'\)/,
193
'nontransactional delete-then-import must never be reachable');
194
- const importModeSelect=settings.match(/<select class="form-control" id="importMode">([\\s\\S]*?)<\\/select>/)?.[1];
194
+ const importModeSelect=settings.split('id="importMode">')[1]?.split('</select>')[0];
195
assert.ok(importModeSelect, 'Excel import mode selector missing');
196
assert.doesNotMatch(importModeSelect,/<option value="replace"/,
197
'destructive Excel option must not be offered; the backup restore option is separate');