Skip to content

test(ui): fix DependsOnHarmoniaIT caption assertion (master IT failure)#6388

Merged
delchev merged 1 commit into
masterfrom
fix/dependson-harmonia-caption-assertion
Jul 22, 2026
Merged

test(ui): fix DependsOnHarmoniaIT caption assertion (master IT failure)#6388
delchev merged 1 commit into
masterfrom
fix/dependson-harmonia-caption-assertion

Conversation

@delchev

@delchev delchev commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Fix DependsOnHarmoniaIT — master Integration tests failure

The master Build run 29921866092 failed (both H2 and PostgreSQL) on DependsOnHarmoniaIT.test:

java.lang.AssertionError:
Found [2] elements by [By.tagName: span] and conditions [[exist, match text "\QOrders\E"]] but expected at most one.

Cause

The test asserted exactly one <span> containing "Orders" as the create-form caption. The fixture entity is named Orders, so its derived entityLabel (the form caption) equals its menuLabel (the list toolbar title). Since #6361 unified page/record title styling, both render as caption <span>s — the label legitimately appears in two places, and assertElementExistsByTypeAndContainsText (built on a finder that rejects >1 match) fails. #6372 surfaced this by lowercasing the form caption from ORDERS to Orders, making it collide with the list title's already-lowercase Orders.

This is correct product behavior (a list title and a form caption both showing the entity's label), not a regression — the test assertion was too strict.

Fix (test-only)

The assertion's stated intent is that the generator derived the label rather than leaking the literal ${ENTITYLABEL} placeholder (the depends-on entities are hand-authored). Assert that the placeholder is absent instead of that the resolved text is present — count-immune, and the create form's rendering + label resolution remain proven by the Country/City depends-on assertions that follow.

Test-compiles clean; the change reuses the existing assertElementDoesNotExistsByTypeAndContainsText (already used for the "Milano" negative in the same test).

🤖 Generated with Claude Code

The test asserted exactly one <span> containing 'Orders' as the create-form
caption. Since the fixture entity is named 'Orders', its derived entityLabel
(the form caption) equals its menuLabel (the list toolbar title), and #6361
unified both to caption <span>s - so the label legitimately renders in two
places and the ExistsByTypeAndContainsText finder (which rejects >1 match)
fails with 'Found [2] ... expected at most one'. (#6372 surfaced it by
lowercasing the form caption to match the list title's 'Orders'.)

The assertion's real intent is that the generator DERIVED the label rather
than leaking the literal ${ENTITYLABEL}; assert that placeholder is ABSENT
instead - count-immune, and the form rendering + label resolution stay proven
by the Country/City depends-on assertions that follow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@delchev
delchev merged commit 0474fee into master Jul 22, 2026
10 checks passed
@delchev
delchev deleted the fix/dependson-harmonia-caption-assertion branch July 22, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant