سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 04:15 UTC
test(ux): retain technical draft compatibility while no longer mutating on edit open
davoodmehraban89 committed
Oct 14, 2026 at 09:54 UTC
3abf82d6685c7c6aa0028a7c0da4dedc74e68406
1 file changed
+5
scripts/accounting-document-workflow.spec.js
+5
@@ -272,7 +272,12 @@ test('pilot purchase: posted to corrective draft to edited balanced repost via d
272
});
273
await expect(page.locator('#finora-purchase-document-management-body')).toContainText('PILOT-PUR-001');
274
await expect(page.locator('#finora-purchase-document-management-body button[data-doc-action="reopen"]')).toHaveCount(1);
275
+ // Technical correction primitive remains available for pre-existing in-progress
276
+ // drafts; the new employee UI correctly DOES NOT write on open.
277
await page.locator('#finora-purchase-document-management-body button[data-doc-action="reopen"]').click();
278
+ expect(remotePurchases(server)).toHaveLength(1);
279
+ await page.evaluate(()=>purCancelEdit());
280
+ await page.evaluate(id=>returnPostedPurchaseAsDraft(id,'تطبیق پیشنویس قدیمی'),originalId);
281
await expect.poll(()=>remotePurchases(server).length,{timeout:14000}).toBe(2);
282
const corrected=remotePurchases(server).find(x=>x.correctsPurchaseId===originalId);
283
expect(corrected.documentStatus).toBe('draft');