You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/09/02 16:52:22 UTC
(causeway) branch htmx updated (0a3bf1b999b -> 9444e2ff7a4)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git
from 0a3bf1b999b docs(openspec): archive collection row peek
new 0ea9f97ca49 docs(openspec): plan richer petclinic demo data
new c0a4e1e61c2 feat(webcomponents): enrich petclinic demo data
new eb39641e201 docs(openspec): archive richer petclinic demo data
new 9444e2ff7a4 fix(webcomponents): adjust PetOwner visit page size
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../.openspec.yaml | 0
.../design.md | 63 +++++++++++++
.../proposal.md | 27 ++++++
.../generic-htmx-web-component-viewer/spec.md | 93 +++++++++++++++++++
.../2026-09-02-extend-petclinic-demo-data/tasks.md | 22 +++++
.../generic-htmx-web-component-viewer/spec.md | 62 ++++++++++---
.../domain/PetClinicDataConfiguration.java | 75 ++++++++++++++-
.../webcomponents/pages/petclinic.HomePage.html | 4 +-
.../webcomponents/pages/petclinic.PetOwner.html | 6 +-
.../petclinic/PetClinicHtmxPlaywrightTest.java | 103 +++++++++++----------
.../PetClinicHtmxApplication_IntegTest.java | 45 +++++++--
11 files changed, 421 insertions(+), 79 deletions(-)
copy openspec/changes/archive/{2026-09-02-add-action-result-presentation-styles => 2026-09-02-extend-petclinic-demo-data}/.openspec.yaml (100%)
create mode 100644 openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/design.md
create mode 100644 openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/proposal.md
create mode 100644 openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md
create mode 100644 openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/tasks.md
(causeway) 03/04: docs(openspec): archive richer petclinic demo data
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit eb39641e201fdfd85b29e3f83f89363544af9697
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 2 15:54:37 2026 +0100
docs(openspec): archive richer petclinic demo data
---
.../.openspec.yaml | 0
.../design.md | 0
.../proposal.md | 0
.../generic-htmx-web-component-viewer/spec.md | 0
.../tasks.md | 0
.../generic-htmx-web-component-viewer/spec.md | 62 +++++++++++++++++-----
6 files changed, 48 insertions(+), 14 deletions(-)
diff --git a/openspec/changes/extend-petclinic-demo-data/.openspec.yaml b/openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/.openspec.yaml
similarity index 100%
rename from openspec/changes/extend-petclinic-demo-data/.openspec.yaml
rename to openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/.openspec.yaml
diff --git a/openspec/changes/extend-petclinic-demo-data/design.md b/openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/design.md
similarity index 100%
rename from openspec/changes/extend-petclinic-demo-data/design.md
rename to openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/design.md
diff --git a/openspec/changes/extend-petclinic-demo-data/proposal.md b/openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/proposal.md
similarity index 100%
rename from openspec/changes/extend-petclinic-demo-data/proposal.md
rename to openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/proposal.md
diff --git a/openspec/changes/extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md b/openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md
similarity index 100%
rename from openspec/changes/extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md
rename to openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md
diff --git a/openspec/changes/extend-petclinic-demo-data/tasks.md b/openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/tasks.md
similarity index 100%
rename from openspec/changes/extend-petclinic-demo-data/tasks.md
rename to openspec/changes/archive/2026-09-02-extend-petclinic-demo-data/tasks.md
diff --git a/openspec/specs/generic-htmx-web-component-viewer/spec.md b/openspec/specs/generic-htmx-web-component-viewer/spec.md
index 24658adc7a8..60f8ac7fdc9 100644
--- a/openspec/specs/generic-htmx-web-component-viewer/spec.md
+++ b/openspec/specs/generic-htmx-web-component-viewer/spec.md
@@ -685,27 +685,37 @@ Petclinic integration and browser acceptance SHALL verify canonical and HTML-aut
- **AND** existing rows, links, paging, responsive behavior, add/remove/book actions, and error monitoring remain valid
### Requirement: Selective Petclinic collection paging overrides
-Petclinic HTML resource pages SHALL demonstrate declarative paging on collections that can grow materially while leaving smaller or summary collections on established loading behavior.
+Petclinic HTML resource pages SHALL demonstrate declarative paging with sample-appropriate bounded sizes on owner, pet, and visit collections that can grow materially.
#### Scenario: Global owner list renders
- **WHEN** the Petclinic home page composes the owner collection
-- **THEN** its HTML override declares a bounded `paged` size
-- **AND** does not rely on inert `offset` or `size` attributes
+- **THEN** its HTML override declares `paged="5"`
+- **AND** it does not rely on inert `offset` or `size` attributes
+
+#### Scenario: Owner pet collection renders
+- **WHEN** an owner page composes its companion-animal collection
+- **THEN** that collection declares `paged="5"`
+- **AND** sorting, filtering, associated actions, semantic columns, and row peeks remain unchanged
#### Scenario: Owner visit history renders
- **WHEN** an owner page composes visit history
-- **THEN** that collection declares a bounded `paged` size
-- **AND** its associated actions and semantic columns remain unchanged
+- **THEN** that collection declares `paged="10"`
+- **AND** its associated actions, semantic columns, and row peeks remain unchanged
+
+#### Scenario: Nested pet visits render
+- **WHEN** an expanded pet row peek composes the selected pet's visit collection
+- **THEN** that nested collection declares `paged="10"`
+- **AND** its dedicated row context and semantic columns remain unchanged
-#### Scenario: Small or summary collection renders
-- **WHEN** Petclinic composes an owner's pets or the upcoming-visit summary
-- **THEN** the HTML override does not declare `paged`
-- **AND** the collection retains established default loading behavior
+#### Scenario: Upcoming-visit summary renders
+- **WHEN** the Petclinic home page composes the clinic-wide upcoming-visit collection
+- **THEN** its HTML override declares `paged="10"`
+- **AND** filtering, semantic columns, and row peeks remain unchanged
#### Scenario: Browser navigates a paged collection
- **WHEN** normalized metadata reports another page
- **THEN** the application exposes accessible Causeway previous and next controls and the configured range size
-- **AND** navigation does not duplicate rows, associated actions, requests, or page-level headings
+- **AND** navigation does not duplicate rows, associated actions, requests, row previews, or page-level headings
### Requirement: Selective Petclinic collection sorting and filtering
Petclinic HTML resource pages SHALL demonstrate server-backed collection sorting and filtering on selected collections without changing domain membership, associated actions, or unselected collection behavior.
@@ -969,10 +979,10 @@ The Petclinic browser profile SHALL verify user-visible keyboard time selection,
### Requirement: Petclinic compact collection and top-action qualification
The Petclinic browser profile SHALL verify compact authoritative small-Grid sizing and integrated responsive collection-heading action placement through the public HTMX viewer.
-#### Scenario: Owner has one companion animal
-- **WHEN** the wide owner page renders an unpaged Pets Grid whose authoritative total fits its projected rows
-- **THEN** the Grid height fits its header and data rows without a large empty scrolling viewport
-- **AND** sorting, filtering, links, columns, and collection metadata remain operable
+#### Scenario: Owner has few companion animals
+- **WHEN** the wide owner page renders a paged Pets Grid whose authoritative total fits within its configured page size
+- **THEN** the Grid height fits its header and current data rows without reserving a full five-row empty scrolling viewport
+- **AND** sorting, filtering, paging, links, columns, and collection metadata remain operable
#### Scenario: Owner pet actions render at wide width
- **WHEN** the Pets collection exposes Register a pet and Remove Pet as associated actions
@@ -1298,3 +1308,27 @@ Unexpected context, projection, request, disclosure, focus, Escape, refresh, vir
#### Scenario: Collection lifecycle collapses the preview
- **WHEN** sorting, filtering, paging, reload, responsive Grid replacement, virtual range supersession, or route replacement occurs with a preview open
- **THEN** expansion is not preserved and late preview work cannot alter the current collection
+
+### Requirement: Representative deterministic Petclinic demo data
+The Petclinic acceptance application SHALL seed a deterministic clinic graph rich enough to present representative owners, pets, historical visits, and upcoming visits across configured collection pages.
+The richer graph MUST preserve established fixture identities and MUST remain idempotent across application startup.
+
+#### Scenario: Petclinic sample starts with an empty database
+- **WHEN** seed initialization runs for the first time
+- **THEN** it creates varied owners and pets with stable IDs, species, contact details, notes, and optional values
+- **AND** it creates both historical and upcoming visits using deterministic clock-relative dates and stable reasons
+
+#### Scenario: Established acceptance fixtures are inspected
+- **WHEN** integration or browser tests resolve Mary, Basil, Samantha, Helen, Max, or another pre-existing fixture by stable identity
+- **THEN** the established identity and demonstrated values remain available
+- **AND** additive demo data does not change canonical links, mutation targets, or row identity
+
+#### Scenario: Seed initialization runs again
+- **WHEN** the application starts after the established seed marker already exists
+- **THEN** no duplicate owner, pet, or visit is created
+- **AND** collection totals remain deterministic
+
+#### Scenario: Demo collections are inspected
+- **WHEN** owners, one owner's pets, one owner's visit history, and clinic-wide upcoming visits are loaded
+- **THEN** each representative collection contains enough authoritative rows to cross its configured page boundary
+- **AND** both sparse and populated owner pages remain available for compact and multi-page demonstrations
(causeway) 02/04: feat(webcomponents): enrich petclinic demo data
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit c0a4e1e61c269eb3668affd843f9fbc35d325a21
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 2 15:50:30 2026 +0100
feat(webcomponents): enrich petclinic demo data
---
.../changes/extend-petclinic-demo-data/tasks.md | 22 ++---
.../domain/PetClinicDataConfiguration.java | 75 ++++++++++++++-
.../webcomponents/pages/petclinic.HomePage.html | 4 +-
.../webcomponents/pages/petclinic.PetOwner.html | 6 +-
.../petclinic/PetClinicHtmxPlaywrightTest.java | 103 +++++++++++----------
.../PetClinicHtmxApplication_IntegTest.java | 45 +++++++--
6 files changed, 179 insertions(+), 76 deletions(-)
diff --git a/openspec/changes/extend-petclinic-demo-data/tasks.md b/openspec/changes/extend-petclinic-demo-data/tasks.md
index 236f1afabd2..f15f390a54b 100644
--- a/openspec/changes/extend-petclinic-demo-data/tasks.md
+++ b/openspec/changes/extend-petclinic-demo-data/tasks.md
@@ -1,22 +1,22 @@
## 1. Deterministic demo data
-- [ ] 1.1 Extend the existing Petclinic seed graph additively with stable owners and varied pets while preserving established fixture identities and values.
-- [ ] 1.2 Add deterministic past and future visits with stable IDs and clock-relative dates so owner history and clinic-wide upcoming visits exceed their page boundaries.
-- [ ] 1.3 Add integration assertions for deterministic totals, representative sparse and populated owners, preserved fixtures, and idempotent startup behavior.
+- [x] 1.1 Extend the existing Petclinic seed graph additively with stable owners and varied pets while preserving established fixture identities and values.
+- [x] 1.2 Add deterministic past and future visits with stable IDs and clock-relative dates so owner history and clinic-wide upcoming visits exceed their page boundaries.
+- [x] 1.3 Add integration assertions for deterministic totals, representative sparse and populated owners, preserved fixtures, and idempotent startup behavior.
## 2. Realistic collection paging
-- [ ] 2.1 Configure home owner and owner pet collections with page size 5.
-- [ ] 2.2 Configure upcoming, owner-history, and nested pet-visit collections with page size 10.
-- [ ] 2.3 Update resource and integration assertions for the explicit page-size policy.
+- [x] 2.1 Configure home owner and owner pet collections with page size 5.
+- [x] 2.2 Configure upcoming, owner-history, and nested pet-visit collections with page size 10.
+- [x] 2.3 Update resource and integration assertions for the explicit page-size policy.
## 3. Browser qualification
-- [ ] 3.1 Update stable browser expectations affected by the richer seed graph without relying on incidental insertion order.
-- [ ] 3.2 Qualify owner, pet, visit-history, upcoming-visit, sorting, filtering, navigation, mutation, compact sizing, and row-peek journeys under the new page boundaries.
-- [ ] 3.3 Run default Vaadin and supported native Playwright suites and retain clean console, network, focus, overflow, and lifecycle behavior.
+- [x] 3.1 Update stable browser expectations affected by the richer seed graph without relying on incidental insertion order.
+- [x] 3.2 Qualify owner, pet, visit-history, upcoming-visit, sorting, filtering, navigation, mutation, compact sizing, and row-peek journeys under the new page boundaries.
+- [x] 3.3 Run default Vaadin and supported native Playwright suites and retain clean console, network, focus, overflow, and lifecycle behavior.
## 4. Regression and archive readiness
-- [ ] 4.1 Run focused and full Petclinic integration tests with Java 21 and perform the applicable IDE build/inspection checks.
-- [ ] 4.2 Run strict OpenSpec validation and `git diff --check`.
+- [x] 4.1 Run focused and full Petclinic integration tests with Java 21 and perform the applicable IDE build/inspection checks.
+- [x] 4.2 Run strict OpenSpec validation and `git diff --check`.
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/main/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/domain/PetClinicDataConfiguration.java b/viewers/webcomponents/sample-htmx-petclinic/src/main/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/domain/PetClinicDataConfiguration.java
index 73975f17934..7384499d70d 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/main/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/domain/PetClinicDataConfiguration.java
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/main/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/domain/PetClinicDataConfiguration.java
@@ -19,6 +19,7 @@
package org.apache.causeway.viewer.webcomponents.sample.htmx.petclinic.domain;
import java.time.LocalDate;
+import java.time.LocalDateTime;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Bean;
@@ -65,9 +66,65 @@ ApplicationRunner loadPetClinicData(
peter.addSeedPet(tweety);
ownerRepository.persist(peter);
- visitRepository.persist(new Visit("visit-basil-checkup", basil, today.plusDays(1).atTime(9, 30), "Annual check-up"));
- visitRepository.persist(new Visit("visit-samantha-vaccine", samantha, today.plusDays(3).atTime(11, 0), "Vaccination"));
- visitRepository.persist(new Visit("visit-max-followup", max, today.plusDays(7).atTime(14, 15), "Diet follow-up"));
+ final var george = owner("owner-george", "George Franklin", "George", "020 7946 1020", "george@example.com", "Prefers email reminders.", today.minusDays(62));
+ final var ruby = pet("pet-ruby", george, "Ruby", PetSpecies.CAT, "Nervous around dogs");
+ george.addSeedPet(ruby);
+ ownerRepository.persist(george);
+
+ final var betty = owner("owner-betty", "Betty Davis", null, "020 7946 1131", "betty@example.com", null, today.minusDays(25));
+ final var archie = pet("pet-archie", betty, "Archie", PetSpecies.DOG, "Enjoys long walks");
+ betty.addSeedPet(archie);
+ ownerRepository.persist(betty);
+
+ final var eduardo = owner("owner-eduardo", "Eduardo Rodriguez", "Eddie", "020 7946 1242", "eduardo@example.com", "Multi-pet household", today.minusDays(14));
+ final var rosy = pet("pet-rosy", eduardo, "Rosy", PetSpecies.DOG, "Needs a quiet waiting area");
+ final var jewel = pet("pet-jewel", eduardo, "Jewel", PetSpecies.CAT, "Indoor cat");
+ final var iggy = pet("pet-iggy", eduardo, "Iggy", PetSpecies.LIZARD, "Requires a heated carrier");
+ final var chester = pet("pet-chester", eduardo, "Chester", PetSpecies.HAMSTER, null);
+ final var sly = pet("pet-sly", eduardo, "Sly", PetSpecies.SNAKE, "Experienced handler only");
+ final var tico = pet("pet-tico", eduardo, "Tico", PetSpecies.BIRD, "Mimics telephone rings");
+ eduardo.addSeedPet(rosy);
+ eduardo.addSeedPet(jewel);
+ eduardo.addSeedPet(iggy);
+ eduardo.addSeedPet(chester);
+ eduardo.addSeedPet(sly);
+ eduardo.addSeedPet(tico);
+ ownerRepository.persist(eduardo);
+
+ final var jean = owner("owner-jean", "Jean Coleman", "Jean", "020 7946 1353", "jean@example.com", "Weekend appointments preferred.", today.minusDays(33));
+ final var shadow = pet("pet-shadow", jean, "Shadow", PetSpecies.CAT, null);
+ jean.addSeedPet(shadow);
+ ownerRepository.persist(jean);
+
+ final var jeff = owner("owner-jeff", "Jeff Black", null, "020 7946 1464", "jeff@example.com", null, today.minusDays(12));
+ final var lucky = pet("pet-lucky", jeff, "Lucky", PetSpecies.BIRD, "Recovering flight feathers");
+ jeff.addSeedPet(lucky);
+ ownerRepository.persist(jeff);
+
+ final var maria = owner("owner-maria", "Maria Escobito", "Maria", "020 7946 1575", "maria@example.com", "Requires step-free access.", today.minusDays(50));
+ final var mulligan = pet("pet-mulligan", maria, "Mulligan", PetSpecies.DOG, "Senior dog");
+ maria.addSeedPet(mulligan);
+ ownerRepository.persist(maria);
+
+ visit(visitRepository, "visit-basil-checkup", basil, today.plusDays(1).atTime(9, 30), "Annual check-up", null);
+ visit(visitRepository, "visit-samantha-vaccine", samantha, today.plusDays(3).atTime(11, 0), "Vaccination", "Bring vaccination record");
+ visit(visitRepository, "visit-max-followup", max, today.plusDays(7).atTime(14, 15), "Diet follow-up", null);
+
+ visit(visitRepository, "visit-rosy-dental-history", rosy, today.minusDays(60).atTime(10, 0), "Dental treatment", "Routine recovery");
+ visit(visitRepository, "visit-jewel-checkup-history", jewel, today.minusDays(45).atTime(13, 30), "Annual check-up", null);
+ visit(visitRepository, "visit-iggy-skin-history", iggy, today.minusDays(28).atTime(15, 0), "Skin examination", "Humidity reviewed");
+ visit(visitRepository, "visit-chester-nail-history", chester, today.minusDays(14).atTime(9, 15), "Nail trim", null);
+ visit(visitRepository, "visit-rosy-followup", rosy, today.plusDays(2).atTime(10, 15), "Dental follow-up", null);
+ visit(visitRepository, "visit-jewel-dental", jewel, today.plusDays(4).atTime(9, 0), "Dental examination", null);
+ visit(visitRepository, "visit-iggy-wellness", iggy, today.plusDays(5).atTime(15, 30), "Wellness review", "Check enclosure temperature");
+ visit(visitRepository, "visit-chester-checkup", chester, today.plusDays(8).atTime(11, 15), "Annual check-up", null);
+ visit(visitRepository, "visit-sly-nutrition", sly, today.plusDays(10).atTime(13, 0), "Nutrition review", null);
+ visit(visitRepository, "visit-tico-beak", tico, today.plusDays(12).atTime(16, 0), "Beak examination", null);
+ visit(visitRepository, "visit-rosy-vaccine", rosy, today.plusDays(15).atTime(8, 45), "Vaccination", null);
+
+ visit(visitRepository, "visit-ruby-wellness", ruby, today.plusDays(6).atTime(10, 45), "Wellness review", null);
+ visit(visitRepository, "visit-archie-physio", archie, today.plusDays(9).atTime(14, 0), "Mobility assessment", "Observe gait after exercise");
+ visit(visitRepository, "visit-shadow-checkup", shadow, today.plusDays(11).atTime(9, 45), "Annual check-up", null);
});
}
@@ -98,4 +155,16 @@ private static Pet pet(
pet.setNotes(notes);
return pet;
}
+
+ private static void visit(
+ final VisitRepository repository,
+ final String id,
+ final Pet pet,
+ final LocalDateTime visitAt,
+ final String reason,
+ final String notes) {
+ final var visit = new Visit(id, pet, visitAt, reason);
+ visit.setNotes(notes);
+ repository.persist(visit);
+ }
}
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.HomePage.html b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.HomePage.html
index 4c7b6efb525..7dc23aab35d 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.HomePage.html
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.HomePage.html
@@ -18,7 +18,7 @@
<div class="petclinic-dashboard-grid">
<section aria-labelledby="petclinic-owner-heading">
<h2 id="petclinic-owner-heading">Pet owners</h2>
- <cw-collection id="petOwners" label="Pet owners" active paged="2" sortable filterable>
+ <cw-collection id="petOwners" label="Pet owners" active paged="5" sortable filterable>
<cw-peek></cw-peek>
<cw-collection-column id="name" label="Owner"></cw-collection-column>
<cw-collection-column id="telephoneNumber" label="Telephone"></cw-collection-column>
@@ -27,7 +27,7 @@ <h2 id="petclinic-owner-heading">Pet owners</h2>
</section>
<section aria-labelledby="petclinic-visit-heading">
<h2 id="petclinic-visit-heading">Upcoming visits</h2>
- <cw-collection id="futureVisits" named="Next appointments" active filterable>
+ <cw-collection id="futureVisits" named="Next appointments" active paged="10" filterable>
<cw-peek></cw-peek>
<cw-collection-column id="visitAt" label="When"></cw-collection-column>
<cw-collection-column id="reason" label="Reason"></cw-collection-column>
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html
index 5678463d246..25ba84cc1c1 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html
@@ -72,7 +72,7 @@ <h2 id="petclinic-owner-details-heading">Details</h2>
<div class="petclinic-object-collections">
<section class="petclinic-card" aria-labelledby="petclinic-owner-pets-heading">
<h2 id="petclinic-owner-pets-heading">Pets</h2>
- <cw-collection id="pets" named="Companion animals" active sortable filterable>
+ <cw-collection id="pets" named="Companion animals" active paged="5" sortable filterable>
<cw-peek>
<section class="petclinic-preview" aria-label="Pet preview">
<cw-object-header></cw-object-header>
@@ -80,7 +80,7 @@ <h2 id="petclinic-owner-pets-heading">Pets</h2>
<cw-property id="species"></cw-property>
<cw-property id="notes" editable multi-line="3"></cw-property>
<cw-action id="clearNotes" named="Clear pet notes"></cw-action>
- <cw-collection id="visits" named="Pet visits" active paged="2">
+ <cw-collection id="visits" named="Pet visits" active paged="10">
<cw-collection-column id="visitAt" label="When"></cw-collection-column>
<cw-collection-column id="reason" label="Reason"></cw-collection-column>
</cw-collection>
@@ -103,7 +103,7 @@ <h2 id="petclinic-owner-pets-heading">Pets</h2>
<h2 id="petclinic-owner-visits-heading">Visits</h2>
<cw-collection id="visits" named="Visit history"
described-as="All visits recorded for this owner's pets."
- active paged="1">
+ active paged="10">
<cw-peek></cw-peek>
<cw-collection-column id="visitAt" label="When"></cw-collection-column>
<cw-collection-column id="reason" label="Reason"></cw-collection-column>
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java b/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
index 11929cd6dec..b11258c1f44 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
@@ -35,6 +35,7 @@
import com.microsoft.playwright.Playwright;
import com.microsoft.playwright.options.ColorScheme;
import com.microsoft.playwright.options.WaitUntilState;
+
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
@@ -44,6 +45,7 @@
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.MethodOrderer;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.server.LocalServerPort;
@@ -213,10 +215,11 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
assertThat(page.locator(ROUTE_PAGE).getAttribute("data-page-source")).isEqualTo("resource");
assertThat(page.locator("[data-testid='petclinic-custom-home']").isVisible()).isTrue();
assertFocused(ROUTE_PAGE);
- waitForCollectionRows("petOwners", 2);
- waitForCollectionRows("futureVisits", 3);
+ waitForCollectionRows("petOwners", 5);
+ waitForCollectionRows("futureVisits", 10);
assertObjectLinkIcon(page.locator("cw-collection[id='petOwners'] cw-object-link").first());
- assertThat(page.locator("cw-collection[id='petOwners']").getAttribute("paged")).isEqualTo("2");
+ assertThat(page.locator("cw-collection[id='petOwners']").getAttribute("paged")).isEqualTo("5");
+ assertThat(page.locator("cw-collection[id='futureVisits']").getAttribute("paged")).isEqualTo("10");
assertThat(page.locator("cw-collection[id='petOwners'] [data-causeway-grid-next]").isVisible()).isTrue();
assertThat(page.locator("cw-collection[id='futureVisits'] .causeway-collection-label").innerText())
.isEqualTo("Next appointments");
@@ -233,12 +236,12 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
final var visitSearch = page.locator("cw-collection[id='futureVisits'] [data-causeway-collection-search]");
assertThat(visitSearch.isVisible()).isTrue();
visitSearch.fill("vaccination");
- page.waitForFunction("() => document.querySelector(\"cw-collection[id='futureVisits']\")?.collectionState?.window?.totalCount === 1");
- waitForCollectionRows("futureVisits", 1);
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='futureVisits']\")?.collectionState?.window?.totalCount === 2");
+ waitForCollectionRows("futureVisits", 2);
assertThat(page.locator("cw-collection[id='futureVisits']").innerText()).contains("Vaccination");
page.locator("cw-collection[id='futureVisits'] [data-causeway-collection-search-clear]").click();
- page.waitForFunction("() => document.querySelector(\"cw-collection[id='futureVisits']\")?.collectionState?.window?.totalCount === 3");
- waitForCollectionRows("futureVisits", 3);
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='futureVisits']\")?.collectionState?.window?.totalCount === 13");
+ waitForCollectionRows("futureVisits", 10);
final var ownerSearch = page.locator("cw-collection[id='petOwners'] [data-causeway-collection-search]");
assertThat(ownerSearch.isVisible()).isTrue();
@@ -248,21 +251,44 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
waitForCollectionRows("petOwners", 1);
assertThat(page.locator("cw-collection[id='petOwners']").innerText()).contains("Mary Smith");
page.locator("cw-collection[id='petOwners'] [data-causeway-collection-search-clear]").click();
- page.waitForFunction("() => document.querySelector(\"cw-collection[id='petOwners']\")?.collectionState?.window?.totalCount === 4");
- waitForCollectionRows("petOwners", 2);
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='petOwners']\")?.collectionState?.window?.totalCount === 10");
+ waitForCollectionRows("petOwners", 5);
assertThat(page.locator("cw-collection[id='petOwners'] .causeway-collection-range").textContent())
- .isEqualTo("Items 1–2 of 4");
+ .isEqualTo("Items 1–5 of 10");
page.locator("cw-collection[id='petOwners'] [data-causeway-collection-sort='name']").click();
page.waitForFunction("() => document.querySelector(\"cw-collection[id='petOwners']\")?.collectionState?.window?.ordering === 'REQUESTED'");
assertThat(page.locator("cw-collection[id='petOwners'] [data-causeway-collection-sort='name']").getAttribute("aria-label"))
.contains("descending");
page.locator("cw-collection[id='petOwners'] [data-causeway-grid-next]").click();
- page.waitForFunction("() => document.querySelector(\"cw-collection[id='petOwners']\")?.collectionState?.window?.offset === 2");
- waitForCollectionRows("petOwners", 2);
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='petOwners']\")?.collectionState?.window?.offset === 5");
+ waitForCollectionRows("petOwners", 5);
assertThat(page.locator("cw-collection[id='petOwners'] .causeway-collection-range").textContent())
- .isEqualTo("Items 3–4 of 4");
+ .isEqualTo("Items 6–10 of 10");
assertThat(page.locator("cw-collection[id='petOwners'] [data-causeway-grid-previous]").isVisible()).isTrue();
+ page.locator("cw-collection[id='petOwners'] [data-causeway-grid-previous]").click();
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='petOwners']\")?.collectionState?.window?.offset === 0");
+ waitForCollectionRows("petOwners", 5);
+ clickObjectLink("Eduardo Rodriguez");
+ waitForRoute("petclinic.PetOwner", "s_owner-eduardo");
+ waitForCollectionRows("pets", 5);
+ waitForCollectionRows("visits", 10);
+ assertThat(page.locator("cw-collection[id='pets'] .causeway-collection-range").textContent())
+ .isEqualTo("Items 1–5 of 6");
+ assertThat(page.locator("cw-collection[id='visits'] .causeway-collection-range").textContent())
+ .isEqualTo("Items 1–10 of 11");
+ page.locator("cw-collection[id='pets'] [data-causeway-grid-next]").click();
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='pets']\")?.collectionState?.window?.offset === 5");
+ waitForCollectionRows("pets", 1);
+ page.locator("cw-collection[id='visits'] [data-causeway-grid-next]").click();
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='visits']\")?.collectionState?.window?.offset === 10");
+ waitForCollectionRows("visits", 1);
+
+ openHome();
+ waitForCollectionRows("petOwners", 5);
+ final var marySearch = page.locator("cw-collection[id='petOwners'] [data-causeway-collection-search]");
+ marySearch.fill("Mary");
+ waitForCollectionRows("petOwners", 1);
clickObjectLink("Mary Smith");
waitForRoute("petclinic.PetOwner", "s_owner-mary");
assertThat(page.locator(ROUTE_PAGE).getAttribute("data-page-kind")).isEqualTo("custom");
@@ -281,8 +307,9 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
""")).isEqualTo(true);
assertFocused(ROUTE_PAGE);
waitForCollectionRows("pets", 2);
- waitForCollectionRows("visits", 1);
+ waitForCollectionRows("visits", 2);
assertObjectLinkIcon(page.locator("cw-collection[id='pets'] cw-object-link").first());
+ assertThat(page.locator("cw-collection[id='pets']").getAttribute("paged")).isEqualTo("5");
assertThat(page.locator("cw-collection[id='pets']").getAttribute("sortable")).isEmpty();
assertThat(page.locator("cw-collection[id='pets']").getAttribute("filterable")).isEmpty();
final var petSearch = page.locator("cw-collection[id='pets'] [data-causeway-collection-search]");
@@ -300,31 +327,13 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
page.locator("cw-collection[id='pets'] [data-causeway-collection-sort='name']").click();
page.waitForFunction("() => document.querySelector(\"cw-collection[id='pets']\")?.collectionState?.window?.ordering === 'REQUESTED'");
assertThat(page.locator("cw-collection[id='pets'] cw-action[id='addPet']").isVisible()).isTrue();
- assertThat(page.locator("cw-collection[id='visits']").getAttribute("paged")).isEqualTo("1");
+ assertThat(page.locator("cw-collection[id='visits']").getAttribute("paged")).isEqualTo("10");
final var visitTotal = ((Number) page.locator("cw-collection[id='visits']")
.evaluate("element => element.collectionState.window.totalCount")).intValue();
- assertThat(visitTotal).isGreaterThan(1);
+ assertThat(visitTotal).isEqualTo(2);
assertThat(page.locator("cw-collection[id='visits'] .causeway-collection-range").textContent())
- .isEqualTo("Items 1–1 of " + visitTotal);
- for (int offset = 1; offset < visitTotal; offset++) {
- assertThat(page.locator("cw-collection[id='visits'] [data-causeway-grid-next]").isVisible()).isTrue();
- page.locator("cw-collection[id='visits'] [data-causeway-grid-next]").click();
- final var expectedOffset = offset;
- page.waitForFunction("offset => document.querySelector(\"cw-collection[id='visits']\")?.collectionState?.window?.offset === offset", expectedOffset);
- waitForCollectionRows("visits", 1);
- assertThat(page.locator("cw-collection[id='visits'] .causeway-collection-range").textContent())
- .isEqualTo("Items " + (offset + 1) + "–" + (offset + 1) + " of " + visitTotal);
- }
+ .isEqualTo("Items 1–2 of 2");
assertThat(page.locator("cw-collection[id='visits'] [data-causeway-grid-next]").isDisabled()).isTrue();
- for (int offset = visitTotal - 2; offset >= 0; offset--) {
- assertThat(page.locator("cw-collection[id='visits'] [data-causeway-grid-previous]").isVisible()).isTrue();
- page.locator("cw-collection[id='visits'] [data-causeway-grid-previous]").click();
- final var expectedOffset = offset;
- page.waitForFunction("offset => document.querySelector(\"cw-collection[id='visits']\")?.collectionState?.window?.offset === offset", expectedOffset);
- waitForCollectionRows("visits", 1);
- }
- assertThat(page.locator("cw-collection[id='visits'] .causeway-collection-range").textContent())
- .isEqualTo("Items 1–1 of " + visitTotal);
assertCollectionHeading("pets", "Companion animals", "Pets currently registered to this owner.");
assertCollectionHeading("visits", "Visit history", "All visits recorded for this owner's pets.");
final var visitDisabledReason = page.locator("cw-collection[id='visits'] .causeway-visually-hidden");
@@ -382,7 +391,7 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
page.setViewportSize(500, 900);
page.waitForFunction("() => [...document.querySelectorAll(\"cw-collection[id='pets'], cw-collection[id='visits']\")].every(element => element.dataset.causewayGridResponsive === 'narrow' && !element.querySelector('cw-collection-grid'))");
waitForCollectionRows("pets", 2);
- waitForCollectionRows("visits", 1);
+ waitForCollectionRows("visits", 2);
assertIntegratedCollectionActionHeader("pets", "addPet", "removePet", true);
assertThat(graphQLRequests.size()).isEqualTo(readsBeforeResponsiveSwitch);
page.setViewportSize(1800, 900);
@@ -523,8 +532,8 @@ void serviceActionsCoverValidationCancellationScalarAndCollections() {
final var shellResultOutlet = page.locator("#causeway-result");
constrainResultContentHeight(shellResultOutlet);
activateServiceAction("listAll");
- waitForShellResult("Pet owners", "4 results");
- assertStandaloneCollectionResult("Pet owners", 4);
+ waitForShellResult("Pet owners", "10 results");
+ assertStandaloneCollectionResult("Pet owners", 10);
assertScrollableResultWithDismissBelow(shellResultOutlet);
assertThat(page.locator("cw-action-results:not([hidden]) cw-standalone-collection").first().textContent())
.contains("Owner", "Telephone", "Email")
@@ -571,7 +580,7 @@ void serviceActionsCoverValidationCancellationScalarAndCollections() {
openMenu("Pet Owners");
activateServiceAction("count");
- waitForShellResult("count", "4");
+ waitForShellResult("count", "10");
assertMenuClosedAndFocused("Pet Owners");
openMenu("Pet Owners");
@@ -595,7 +604,7 @@ void serviceActionsCoverValidationCancellationScalarAndCollections() {
openMenu("Visits");
activateServiceAction("listUpcoming");
- waitForShellResult("listUpcoming", "3 results");
+ waitForShellResult("listUpcoming", "13 results");
assertMenuClosedAndFocused("Visits");
}
@@ -1063,7 +1072,7 @@ void disposableOwnerExercisesCreateAndEveryObjectAction() {
page.locator("[data-testid='action-confirmation-cancel']").click();
confirmation.waitFor(new Locator.WaitForOptions()
.setState(com.microsoft.playwright.options.WaitForSelectorState.DETACHED));
- assertThat(ownerRepository.findById("owner-5")).isNotNull();
+ assertThat(ownerRepository.findById("owner-11")).isNotNull();
assertThat(graphQLMutationCount("delete") - deleteMutations).isZero();
assertFocused("cw-action[id='delete'] [data-causeway-action-control]");
@@ -1073,7 +1082,7 @@ void disposableOwnerExercisesCreateAndEveryObjectAction() {
page.waitForFunction("() => location.pathname.includes('/object/petclinic.HomePage/')");
waitForLogicalType("petclinic.HomePage");
assertThat(page.locator("[data-testid='petclinic-custom-home']").isVisible()).isTrue();
- assertThat(ownerRepository.findById("owner-5")).isNull();
+ assertThat(ownerRepository.findById("owner-11")).isNull();
assertThat(graphQLMutationCount("delete") - deleteMutations).isEqualTo(1);
}
@@ -1336,14 +1345,14 @@ void actionResultDialogAndSidebarSurfacesRemainAccessibleAndResponsive() {
@Order(9)
void collectionRowPeeksRemainSingleContextualAndRefreshAfterMutations() {
openHome();
- waitForCollectionRows("petOwners", 2);
- waitForCollectionRows("futureVisits", 3);
+ waitForCollectionRows("petOwners", 5);
+ waitForCollectionRows("futureVisits", 10);
final var owners = page.locator("cw-collection[id='petOwners']");
final var ownerToggles = owners.locator("button[data-causeway-peek-toggle]");
ownerToggles.first().waitFor();
- assertThat(ownerToggles.count()).isEqualTo(2);
+ assertThat(ownerToggles.count()).isEqualTo(5);
assertThat(page.locator("cw-collection[id='futureVisits'] button[data-causeway-peek-toggle]").count())
- .isEqualTo(3);
+ .isEqualTo(10);
assertThat(previewRequests.stream().filter(url -> url.endsWith("/_previews/petclinic.PetOwner")).count())
.isEqualTo(1);
assertThat(previewRequests.stream().filter(url -> url.endsWith("/_previews/petclinic.Visit")).count())
@@ -1793,7 +1802,7 @@ private void submitPromptExpectingNavigation() {
+ "; generation=" + page.locator("[data-testid='causeway-route']").getAttribute("data-navigation-generation")
+ "; busy=" + page.locator("[data-testid='causeway-route']").getAttribute("aria-busy")
+ "; prompt=" + (page.locator("[data-testid='action-prompt']").count() > 0
- ? page.locator("[data-testid='action-prompt']").evaluate("element => element.outerHTML") : "none")
+ ? page.locator("[data-testid='action-prompt']").evaluate("element => element.outerHTML") : "none")
+ "; result=" + page.locator("[data-testid='causeway-shell-result']").textContent(), cause);
}
}
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java b/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
index 153f2e4d034..f7275321820 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
@@ -28,11 +28,16 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
+
import org.junit.jupiter.api.Test;
+
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.server.LocalServerPort;
+import org.apache.causeway.applib.services.clock.ClockService;
import org.apache.causeway.viewer.webcomponents.htmx.HtmxViewerProperties;
import org.apache.causeway.viewer.webcomponents.sample.htmx.petclinic.domain.PetOwner;
import org.apache.causeway.viewer.webcomponents.sample.htmx.petclinic.domain.PetOwnerRepository;
@@ -57,12 +62,21 @@ class PetClinicHtmxApplication_IntegTest {
@Autowired
private VisitRepository visitRepository;
+ @Autowired
+ private ClockService clockService;
+
+ @Autowired
+ @Qualifier("loadPetClinicData")
+ private ApplicationRunner petClinicDataLoader;
+
@Autowired
private HtmxViewerProperties viewerProperties;
@Test
- void loadsDeterministicPetclinicFixture() {
+ void loadsDeterministicPetclinicFixture() throws Exception {
final var mary = ownerRepository.findById(PetOwner.MARY_ID);
+ final var eduardo = ownerRepository.findById("owner-eduardo");
+ final var now = clockService.getClock().nowAsLocalDateTime();
assertThat(mary).isNotNull();
assertThat(mary.getName()).isEqualTo("Mary Smith");
@@ -70,6 +84,17 @@ void loadsDeterministicPetclinicFixture() {
.containsExactlyInAnyOrder("pet-basil", "pet-samantha");
assertThat(visitRepository.findByPetOwner(mary)).extracting("id")
.containsExactlyInAnyOrder("visit-basil-checkup", "visit-samantha-vaccine");
+ assertThat(ownerRepository.findAll()).hasSize(10).extracting("id").doesNotHaveDuplicates();
+ assertThat(eduardo).isNotNull();
+ assertThat(eduardo.getPets()).hasSize(6).extracting("id").doesNotHaveDuplicates();
+ assertThat(visitRepository.findByPetOwner(eduardo)).hasSize(11).extracting("id").doesNotHaveDuplicates();
+ assertThat(visitRepository.findByVisitAtAfter(now)).hasSize(13).extracting("id").doesNotHaveDuplicates();
+
+ petClinicDataLoader.run(null);
+
+ assertThat(ownerRepository.findAll()).hasSize(10);
+ assertThat(visitRepository.findByPetOwner(eduardo)).hasSize(11);
+ assertThat(visitRepository.findByVisitAtAfter(now)).hasSize(13);
}
@Test
@@ -119,7 +144,7 @@ void servesStableShellCanonicalFragmentsAssetsAndWicketComparison() throws Excep
.contains("<cw-action id=\"removePet\"></cw-action>")
.contains("<cw-peek>")
.contains("<cw-action id=\"clearNotes\" named=\"Clear pet notes\"></cw-action>")
- .contains("<cw-collection id=\"visits\" named=\"Pet visits\" active paged=\"2\">")
+ .contains("<cw-collection id=\"visits\" named=\"Pet visits\" active paged=\"10\">")
.contains("<cw-peek></cw-peek>")
.contains("<cw-action id=\"bookVisit\" prompt-style=\"DIALOG_MODAL\">")
.contains("<cw-parameter id=\"visitDate\" min=\"tomorrow\"></cw-parameter>")
@@ -348,12 +373,12 @@ void packagesHtmlPagesAndRetainsLayoutFallbackResources() throws Exception {
.contains("id=\"knownAs\" editable\n described-as=\"The familiar or preferred name used by this owner.\"")
.contains("id=\"notes\" editable multi-line=\"5\"")
.contains("id=\"lastVisit\" editable label-position=\"TOP\"")
- .contains("<cw-collection id=\"pets\" named=\"Companion animals\" active sortable filterable>")
+ .contains("<cw-collection id=\"pets\" named=\"Companion animals\" active paged=\"5\" sortable filterable>")
.contains("<cw-action id=\"addPet\"")
.contains("<cw-action id=\"removePet\"")
.contains("<cw-collection id=\"visits\" named=\"Visit history\"")
.contains("described-as=\"All visits recorded for this owner's pets.\"")
- .contains("active paged=\"1\"")
+ .contains("active paged=\"10\"")
.contains("<cw-action id=\"bookVisit\"")
.doesNotContain("petclinic-associated-actions", "petclinic-member-composition", " offset=", " size=");
final String homeHtml;
@@ -362,8 +387,8 @@ void packagesHtmlPagesAndRetainsLayoutFallbackResources() throws Exception {
homeHtml = new String(input.readAllBytes(), StandardCharsets.UTF_8);
}
assertThat(homeHtml)
- .contains("<cw-collection id=\"futureVisits\" named=\"Next appointments\" active filterable>")
- .contains("<cw-collection id=\"petOwners\" label=\"Pet owners\" active paged=\"2\" sortable filterable>")
+ .contains("<cw-collection id=\"futureVisits\" named=\"Next appointments\" active paged=\"10\" filterable>")
+ .contains("<cw-collection id=\"petOwners\" label=\"Pet owners\" active paged=\"5\" sortable filterable>")
.doesNotContain("id=\"petOwners\" named=", "id=\"petOwners\" described-as=", " offset=", " size=");
assertThat(ownerHtml.indexOf("id=\"addPet\""))
.isLessThan(ownerHtml.indexOf("id=\"removePet\""));
@@ -408,7 +433,7 @@ void exposesObjectHomeEffectiveMenusAndEffectiveGrid() throws Exception {
assertThat(application.at("/data/rich/application/home/kind").asText()).isEqualTo("OBJECT");
assertThat(application.at("/data/rich/application/home/logicalTypeName").asText()).isEqualTo("petclinic.HomePage");
assertThat(application.at("/data/rich/application/home/object/_meta/title").asText())
- .contains("4 pet owners", "3 upcoming visits");
+ .contains("10 pet owners", "13 upcoming visits");
final var homeId = application.at("/data/rich/application/home/object/_meta/id").asText();
final var ownerWindow = graphQL("""
query PetClinicOwnerWindow {
@@ -442,7 +467,7 @@ void exposesObjectHomeEffectiveMenusAndEffectiveGrid() throws Exception {
assertThat(ownerWindow.at("/data/rich/petclinic_HomePage/petOwners/window/rows/0/name/get").asText())
.isEqualTo("Mary Smith");
assertThat(ownerWindow.at("/data/rich/petclinic_HomePage/futureVisits/window/totalCount").asInt())
- .isEqualTo(1);
+ .isEqualTo(2);
assertThat(ownerWindow.at("/data/rich/petclinic_HomePage/futureVisits/window/searchSupported").asBoolean())
.isTrue();
assertThat(ownerWindow.at("/data/rich/petclinic_HomePage/futureVisits/window/searchPrompt").asText())
@@ -497,7 +522,7 @@ void exposesPetclinicServiceAndObjectInteractionsThroughRichGraphQL() throws Exc
}
""");
assertNoGraphQLErrors(service);
- assertThat(service.at("/data/rich/petclinic_PetOwners/listAll/invoke/results").size()).isEqualTo(4);
+ assertThat(service.at("/data/rich/petclinic_PetOwners/listAll/invoke/results").size()).isEqualTo(10);
assertThat(service.at("/data/rich/petclinic_PetOwners/listAll/metadata/description").asText())
.isEqualTo("Lists every registered pet owner.");
assertThat(service.at("/data/rich/petclinic_PetOwners/listAll/metadata/cssClassFa").asText())
@@ -509,7 +534,7 @@ void exposesPetclinicServiceAndObjectInteractionsThroughRichGraphQL() throws Exc
.isEqualTo("DIALOG");
assertThat(service.at("/data/rich/petclinic_PetOwners/create/metadata/cssClassFa").asText())
.isEqualTo("user-plus");
- assertThat(service.at("/data/rich/petclinic_Visits/listUpcoming/invoke/results").size()).isEqualTo(3);
+ assertThat(service.at("/data/rich/petclinic_Visits/listUpcoming/invoke/results").size()).isEqualTo(13);
final var owner = graphQL("""
query PetClinicOwner {
(causeway) 01/04: docs(openspec): plan richer petclinic demo data
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 0ea9f97ca494125ed28c1732d2ddc49771b0eea2
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 2 15:29:50 2026 +0100
docs(openspec): plan richer petclinic demo data
---
.../extend-petclinic-demo-data/.openspec.yaml | 2 +
.../changes/extend-petclinic-demo-data/design.md | 63 +++++++++++++++
.../changes/extend-petclinic-demo-data/proposal.md | 27 +++++++
.../generic-htmx-web-component-viewer/spec.md | 93 ++++++++++++++++++++++
.../changes/extend-petclinic-demo-data/tasks.md | 22 +++++
5 files changed, 207 insertions(+)
diff --git a/openspec/changes/extend-petclinic-demo-data/.openspec.yaml b/openspec/changes/extend-petclinic-demo-data/.openspec.yaml
new file mode 100644
index 00000000000..032461ff9fa
--- /dev/null
+++ b/openspec/changes/extend-petclinic-demo-data/.openspec.yaml
@@ -0,0 +1,2 @@
+schema: spec-driven
+created: 2026-09-02
diff --git a/openspec/changes/extend-petclinic-demo-data/design.md b/openspec/changes/extend-petclinic-demo-data/design.md
new file mode 100644
index 00000000000..1f75f1fa76d
--- /dev/null
+++ b/openspec/changes/extend-petclinic-demo-data/design.md
@@ -0,0 +1,63 @@
+## Context
+
+Petclinic currently seeds four owners, five pets, and three upcoming visits.
+The HTML resources use page sizes of one or two for selected collections, while pets and upcoming visits are unpaged.
+Those choices are useful for narrow tests but make the running sample look sparse and unlike a realistic clinic dashboard.
+Existing integration and browser journeys depend on stable identities such as Mary, Basil, Samantha, Helen, and Max, so enrichment must remain additive and deterministic.
+
+## Goals / Non-Goals
+
+**Goals:**
+
+- Seed enough varied owners, pets, historical visits, and upcoming visits to make the dashboard and object pages representative.
+- Preserve all established fixture IDs and values required by existing tests and demonstrations.
+- Ensure at least one owner has more than five pets, at least one owner has more than ten visits, and the clinic has more than ten upcoming visits so each configured boundary is observable.
+- Use page size 5 for owner and pet collections and page size 10 for visit collections.
+- Keep both default Vaadin and explicit native browser journeys deterministic.
+
+**Non-Goals:**
+
+- Changing persistence mappings, public domain APIs, viewer-wide paging defaults, or GraphQL window semantics.
+- Reproducing a production-scale dataset or introducing random data generation.
+- Changing existing fixture identities, mutation targets, or canonical navigation behavior.
+
+## Decisions
+
+### Extend the existing seed graph additively
+
+The existing four owners and their pets remain unchanged, and new owners, pets, and visits are added with stable IDs and clock-relative dates.
+This avoids invalidating focused journeys while providing varied species, optional values, past history, and future appointments.
+Replacing the seed graph wholesale was rejected because it would create unnecessary churn in unrelated interaction tests.
+
+### Make every relevant collection boundary explicit
+
+The home owner collection and owner pet collection use `paged="5"`.
+The home upcoming-visits collection, owner visit-history collection, and nested pet-visits collection use `paged="10"`.
+This is preferred over changing component defaults because the desired sizes are sample-specific presentation choices.
+
+### Seed beyond both page boundaries
+
+The deterministic graph includes more than five pets for one owner, more than ten visits for one owner, and more than ten upcoming visits clinic-wide.
+This ensures that the larger sizes still exercise real previous/next behavior rather than merely changing markup.
+
+### Preserve semantic test anchors
+
+Tests continue to target stable IDs and names rather than relying on incidental insertion order where possible.
+Count assertions are updated where they intentionally qualify the complete seeded dataset, while mutation journeys continue to use the established Mary, Basil, Samantha, Helen, and Max fixtures.
+
+## Risks / Trade-offs
+
+- [Risk] More rows increase browser-test work and may expose order-dependent assumptions. → Preserve established IDs, use deterministic timestamps, and update assertions to select by semantic identity.
+- [Risk] Larger page sizes could stop existing pager journeys from crossing a boundary. → Seed beyond the new boundaries and explicitly qualify the first and subsequent ranges.
+- [Risk] Clock-relative past and future visits may change rendered dates between runs. → Assert stable identities, reasons, range totals, and relative membership rather than hard-coded calendar dates.
+- [Risk] A richer startup graph can make the configuration verbose. → Keep creation grouped by owner and use small helper methods for pets and visits without introducing a separate fixture framework.
+
+## Migration Plan
+
+No persisted production data migration is required because this is an in-memory sample seed.
+Apply the additive seed and resource-page updates together, then update integration and browser expectations.
+Rollback consists of reverting the seed additions and restoring the previous declarative page sizes.
+
+## Open Questions
+
+None.
diff --git a/openspec/changes/extend-petclinic-demo-data/proposal.md b/openspec/changes/extend-petclinic-demo-data/proposal.md
new file mode 100644
index 00000000000..e2c0d360d47
--- /dev/null
+++ b/openspec/changes/extend-petclinic-demo-data/proposal.md
@@ -0,0 +1,27 @@
+## Why
+
+The Petclinic sample currently contains too few owners, pets, and visits to look representative or to demonstrate realistic collection paging.
+The very small page sizes also make the demo feel test-oriented rather than application-oriented.
+
+## What Changes
+
+- Expand the deterministic Petclinic seed dataset with additional owners, pets, past visits, and upcoming visits while preserving established fixture identities used by existing journeys.
+- Ensure the seeded data exceeds the configured pet and visit page sizes so paging is visible and meaningful.
+- Configure owner and pet collections with a page size of 5.
+- Configure visit-history, nested pet-visit, and upcoming-visit collections with a page size of 10.
+- Update integration and browser assertions to qualify the richer data and realistic paging without weakening existing mutation, filtering, sorting, navigation, or row-peek coverage.
+
+## Capabilities
+
+### New Capabilities
+
+None.
+
+### Modified Capabilities
+
+- `generic-htmx-web-component-viewer`: Petclinic demo data and selective collection paging requirements will cover a richer deterministic dataset and realistic page sizes for owner/pet and visit collections.
+
+## Impact
+
+The change affects Petclinic seed-data configuration, Petclinic HTML page resources, focused integration tests, Playwright journeys, and the generic HTMX viewer Petclinic qualification specification.
+It does not change public component APIs, GraphQL semantics, persistence schema, or viewer defaults outside the sample application.
diff --git a/openspec/changes/extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md b/openspec/changes/extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md
new file mode 100644
index 00000000000..3be2fd2f6d3
--- /dev/null
+++ b/openspec/changes/extend-petclinic-demo-data/specs/generic-htmx-web-component-viewer/spec.md
@@ -0,0 +1,93 @@
+## ADDED Requirements
+
+### Requirement: Representative deterministic Petclinic demo data
+The Petclinic acceptance application SHALL seed a deterministic clinic graph rich enough to present representative owners, pets, historical visits, and upcoming visits across configured collection pages.
+The richer graph MUST preserve established fixture identities and MUST remain idempotent across application startup.
+
+#### Scenario: Petclinic sample starts with an empty database
+- **WHEN** seed initialization runs for the first time
+- **THEN** it creates varied owners and pets with stable IDs, species, contact details, notes, and optional values
+- **AND** it creates both historical and upcoming visits using deterministic clock-relative dates and stable reasons
+
+#### Scenario: Established acceptance fixtures are inspected
+- **WHEN** integration or browser tests resolve Mary, Basil, Samantha, Helen, Max, or another pre-existing fixture by stable identity
+- **THEN** the established identity and demonstrated values remain available
+- **AND** additive demo data does not change canonical links, mutation targets, or row identity
+
+#### Scenario: Seed initialization runs again
+- **WHEN** the application starts after the established seed marker already exists
+- **THEN** no duplicate owner, pet, or visit is created
+- **AND** collection totals remain deterministic
+
+#### Scenario: Demo collections are inspected
+- **WHEN** owners, one owner's pets, one owner's visit history, and clinic-wide upcoming visits are loaded
+- **THEN** each representative collection contains enough authoritative rows to cross its configured page boundary
+- **AND** both sparse and populated owner pages remain available for compact and multi-page demonstrations
+
+## MODIFIED Requirements
+
+### Requirement: Selective Petclinic collection paging overrides
+Petclinic HTML resource pages SHALL demonstrate declarative paging with sample-appropriate bounded sizes on owner, pet, and visit collections that can grow materially.
+
+#### Scenario: Global owner list renders
+- **WHEN** the Petclinic home page composes the owner collection
+- **THEN** its HTML override declares `paged="5"`
+- **AND** it does not rely on inert `offset` or `size` attributes
+
+#### Scenario: Owner pet collection renders
+- **WHEN** an owner page composes its companion-animal collection
+- **THEN** that collection declares `paged="5"`
+- **AND** sorting, filtering, associated actions, semantic columns, and row peeks remain unchanged
+
+#### Scenario: Owner visit history renders
+- **WHEN** an owner page composes visit history
+- **THEN** that collection declares `paged="10"`
+- **AND** its associated actions, semantic columns, and row peeks remain unchanged
+
+#### Scenario: Nested pet visits render
+- **WHEN** an expanded pet row peek composes the selected pet's visit collection
+- **THEN** that nested collection declares `paged="10"`
+- **AND** its dedicated row context and semantic columns remain unchanged
+
+#### Scenario: Upcoming-visit summary renders
+- **WHEN** the Petclinic home page composes the clinic-wide upcoming-visit collection
+- **THEN** its HTML override declares `paged="10"`
+- **AND** filtering, semantic columns, and row peeks remain unchanged
+
+#### Scenario: Browser navigates a paged collection
+- **WHEN** normalized metadata reports another page
+- **THEN** the application exposes accessible Causeway previous and next controls and the configured range size
+- **AND** navigation does not duplicate rows, associated actions, requests, row previews, or page-level headings
+
+### Requirement: Petclinic compact collection and top-action qualification
+The Petclinic browser profile SHALL verify compact authoritative small-Grid sizing and integrated responsive collection-heading action placement through the public HTMX viewer.
+
+#### Scenario: Owner has few companion animals
+- **WHEN** the wide owner page renders a paged Pets Grid whose authoritative total fits within its configured page size
+- **THEN** the Grid height fits its header and current data rows without reserving a full five-row empty scrolling viewport
+- **AND** sorting, filtering, paging, links, columns, and collection metadata remain operable
+
+#### Scenario: Owner pet actions render at wide width
+- **WHEN** the Pets collection exposes Register a pet and Remove Pet as associated actions
+- **THEN** Companion animals and the compact actions share the collection's bordered header row
+- **AND** keyboard traversal reaches the actions in declaration order before collection search, sort, row-link, and paging controls
+
+#### Scenario: Collection action header becomes narrow
+- **WHEN** the owner page is resized below its responsive collection breakpoint
+- **THEN** the title remains first and the compact action toolbar wraps beneath it within the same header area
+- **AND** no control overlaps, clips, reorders keyboard focus, or causes horizontal document overflow
+
+#### Scenario: Collection heading remains authoritative
+- **WHEN** collection state changes through loading, filtering, sorting, refresh, empty, disabled, or error presentation
+- **THEN** the effective name, description, tooltip, and `aria-labelledby` relationship remain current
+- **AND** associated action nodes retain identity, declaration order, pending interaction state, and focus semantics
+
+#### Scenario: Collection action tooltip is revealed
+- **WHEN** pointer or keyboard interaction reveals an associated action tooltip in the Pets collection header
+- **THEN** the tooltip opens below its control and remains fully visible over the collection body
+- **AND** it is not clipped above the bounded header or hidden behind collection content
+
+#### Scenario: Petclinic collection journey remains clean
+- **WHEN** browser acceptance operates the collection actions and collection controls
+- **THEN** prompts, cancellation, invocation, refresh, navigation, focus restoration, and authoritative GraphQL results remain unchanged
+- **AND** no console error, page error, CSP violation, external request, stale control, duplicate ID, or overlay leak occurs
diff --git a/openspec/changes/extend-petclinic-demo-data/tasks.md b/openspec/changes/extend-petclinic-demo-data/tasks.md
new file mode 100644
index 00000000000..236f1afabd2
--- /dev/null
+++ b/openspec/changes/extend-petclinic-demo-data/tasks.md
@@ -0,0 +1,22 @@
+## 1. Deterministic demo data
+
+- [ ] 1.1 Extend the existing Petclinic seed graph additively with stable owners and varied pets while preserving established fixture identities and values.
+- [ ] 1.2 Add deterministic past and future visits with stable IDs and clock-relative dates so owner history and clinic-wide upcoming visits exceed their page boundaries.
+- [ ] 1.3 Add integration assertions for deterministic totals, representative sparse and populated owners, preserved fixtures, and idempotent startup behavior.
+
+## 2. Realistic collection paging
+
+- [ ] 2.1 Configure home owner and owner pet collections with page size 5.
+- [ ] 2.2 Configure upcoming, owner-history, and nested pet-visit collections with page size 10.
+- [ ] 2.3 Update resource and integration assertions for the explicit page-size policy.
+
+## 3. Browser qualification
+
+- [ ] 3.1 Update stable browser expectations affected by the richer seed graph without relying on incidental insertion order.
+- [ ] 3.2 Qualify owner, pet, visit-history, upcoming-visit, sorting, filtering, navigation, mutation, compact sizing, and row-peek journeys under the new page boundaries.
+- [ ] 3.3 Run default Vaadin and supported native Playwright suites and retain clean console, network, focus, overflow, and lifecycle behavior.
+
+## 4. Regression and archive readiness
+
+- [ ] 4.1 Run focused and full Petclinic integration tests with Java 21 and perform the applicable IDE build/inspection checks.
+- [ ] 4.2 Run strict OpenSpec validation and `git diff --check`.
(causeway) 04/04: fix(webcomponents): adjust PetOwner visit page size
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 9444e2ff7a499e76c7f059d849de226aa706dd14
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 2 17:51:56 2026 +0100
fix(webcomponents): adjust PetOwner visit page size
---
openspec/specs/generic-htmx-web-component-viewer/spec.md | 2 +-
.../causeway/webcomponents/pages/petclinic.PetOwner.html | 2 +-
.../sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java | 10 +++++-----
.../htmx/petclinic/PetClinicHtmxApplication_IntegTest.java | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/openspec/specs/generic-htmx-web-component-viewer/spec.md b/openspec/specs/generic-htmx-web-component-viewer/spec.md
index 60f8ac7fdc9..ce32e287428 100644
--- a/openspec/specs/generic-htmx-web-component-viewer/spec.md
+++ b/openspec/specs/generic-htmx-web-component-viewer/spec.md
@@ -699,7 +699,7 @@ Petclinic HTML resource pages SHALL demonstrate declarative paging with sample-a
#### Scenario: Owner visit history renders
- **WHEN** an owner page composes visit history
-- **THEN** that collection declares `paged="10"`
+- **THEN** that collection declares `paged="8"`
- **AND** its associated actions, semantic columns, and row peeks remain unchanged
#### Scenario: Nested pet visits render
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html
index 25ba84cc1c1..df30fbd9493 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html
@@ -103,7 +103,7 @@ <h2 id="petclinic-owner-pets-heading">Pets</h2>
<h2 id="petclinic-owner-visits-heading">Visits</h2>
<cw-collection id="visits" named="Visit history"
described-as="All visits recorded for this owner's pets."
- active paged="10">
+ active paged="8">
<cw-peek></cw-peek>
<cw-collection-column id="visitAt" label="When"></cw-collection-column>
<cw-collection-column id="reason" label="Reason"></cw-collection-column>
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java b/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
index b11258c1f44..2f4d36fd068 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
@@ -272,17 +272,17 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
clickObjectLink("Eduardo Rodriguez");
waitForRoute("petclinic.PetOwner", "s_owner-eduardo");
waitForCollectionRows("pets", 5);
- waitForCollectionRows("visits", 10);
+ waitForCollectionRows("visits", 8);
assertThat(page.locator("cw-collection[id='pets'] .causeway-collection-range").textContent())
.isEqualTo("Items 1–5 of 6");
assertThat(page.locator("cw-collection[id='visits'] .causeway-collection-range").textContent())
- .isEqualTo("Items 1–10 of 11");
+ .isEqualTo("Items 1–8 of 11");
page.locator("cw-collection[id='pets'] [data-causeway-grid-next]").click();
page.waitForFunction("() => document.querySelector(\"cw-collection[id='pets']\")?.collectionState?.window?.offset === 5");
waitForCollectionRows("pets", 1);
page.locator("cw-collection[id='visits'] [data-causeway-grid-next]").click();
- page.waitForFunction("() => document.querySelector(\"cw-collection[id='visits']\")?.collectionState?.window?.offset === 10");
- waitForCollectionRows("visits", 1);
+ page.waitForFunction("() => document.querySelector(\"cw-collection[id='visits']\")?.collectionState?.window?.offset === 8");
+ waitForCollectionRows("visits", 3);
openHome();
waitForCollectionRows("petOwners", 5);
@@ -327,7 +327,7 @@ void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
page.locator("cw-collection[id='pets'] [data-causeway-collection-sort='name']").click();
page.waitForFunction("() => document.querySelector(\"cw-collection[id='pets']\")?.collectionState?.window?.ordering === 'REQUESTED'");
assertThat(page.locator("cw-collection[id='pets'] cw-action[id='addPet']").isVisible()).isTrue();
- assertThat(page.locator("cw-collection[id='visits']").getAttribute("paged")).isEqualTo("10");
+ assertThat(page.locator("cw-collection[id='visits']").getAttribute("paged")).isEqualTo("8");
final var visitTotal = ((Number) page.locator("cw-collection[id='visits']")
.evaluate("element => element.collectionState.window.totalCount")).intValue();
assertThat(visitTotal).isEqualTo(2);
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java b/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
index f7275321820..57037235116 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
@@ -378,7 +378,7 @@ void packagesHtmlPagesAndRetainsLayoutFallbackResources() throws Exception {
.contains("<cw-action id=\"removePet\"")
.contains("<cw-collection id=\"visits\" named=\"Visit history\"")
.contains("described-as=\"All visits recorded for this owner's pets.\"")
- .contains("active paged=\"10\"")
+ .contains("active paged=\"8\"")
.contains("<cw-action id=\"bookVisit\"")
.doesNotContain("petclinic-associated-actions", "petclinic-member-composition", " offset=", " size=");
final String homeHtml;