فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): verify stock adjustment evidence mapping
davoodmehraban89 committed
Oct 31, 2026 at 22:20 UTC
0dfc1dbf366f93c35ac2144dde3ceef58e5f614a
1 file changed
+11
tests/q01-native-action-coverage.test.mjs
+11
@@ -34,6 +34,17 @@ test('Q01 maps contact, product, unit and category UI writes only to installed f
34
'A scenario with an explicit failed assertion must not be reported as coverage');
35
});
36
37
+test('Q01 maps legacy stock adjustment and integrated-mode guard only to both native scenarios',()=>{
38
+ const evidence={nativeFunctional:{
39
+ 'legacy-stock-adjustment-form-and-validation':{validAdjustmentPosted:true,overPrecisionRejectedWithoutWrites:true},
40
+ 'integrated-stock-adjustment-guard':{manualAdjustmentHidden:true,directOpenBlocked:true,directSaveBlocked:true}
41
+ }};
42
+ assert.equal(coverageFor("window.StockKardexModal.openAdjustModal('prod_1')",evidence).kind,'native-ui-guarded-action');
43
+ assert.equal(coverageFor("window.StockKardexModal.saveAdjust('prod_1')",evidence).kind,'native-ui-stock-posting');
44
+ evidence.nativeFunctional['integrated-stock-adjustment-guard'].directSaveBlocked=false;
45
+ assert.equal(coverageFor("window.StockKardexModal.openAdjustModal('prod_1')",evidence),null);
46
+});
47
+
48
test('Q01 labels encrypted backup UI coverage only after the installed backup test passes',()=>{
49
assert.equal(coverageFor('window.SettingsView.downloadBackup()',{}),null);
50
assert.equal(coverageFor('window.SettingsView.restoreBackup()',{encryptedCompanyBackup:true}).kind,'native-encrypted-backup-ui');