Skip to content

Commit 0474fee

Browse files
delchevclaude
andauthored
test(ui): fix DependsOnHarmoniaIT caption assertion - master IT failure (#6388)
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>
1 parent d0ed5f1 commit 0474fee

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/DependsOnHarmoniaTestProject.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,16 @@ public void verify() {
6060
// equivalent of the AngularJS "Create" button).
6161
browser.clickOnElementWithText(HtmlElementType.BUTTON, "New");
6262

63-
// The form caption is the entity's human label - assert it resolved to a real value and not
64-
// the literal "${ENTITYLABEL}" (the depends-on entities are hand-authored, so they carry no
65-
// baked entityLabel; the generator must derive it). The caption no longer force-uppercases
66-
// (title styling unified with the document layout in #6361), so the resolved label is "Orders".
67-
browser.assertElementExistsByTypeAndContainsText(HtmlElementType.SPAN, "Orders");
63+
// The form caption is the entity's human label - assert the generator DERIVED it (the
64+
// depends-on entities are hand-authored, so they carry no baked entityLabel) rather than
65+
// leaking the literal "${ENTITYLABEL}" placeholder. We assert the placeholder is ABSENT
66+
// rather than asserting the resolved text is present: the entity is named "Orders", so its
67+
// derived entityLabel (the form caption) equals its menuLabel (the list toolbar title), and
68+
// both render as unified caption <span>s since #6361 - so "one span contains Orders" is
69+
// inherently ambiguous (two matches, which the ExistsByTypeAndContainsText finder rejects).
70+
// The placeholder-absent check is the real intent; the form's rendering and label resolution
71+
// are further proven by the Country/City depends-on assertions below.
72+
browser.assertElementDoesNotExistsByTypeAndContainsText(HtmlElementType.SPAN, "${ENTITYLABEL}");
6873

6974
// Pick Country = Bulgaria. The Harmonia x-h-select hides the bound <input id="f_Country">
7075
// and renders a visible <span role="combobox"> trigger whose text is the placeholder; click

0 commit comments

Comments
 (0)