From 22894404d32d613d55316f679f274840d1d9d419 Mon Sep 17 00:00:00 2001 From: delchev Date: Wed, 22 Jul 2026 18:33:40 +0300 Subject: [PATCH] test(ui): fix DependsOnHarmoniaIT caption assertion - master IT failure The test asserted exactly one 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 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 --- .../ui/tests/DependsOnHarmoniaTestProject.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/DependsOnHarmoniaTestProject.java b/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/DependsOnHarmoniaTestProject.java index 8c62cb97c5..5ebd9d3baf 100644 --- a/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/DependsOnHarmoniaTestProject.java +++ b/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/DependsOnHarmoniaTestProject.java @@ -60,11 +60,16 @@ public void verify() { // equivalent of the AngularJS "Create" button). browser.clickOnElementWithText(HtmlElementType.BUTTON, "New"); - // The form caption is the entity's human label - assert it resolved to a real value and not - // the literal "${ENTITYLABEL}" (the depends-on entities are hand-authored, so they carry no - // baked entityLabel; the generator must derive it). The caption no longer force-uppercases - // (title styling unified with the document layout in #6361), so the resolved label is "Orders". - browser.assertElementExistsByTypeAndContainsText(HtmlElementType.SPAN, "Orders"); + // The form caption is the entity's human label - assert the generator DERIVED it (the + // depends-on entities are hand-authored, so they carry no baked entityLabel) rather than + // leaking the literal "${ENTITYLABEL}" placeholder. We assert the placeholder is ABSENT + // rather than asserting the resolved text is present: the entity is named "Orders", so its + // derived entityLabel (the form caption) equals its menuLabel (the list toolbar title), and + // both render as unified caption s since #6361 - so "one span contains Orders" is + // inherently ambiguous (two matches, which the ExistsByTypeAndContainsText finder rejects). + // The placeholder-absent check is the real intent; the form's rendering and label resolution + // are further proven by the Country/City depends-on assertions below. + browser.assertElementDoesNotExistsByTypeAndContainsText(HtmlElementType.SPAN, "${ENTITYLABEL}"); // Pick Country = Bulgaria. The Harmonia x-h-select hides the bound // and renders a visible trigger whose text is the placeholder; click