Skip to content

[Expense tests] Verify the expected 404 in the Expense Users API negative test - #12773

Draft
Prangshuman Das (t-prda) wants to merge 13 commits into
features/646383-stack-d8-apiv1-reliabilityfrom
bugs/654047-expense-users-404-assert
Draft

Prangshuman Das (t-prda) wants to merge 13 commits into
features/646383-stack-d8-apiv1-reliabilityfrom
bugs/654047-expense-users-404-assert

Conversation

@t-prda

@t-prda Prangshuman Das (t-prda) commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to the API test stack (#12697), from review feedback on #12675.

Expense Users API Test used asserterror on the unlinked-user GET without checking the error, so any failure (401, 500, timeout, unrelated AL error) let the negative test pass. It now asserts Response code is 404. That matches the library's failed-request message for a 404, but not its unexpected-code message for other statuses.

Stacked on #12684 (D8), where the Expense Agent API tests are re-enabled, so CI executes the test. Retarget to main once the stack merges.

Fixes AB#654047

@github-actions github-actions Bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files AL: Apps (W1) Add-on apps for W1 labels Oct 13, 2026
@github-actions github-actions Bot added Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration labels Oct 13, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Oct 13, 2026
@t-prda
Prangshuman Das (t-prda) changed the base branch from main to features/646383-stack-d8-apiv1-reliability October 13, 2026 15:39
@t-prda
Prangshuman Das (t-prda) force-pushed the features/646383-stack-d8-apiv1-reliability branch from 45a2ff0 to b5c8253 Compare October 14, 2026 09:27
@t-prda
Prangshuman Das (t-prda) force-pushed the bugs/654047-expense-users-404-assert branch from 676b299 to c265049 Compare October 14, 2026 09:29
@github-actions github-actions Bot removed Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files labels Oct 14, 2026
@t-prda Prangshuman Das (t-prda) added the Team: Finance GitHub request for Finance area label Oct 14, 2026
@github-actions github-actions Bot removed Team: Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Oct 14, 2026
@t-prda
Prangshuman Das (t-prda) force-pushed the features/646383-stack-d8-apiv1-reliability branch from b5c8253 to 89bbf4c Compare October 14, 2026 09:48
@t-prda
Prangshuman Das (t-prda) force-pushed the bugs/654047-expense-users-404-assert branch from c265049 to c700562 Compare October 14, 2026 09:48
@t-prda
Prangshuman Das (t-prda) force-pushed the features/646383-stack-d8-apiv1-reliability branch from 89bbf4c to 5a94dbb Compare October 14, 2026 10:30
@t-prda
Prangshuman Das (t-prda) force-pushed the bugs/654047-expense-users-404-assert branch from c700562 to e39ba31 Compare October 14, 2026 10:30
@t-prda
Prangshuman Das (t-prda) force-pushed the features/646383-stack-d8-apiv1-reliability branch from 5a94dbb to 647f910 Compare October 14, 2026 10:49
@t-prda
Prangshuman Das (t-prda) force-pushed the bugs/654047-expense-users-404-assert branch from e39ba31 to dd27fb5 Compare October 14, 2026 10:49
@t-prda
Prangshuman Das (t-prda) changed the base branch from features/646383-stack-d8-apiv1-reliability to main October 14, 2026 11:04
@github-actions github-actions Bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Oct 14, 2026
@github-actions github-actions Bot removed the Build: scripts & configs Build scripts and configuration files label Oct 14, 2026
@t-prda
Prangshuman Das (t-prda) changed the base branch from features/646383-stack-d8-apiv1-reliability to main October 14, 2026 14:06
@github-actions github-actions Bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files labels Oct 14, 2026
@t-prda
Prangshuman Das (t-prda) changed the base branch from main to features/646383-stack-d8-apiv1-reliability October 14, 2026 14:18
Address review feedback on the API test authentication provider:
- Create the web service key in the caller's session and commit it, instead of
  in a background session. API tests commit their fixtures before calling the
  API, so the key commit adds no new transaction boundary. Removes codeunit
  131025 "API Test Web Service Key".
- Create keys without an expiry. Missing or expired keys are still replaced.
- Remove TransactionModel attributes from the provider tests; the codeunit
  already runs with test isolation disabled.
- Verify provider tests through the HTTP response and the key expiry date
  instead of reading the key as text.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Create missing VAT posting setup for item, item charge, resource and G/L account lines in
API document fixtures and re-enable the affected line and item variant tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Create a reason code when none exists so cancel actions succeed and re-enable the
affected invoice and credit memo tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Set dates before vendor defaults apply, use the payment-terms discount library and accept
localized payment lines, then re-enable the payment discount test.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Align quote dates with the work date before converting to an order and re-enable the
make-order tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Give the vendor payments batch a number series when it has none and re-enable the
vendor payment and apply vendor entry tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Skip localized header fields that only exist in some countries when comparing page and
API documents and re-enable the through-page-and-API tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Select the purchase return shipment report for return shipment PDF documents, run the
PDF document codeunits without test isolation and re-enable their TestExpandPdfDocument tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Find created lines by unique description, refresh polled configuration packages, fix
assertion order and journal template handling, and re-enable the affected APIV1 tests.

AB#646383
AB#653393

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
The negative scenario used asserterror without checking the error, so any
failure (401, 500, timeout, unrelated AL error) made it pass. Assert that the
request failed with response code 404.

Fixes AB#654047

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@t-prda
Prangshuman Das (t-prda) force-pushed the bugs/654047-expense-users-404-assert branch from 880586e to faf666e Compare October 15, 2026 09:02
@github-actions github-actions Bot removed Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files labels Oct 15, 2026
@t-prda
Prangshuman Das (t-prda) changed the base branch from features/646383-stack-d8-apiv1-reliability to main October 15, 2026 09:20
@github-actions github-actions Bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files labels Oct 15, 2026
@t-prda
Prangshuman Das (t-prda) changed the base branch from main to features/646383-stack-d8-apiv1-reliability October 15, 2026 09:37
@t-prda
Prangshuman Das (t-prda) force-pushed the features/646383-stack-d8-apiv1-reliability branch from 46994a0 to de737ec Compare October 15, 2026 12:56
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

This branch was successfully deployed

1 active deployment
triage — faf666ec Deployed Oct 15, 2026 by t-prda via Classify team ownership #8027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant