From 8a45509ce5718b2e8097889fe52b06b186e926ff Mon Sep 17 00:00:00 2001 From: Prangshuman Das Date: Mon, 5 Oct 2026 15:24:05 +0200 Subject: [PATCH] [API tests] Ensure vendor-payment journal number series Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session:3952f078-a881-4da8-ad96-13b727e48a91 --- .../_Exclude_APIV2__Tests.DisabledTest.json | 10 ---------- .../TestLibraries/LibraryGraphJournalLines.Codeunit.al | 5 +++++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/DisabledTests/_Exclude_APIV2__Tests/_Exclude_APIV2__Tests.DisabledTest.json b/src/DisabledTests/_Exclude_APIV2__Tests/_Exclude_APIV2__Tests.DisabledTest.json index 02be6c83bef..6af862e2968 100644 --- a/src/DisabledTests/_Exclude_APIV2__Tests/_Exclude_APIV2__Tests.DisabledTest.json +++ b/src/DisabledTests/_Exclude_APIV2__Tests/_Exclude_APIV2__Tests.DisabledTest.json @@ -24,11 +24,6 @@ "codeunitName": "APIV2 - Sales Credit Memos E2E", "method": "TestCreateCreditMemoThroughPageAndAPI" }, - { - "codeunitId": 139843, - "codeunitName": "APIV2 - Vendor Payments E2E", - "method": "TestCreateVendorPaymentWithoutDocNo" - }, { "codeunitId": 139851, "codeunitName": "APIV2 - Purchase Orders E2E", @@ -39,11 +34,6 @@ "codeunitName": "APIV2 - Purch. Cr. Memos E2E", "method": "TestCreateCreditMemoThroughPageAndAPI" }, - { - "codeunitId": 139867, - "codeunitName": "APIV2 - Apply Vendor Ent. E2E", - "method": "TestApplyVendorEntryAppliesPayment" - }, { "codeunitId": 139928, "codeunitName": "APIV2 - Purch. Ret. Shpts. E2E", diff --git a/src/Layers/W1/Tests/TestLibraries/LibraryGraphJournalLines.Codeunit.al b/src/Layers/W1/Tests/TestLibraries/LibraryGraphJournalLines.Codeunit.al index 7ec14a67541..0dd713743fc 100644 --- a/src/Layers/W1/Tests/TestLibraries/LibraryGraphJournalLines.Codeunit.al +++ b/src/Layers/W1/Tests/TestLibraries/LibraryGraphJournalLines.Codeunit.al @@ -231,6 +231,11 @@ codeunit 130622 "Library - Graph Journal Lines" begin JournalName := LibraryUtility.GenerateRandomCode(GenJournalBatch.FieldNo(Name), DATABASE::"Gen. Journal Batch"); LibraryAPIGeneralJournal.EnsureGenJnlBatchExists(GraphMgtJournal.GetDefaultVendorPaymentsTemplateName(), JournalName); + GenJournalBatch.Get(GraphMgtJournal.GetDefaultVendorPaymentsTemplateName(), JournalName); + if GenJournalBatch."No. Series" = '' then begin + GenJournalBatch.Validate("No. Series", LibraryERM.CreateNoSeriesCode()); + GenJournalBatch.Modify(true); + end; exit(JournalName); end;