Commit 6ec4090
fix(apptest): manifest mirrors the rendered UI; runner handles empty/tree/calendar layouts (#6323)
* fix(apptest): manifest mirrors the rendered UI; runner handles empty/tree/calendar layouts
Running the generated <name>.test manifests across all 28 KeyFolders intent
modules (the first fleet-wide consumer) surfaced six defect classes; every
fix keeps the pilot (kf-mod-countries) green.
AppTestIntentGenerator:
- readOnly now mirrors the generated form exactly: an authored readOnly, a
uuid field, or a calculated field renders without an editable input, so
the runner must not try to fill it (a Company/Customer/Employee Uuid made
fillForm wait 60s on a non-existent #f_Uuid input).
- emits hierarchy: true for tree entities (Account rendered role=treeitem,
no columnheaders - the list flow asserted a table that never exists).
- layout maps MANAGE_CALENDAR -> calendar and MANAGE_SLOTS -> slots (a
view: range/slots entity was reported manage-list and the runner walked a
table that is a calendar).
npm/test runner:
- list flow: an entity with no rows renders the Harmonia empty state (no
table at all) - assert columns only when the table is present, keep the
strict row assertion when expectSeedData; tree entities assert treeitems;
calendar/slots assert the calendar/slot-picker container.
- crud flow: 'New' button located with exact: true (the empty state adds a
second 'New <Entity>' button that a substring match also hits); tree and
calendar/slots entities skip the UI walk (REST covers CRUD); entities
without a string handle field skip it too instead of throwing.
- rest flow: degrades gracefully without a string handle (create/read/
delete still assert; the update-value round-trip is skipped).
- pickDropdown: combobox located with exact: true ('Type' also matched
'Chart Type').
- api client: the error path called response.request(), which does not
exist on Playwright APIResponse - the thrower itself threw and masked
every real REST failure.
Unit tests extended (readOnly/hierarchy emission, entity counts).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(apptest): visibility-filtered list union; anchored combobox name match
- list.js: the empty-state markup stays in the DOM (x-show) above the table,
so the unfiltered union's .first() picked the hidden element and failed on
every list WITH data; filter({ visible: true }) on both arms.
- form.js: exact combobox matching found nothing (the accessible name is the
label plus placeholder/selected value); an anchored prefix regex keeps the
'Type' vs 'Chart Type' collision fixed without breaking the normal case.
Countries pilot re-verified green on a live instance after both.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat(apptest): cross-model relation resolution; entityStatus + aggregate awareness
The fleet run's remaining systemic failure: every transactional document
(SalesInvoice, ExpenseClaim, SalaryAssignment, PurchaseInvoice, SalesOrder,
...) has REQUIRED cross-model FKs (Customer, Employee, Supplier), which the
manifest omitted - so both the UI create and the REST create posted a
payload missing a required FK and got 400.
AppTestIntentGenerator:
- cross-model to-one relations are now emitted WITH an apiAbsolute
controller URL in the owner module (resolved via CrossModelSupport, the
same coordinates the generated dropdowns use) + the owner's label field;
unresolvable targets are omitted with a warning (the EDM generator
already fails loudly for truly missing owners).
- a function: EntityStatus relation is marked entityStatus: the form
templates exclude it from editable inputs (status pill) and its value
comes from the init: DB default - the runner must neither pick nor post
it.
- an aggregate field is auto-readOnly (renders in the document totals
footer, not as an input - CreditNote.Net made fillForm wait forever).
npm/test runner:
- resolveRelationSamples: skips entityStatus relations, resolves
cross-model rows via apiAbsolute (new api.listPath), leaves an OPTIONAL
relation unset when its target has no rows (only a required one throws);
the REST flow now shares this resolution instead of duplicating it.
- crud.js: all action buttons located with exact: true - Playwright's
default name matching is a case-insensitive substring, so 'Edit' also
matched the 'CrEDIT Notes' sidebar item and navigated away mid-flow.
Unit tests extended (cross-model apiAbsolute via convention fallback,
aggregate readOnly).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(apptest): document-save flow, toolbar search lookup, detail-target relations, Instant samples
Fourth defect wave from the 28-module fleet run:
- crud.js filterBy: row lookup goes through the toolbar 'Search <Entity>...'
box (present on every list layout) instead of the per-column filter row,
whose first input can belong to an FK column (x-show hidden - fill hung)
or a date column; master-detail pages have no filter row at all.
- crud.js: a document-layout form deliberately stays on the record after
Save (header-items editing continues) - assert /edit and navigate back to
the list instead of expecting the list URL.
- AppTestIntentGenerator + runner: same-model relations carry their
relative controller path (api), so a relation targeting a composition
DETAIL (excluded from the manifest's entities list - PayrollEntry ->
Payslip) still resolves sample rows.
- sample-values/form: timestamp samples are full ISO instants (the
generated entities bind java.time.Instant, which rejects a zone-less
value - Appointment REST create got 400); the UI fill slices to the
datetime-local shape.
Unit tests extended (same-model relation api emission).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat(apptest): document-create flow, dependsOn-consistent samples, where filters, exactlyOne checks
Fifth (and final) defect wave from the 28-module fleet run - all generic
DSL features the runner must honor:
- crud.js: a document CREATE lands on the new record's page (line-item
editing continues there), like Save - assert /edit and navigate back.
- dependsOn cascade (Country -> City): independent first-row samples pick
e.g. Country=Afghanistan + City=Sofia, and the narrowed dropdown then
offers no matching option. The manifest now carries the relation's
dependsOn {relation, filterBy}; the runner picks the dependent row first,
re-points the trigger sample at the row's FK, and fills triggers before
dependents. A dependsOn FIELD (auto-populated, e.g. SupplierNumber) is
marked readOnly - the watcher fills it, not the runner.
- where: static option filters (a stock line's Product picker offering
only Type=1) ride into the manifest; the runner picks a MATCHING row
client-side instead of the first one.
- exactlyOne checks (journal PostingRule / JournalEntry lines): a sample
filling every field is rejected with 400 - the manifest carries the
check's field sets and sampleRecord keeps only the first of each.
Unit tests extended (dependsOn/where/exactlyOne emission).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat(apptest): leaf-aware samples, edit-load wait, document-create flow, option-click retry
Final defect wave - the full 28-module KeyFolders fleet is green with these:
- leafOnly relations (chart-of-accounts pickers): the generated validation
rejects a non-leaf target, but the runner sampled the FIRST account row
('10 Capital', a group) and got 400 while the UI picker (leaves only)
passed. The manifest carries leafOnly {hierarchyProperty} (same-model
from the target's hierarchy:, cross-model from TargetInfo); the runner
picks a row no other row parents.
- crud edit flow: the record loads async after the form renders - filling
before the fetch completes got overwritten by the load, and Save
persisted the OLD value (services Ticket caught it; my manual replay
passed only because of its think-time waits). The runner now waits for
the handle input to show the loaded value before typing.
- document layout, definitively: CREATE lands on the new record's page
(line-item editing continues there); SAVE from an edit returns to the
list. (The two earlier commits had each half inverted.)
- pickDropdown: an option list re-rendering mid-click (async load reflow)
made the click retry forever - reopen and force-retry once.
- resolveRelationSamples: an optional relation whose target has no
name-like label field is left unset instead of clicking blind.
Unit tests extended (leafOnly emission).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 5d3b990 commit 6ec4090
8 files changed
Lines changed: 384 additions & 57 deletions
File tree
- components/engine/engine-intent/src
- main/java/org/eclipse/dirigible/components/intent/generator/apptest
- test/java/org/eclipse/dirigible/components/intent/generator/apptest
- npm/test/src
- flows
Lines changed: 137 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | | - | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
105 | 117 | | |
106 | 118 | | |
107 | 119 | | |
| |||
120 | 132 | | |
121 | 133 | | |
122 | 134 | | |
123 | | - | |
| 135 | + | |
124 | 136 | | |
125 | 137 | | |
126 | 138 | | |
127 | 139 | | |
128 | 140 | | |
129 | | - | |
| 141 | + | |
| 142 | + | |
130 | 143 | | |
131 | 144 | | |
132 | 145 | | |
| |||
138 | 151 | | |
139 | 152 | | |
140 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
141 | 160 | | |
142 | 161 | | |
143 | 162 | | |
| |||
149 | 168 | | |
150 | 169 | | |
151 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
152 | 186 | | |
153 | | - | |
| 187 | + | |
154 | 188 | | |
155 | 189 | | |
156 | 190 | | |
| |||
176 | 210 | | |
177 | 211 | | |
178 | 212 | | |
179 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
180 | 220 | | |
181 | 221 | | |
182 | 222 | | |
| |||
186 | 226 | | |
187 | 227 | | |
188 | 228 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
192 | 236 | | |
193 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
194 | 245 | | |
195 | 246 | | |
196 | 247 | | |
197 | | - | |
| 248 | + | |
198 | 249 | | |
199 | 250 | | |
200 | 251 | | |
| |||
205 | 256 | | |
206 | 257 | | |
207 | 258 | | |
208 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
209 | 332 | | |
210 | 333 | | |
211 | 334 | | |
| |||
333 | 456 | | |
334 | 457 | | |
335 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
336 | 462 | | |
337 | 463 | | |
338 | 464 | | |
| |||
0 commit comments