Fix Report Inbox API E2E cross-company tests to create a second company - #10574
Open
Onat Buyukakkus (onbuyuka) wants to merge 2 commits into
Open
Fix Report Inbox API E2E cross-company tests to create a second company#10574Onat Buyukakkus (onbuyuka) wants to merge 2 commits into
Onat Buyukakkus (onbuyuka) wants to merge 2 commits into
Conversation
Codeunit 135549 "Report Inbox API E2E" helper OtherCompanyName() asserted that a second company exists. In the W1 web services test lane the database has only CRONUS International Ltd., so the four cross-company scenarios failed during arrangement without exercising any Report Inbox API behavior. Ensure a second company instead of asserting: return an existing one when present, otherwise create an empty company via Company.Insert(true), mirroring the pattern in CompanyConsolWizardTests. This lets the cross-company tests seed into and address a real second company. Fixes AB#647605 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0ddaff57-6fb9-4d00-b18a-051d18a22056
Onat Buyukakkus (onbuyuka)
enabled auto-merge
August 24, 2026 19:24
Removed comments about creating a secondary company for tests.
Contributor
AI PR Review - Round 1Recommendation: Accept Risk assessment: Low. The test helper now ensures cross-company Report Inbox API scenarios have a second company to target instead of failing during arrangement when the test database contains only the current company. FindingsNo actionable correctness issues found.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Fixes AB#647605
Codeunit 135549
"Report Inbox API E2E"helperOtherCompanyName()asserted that a second company exists. In the W1 web services test lane (RunALTests_W1_WebServices) the database contains only CRONUS International Ltd., so four cross-company scenarios failed during arrangement (0s, no Report Inbox API behavior exercised):TestGetReportInboxItemsAcrossCompaniesTestGetReportInboxFileForEntryInAnotherCompanyIsNotWidenedSilentlyTestGetReportInboxFileForEntryInAnotherCompanyWhenNamedTestGetReportInboxContentDoesNotResolveAnotherCompanyChange
OtherCompanyName()now ensures a second company instead of asserting one:Company.Insert(true)(newCreateSecondaryCompany()helper), mirroring the established pattern inCompanyConsolWizardTests.Codeunit.al. The name comes fromLibraryUtility.GenerateGUID()(URL/OData-safe, e.g.GU00000001).Validation
RunALTests_W1_WebServiceslane, so full run validation happens there.Follow-up (NAV repo)
The four tests are disabled on the NAV side in
App/DisabledTests/ReportInboxAPIE2E.DisabledTest.json. Remove those entries to re-enable them once this fix flows into NAV via BCApps uptake. The BCAppsTests-Report.DisabledTest.jsonentries stay, since web-service E2E tests are not run in BCApps CI.