Commit 4d5741f
The "type of resource" scrollable dropdown blanked out after its value changed when
the backend was slow: the reloaded model value came back with a populated
value/authority but an empty display, and setCurrentValue rendered that empty display
verbatim. Both branches of setCurrentValue now fall back to the underlying value when
display is empty, which is the convention inputFormatter (r.181) already follows.
Spec: 8 it() -> 11. One covers the valueChanges path, one the init path, and one is
the actual regression for ufal/clarin-dspace#1377 — it pushes a value with an empty
display through group.valueChanges, the real reload entry point, and asserts the
rendered input still reads "Corpus". The init test stubs getInitValueFromModel rather
than relying on isNotEmpty(new VocabularyEntry()), and builds its value with
Object.assign around an empty FormFieldMetadataValueObject, because that constructor
would otherwise apply its own `display || value` and hide the very case under test.
Negative control run on this branch: with the two component lines reverted and the new
specs in place, karma reports "TOTAL: 3 FAILED, 8 SUCCESS" and names exactly the three
new tests; with the fix, "TOTAL: 11 SUCCESS". The specs fail for the right reason.
v9 notes: this is NOT a clean cherry-pick, despite the change being two lines.
`git cherry-pick -x 41ead07` conflicts in BOTH files — the 9-base component has the
vanilla trailing comma after the `map(...)` argument and uses `of` where the fork uses
`of as observableOf`, so neither line matches. The hunks were applied by hand; the
result differs from the source only by those two adaptations. In the spec, `observableOf`
becomes `of` and the FormFieldMetadataValueObject import is placed where
simple-import-sort wants it on this branch (after the ../../../../../testing/ block).
Card FE-19 (tranche T3).
Source: 41ead07 (dtq-dev PR #1336)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1e195a4 commit 4d5741f
2 files changed
Lines changed: 48 additions & 2 deletions
File tree
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
235 | 281 | | |
236 | 282 | | |
237 | 283 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
0 commit comments