[Bug 647094] Re-enable the composite layout resolution tests on a real body layout - #10983
Conversation
…l body layout The five Composite Layout Tests methods disabled by PR 252675 asserted a call shape the product never makes: they inserted a Tenant Report Layout Cfg row keyed by the plain layout name 'Body' on the fake report 50000, then resolved with that same plain name. Every product caller resolves with CompositeLayoutKey(Rec), the <appid>::<name> composite reference, so the tests broke as soon as the config rows were keyed that way and told us nothing about the real resolution path. Each of the five now creates an actual body layout on Report::TestReportLayoutsReport and keys its configuration row by that layout's composite reference, which is what the FactBox and the Layout Theme and Header/Footer page pass in. The assertions and the precedence levels they cover are unchanged. The Initialize cleanup already cleared the rows on the body-layout report; its comment described a leak that can no longer occur, so it now names the report-level rows the assignment tests actually leave behind. Codeunit 134619 runs 32/32 green with none skipped.
Good Sense Reviewer - Round 1Recommendation: AcceptWhat this PR doesThis change restores five Composite Layout Tests by creating real body layouts and using the composite layout key that product callers use. The setup now matches the actual resolver contract, the assertions still cover the same precedence behavior, and the disabled-test entries are removed while the test methods remain present. Problem-solution fitFit: Strong The bug is about tests that no longer matched the current composite layout resolver behavior. The diff directly updates those tests to use the real body-layout key shape and re-enables them without changing product behavior. SuggestionsNone. Risk assessment and necessityRisk: This is a test-only change in Necessity: The change is required to make the tests exercise the current real resolution path again. The scope is narrow: it updates only the broken test setup and removes exactly those tests from the disabled list.
|
Predrag Maricic (PredragMaricic)
left a comment
There was a problem hiding this comment.
The restored tests now use real tenant body layouts and the same composite layout key passed by production callers. Their assertions continue to cover the intended precedence, independent part resolution, decoded display, and usage-count behavior, while the shared legacy fixture cleanup covers the new rows and layouts. No blocking findings.
What & why
Five test methods in codeunit 134619
Composite Layout Testswere disabled to take up a platformbuild that changed how composite layout parts resolve. They asserted a call shape the product never
makes: each inserted a
Tenant Report Layout Cfgrow keyed by the plain layout name'Body'on thefake report 50000, then resolved with that same plain name. Every product caller resolves with
CompositeLayoutKey(Rec)— the<appid>::<name>composite reference — so once the configurationrows were keyed that way the tests broke and stopped telling us anything about the real resolution
path.
Each of the five now creates an actual body layout on
Report::TestReportLayoutsReportand keys itsconfiguration row by that layout's composite reference, which is what
ReportLayoutFactBoxand theLayout Theme and Header/Footerpage pass in. The assertions and the precedence levels they coverare unchanged. Their entries are removed from
Tests-Report.DisabledTest.json.The
Initialize()cleanup already deleted the rows on the body-layout report, but its commentdescribed a leak that can no longer happen, so it now names the report-level rows the assignment
tests actually leave behind.
Linked work
AB#647094 — tracked in ADO (Dynamics SMB); this is an internal test fix with no public issue.
How I validated this
What I tested and the outcome
disturbed): 32 total, 32 passed, 0 failed, 0 skipped,All five formerly-disabled
methods ran and passed.
Risk & compatibility
Test-only change — no product code, no schema, no permissions, no telemetry. The change needs a
backport to
releases/29.xonce merged, since that is where the tests are disabled today; thematching
App/DisabledTests/CompositeLayoutTests.DisabledTest.jsonremoval on the NAV side goeswith that ingestion.