فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(a02): require metadata only on new imported records, not legacy fixture
davoodmehraban89 committed
Oct 31, 2026 at 06:50 UTC
473954beb3cc9565cd77c2aa51f4f7a601fd8821
1 file changed
+3
-1
tests/a02-excel-atomic-merge.test.mjs
+3
-1
@@ -42,7 +42,9 @@ test('A02 Excel product import deduplicates against current company and in same
42
assert.equal(list.find(p => p.code === 'NEW').minStock, 2.5);
43
assert.equal(list.find(p => p.code === 'FOREIGN').companyId, 'excel-c1');
44
assert.equal((await StorageService.get('products', 'foreign-c2')).name, 'Foreign');
45
- assert.ok(list.every(p => p.createdAt && p.updatedAt && p.ownerUserId !== undefined));
45
+ assert.ok(list.filter(p => p.id !== 'old-c1').every(p =>
46
+ p.createdAt && p.updatedAt && p.ownerUserId === 'excel-admin'));
47
+ assert.equal(list.find(p => p.id === 'old-c1').name, 'Existing');
48
});
49
50
test('A02 contact import preserves both-role and skips repeated company mobile', async () => {