Skip to content

Commit 020686d

Browse files
claudeako
authored andcommitted
fix(tests): green the integration doctype suite after widget-reconciliation
The `test-integration` suite (TestMxCheck_DoctypeScripts) started failing once the multi-version pluggable-widget reconciliation landed. Two showcase scripts regressed — both because reconciliation stopped masking genuine widget incompleteness, not because of a defect in the generated BSON: 32-pluggable-widget-object-lists-v010.mdl (modelsdk): the OL09 HeatMap only set its SCALECOLOR entries and never bound a data series, so mx check reported CE0642 "Property 'Series'/'Value attribute' is required". Reconciling the HeatMap definition to the installed .mpk correctly marks those required (the old embedded template understated it). Complete the example with the widget-level DataSource / HorizontalAxisAttribute / VerticalAxisAttribute / ValueAttribute binding, mirroring the passing HeatMap in 34-chart-widget-examples.mdl — the object-list showcase now demonstrates a complete, deployable heat map. 17-custom-widget-examples.mdl (both engines): the IMAGE showcases author bare/default static-image-mode Image widgets to demonstrate the IMAGE keyword's basic/dimensions/onclick syntax. MDL exposes no property to bind a static image resource (only imageUrl mode), so a default Image is legitimately "No image selected." — exactly what a freshly-dropped Image shows in Studio Pro. It previously passed only because a stale Atlas_Core.Content.Mendix template default masked it; that default caused CE0463 and was removed in the Image CE0463 fix. Whitelist the message for this script via scriptKnownCEErrors (now documented to also accept a message substring where an error carries no CE code), matching the existing syntax-showcase-limitation pattern. Verified on Mendix 11.12.1: all three previously-failing subtests pass; mendixlabs#32 retains only the globally-tolerated Maps CE0463. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
1 parent f2cb922 commit 020686d

2 files changed

Lines changed: 29 additions & 4 deletions

File tree

mdl-examples/doctype-tests/32-pluggable-widget-object-lists-v010.mdl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,12 @@ create page ObjListV10.P_OL08_LineChart (
385385
-- HeatMap's `scaleColors` object-list → the SCALECOLOR keyword. Each entry maps
386386
-- a value percentage to a colour; `ColorValue:` fills the schema's `colour`
387387
-- primitive (British spelling — the alias keeps the friendly MDL name).
388+
--
389+
-- HeatMap binds its data at the WIDGET level (no `series` object-list): the
390+
-- `DataSource:` + `ValueAttribute:` fill the schema's `Series`/`Value attribute`
391+
-- (both required — CE0642 without them), and `HorizontalAxisAttribute:` /
392+
-- `VerticalAxisAttribute:` pick the two category axes. The SCALECOLOR entries
393+
-- then layer the colour scale over that grid.
388394

389395
create page ObjListV10.P_OL09_HeatMap (
390396
Title: 'Sales Heat Map',
@@ -394,7 +400,12 @@ create page ObjListV10.P_OL09_HeatMap (
394400
layoutgrid lg1 {
395401
row r1 {
396402
column c1 (DesktopWidth: 12) {
397-
pluggablewidget 'com.mendix.widget.web.heatmap.HeatMap' heatMap1 {
403+
pluggablewidget 'com.mendix.widget.web.heatmap.HeatMap' heatMap1 (
404+
DataSource: database from ObjListV10.SalesData,
405+
HorizontalAxisAttribute: Region,
406+
VerticalAxisAttribute: PeriodLabel,
407+
ValueAttribute: RevenueValue
408+
) {
398409
scalecolor scLow (ValuePercentage: 0, ColorValue: '#f7fbff')
399410
scalecolor scHigh (ValuePercentage: 100, ColorValue: '#08306b')
400411
}

mdl/executor/roundtrip_doctype_test.go

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,30 @@ var scriptModuleDeps = map[string][]moduleDep{
117117
// not actionable on this branch.
118118
var scriptSkipList = map[string]string{}
119119

120-
// scriptKnownCEErrors lists CE error codes that are expected for specific scripts.
121-
// These are syntax showcase scripts that intentionally omit entities, constants,
122-
// headers etc. that full validation requires.
120+
// scriptKnownCEErrors lists CE error codes (or, where an error carries no CE
121+
// code, a distinctive substring of its message) that are expected for specific
122+
// scripts. These are syntax showcase scripts that intentionally omit entities,
123+
// constants, headers etc. that full validation requires. Matched by substring
124+
// against each `[error]` line (see allErrorsKnown).
123125
var scriptKnownCEErrors = map[string][]string{
124126
"03-page-examples.mdl": {
125127
"CE3637", // Data view listen to gallery in sibling layout-grid column — Mendix scoping limitation
126128
},
127129
"06b-soap-examples.mdl": {
128130
"CE1613", // Dangling service/mapping refs — no web service defined in the test project
129131
},
132+
"17-custom-widget-examples.mdl": {
133+
// The IMAGE showcases author bare/default (static-image-mode) Image
134+
// widgets to demonstrate the IMAGE keyword's basic/dimensions/onclick
135+
// syntax. MDL's image widget exposes no property to bind a static image
136+
// resource (only imageUrl mode), so a default Image is legitimately
137+
// "No image selected." — exactly what a freshly-dropped Image shows in
138+
// Studio Pro until you pick one. Not an mxcli defect: the widget BSON is
139+
// valid. It previously passed only because a stale
140+
// `Atlas_Core.Content.Mendix` template default masked it — that default
141+
// caused CE0463 and was removed in the Image CE0463 fix (549c44f).
142+
"No image selected.",
143+
},
130144
}
131145

132146
// TestMxCheck_DoctypeScripts executes each doctype-tests/*.mdl example script

0 commit comments

Comments
 (0)