` and a card), and the dialog holds the popup page's own title, fields, help
+texts and buttons, taken from the describe above. The `wf-bar` and `wf-note` annotation
+siblings are the toolkit's own convention.
+
+On master the scorer chose `div.main` inside `.shell-behind` and printed 18%, every miss from
+the shell (the issue measured 29% on the field popup and 13% on a throwaway one, the same way).
+With the fix it scores the dialog: 100%.
+
+Re-capture the wireframe from a real popup wireframe when one can be shared.
diff --git a/tests/wave2/fixtures/page-fidelity-popup/product-newedit-describe-v023.mdl b/tests/wave2/fixtures/page-fidelity-popup/product-newedit-describe-v023.mdl
new file mode 100644
index 00000000..34fcd84d
--- /dev/null
+++ b/tests/wave2/fixtures/page-fidelity-popup/product-newedit-describe-v023.mdl
@@ -0,0 +1,63 @@
+create or modify page Sales.Product_NewEdit (
+ Title: 'Catalog item',
+ Layout: Atlas_Core.PopupLayout,
+ Folder: 'Catalog/Pages',
+ Params: { $Product: Sales.Product }
+) {
+ layoutgrid g {
+ row row1 {
+ column col1 (DesktopWidth: AutoFill) {
+ dataview dv (DataSource: $Product, ReadOnlyStyle: Control) {
+ -- Context: $currentObject (Product)
+ container formGrid (Class: 'form-grid') {
+ container fgSku (Class: 'form-group') {
+ textbox tbSku (Label: 'SKU *', Attribute: Sku)
+ dynamictext helpSku (
+ Content: 'Set when the item is created. It cannot change afterwards.',
+ Class: 'form-help'
+ )
+ }
+ container fgName (Class: 'form-group') {
+ textbox tbName (Label: 'Name *', Attribute: Name)
+ }
+ container fgDescription (Class: 'form-group span-2') {
+ textarea taDescription (Label: 'Description', Attribute: Description)
+ }
+ container fgCategory (Class: 'form-group') {
+ textbox tbCategory (Label: 'Category', Attribute: Category)
+ }
+ container fgPrice (Class: 'form-group') {
+ textbox tbPrice (Label: 'Unit price *', Attribute: UnitPrice)
+ }
+ container fgBrand (Class: 'form-group') {
+ combobox cbBrand (
+ Label: 'Brand *',
+ Attribute: Product_Brand,
+ DataSource: database from Sales.Brand,
+ CaptionAttribute: Name
+ )
+ }
+ container fgActive (Class: 'form-group') {
+ checkbox cbActive (Label: 'Active', Attribute: Active)
+ dynamictext helpActive (
+ Content: 'Inactive items are not offered on new sales orders.',
+ Class: 'form-help'
+ )
+ }
+ }
+ footer footer1 {
+ actionbutton btnCancel (Caption: 'Cancel', Action: cancel_changes close_page, Class: 'btn')
+ actionbutton btnSave (
+ Caption: 'Save',
+ Action: microflow Sales.ACT_Product_Save(Product: $Product),
+ ButtonStyle: Primary,
+ Class: 'btn btn-primary'
+ )
+ }
+ }
+ }
+ }
+ }
+}
+
+grant view on page Sales.Product_NewEdit to Sales.Admin, Sales.SalesOfficer;
diff --git a/tests/wave2/fixtures/page-fidelity-popup/product-newedit-popup.html b/tests/wave2/fixtures/page-fidelity-popup/product-newedit-popup.html
new file mode 100644
index 00000000..d9675926
--- /dev/null
+++ b/tests/wave2/fixtures/page-fidelity-popup/product-newedit-popup.html
@@ -0,0 +1,48 @@
+
+
+
+
+Wireframe: Sales.Product_NewEdit (popup)
+
+
+
+
+
+
+
+
+
+ Product catalog
+ Every item offered on sales orders.
+
+
+
+ Active items
+ Filtered by category and brand.
+
+
+
+
+
+ Catalog item
+
+
+ Set when the item is created. It cannot change afterwards.
+
+
+
+
+
+
+ Inactive items are not offered on new sales orders.
+
+
+
+
+
+
+
+
+The overview behind the scrim is the caller's page, drawn for context only.
+
+
diff --git a/tests/wave2/test-page-fidelity-mocks.sh b/tests/wave2/test-page-fidelity-mocks.sh
index abf768e7..a4676d87 100755
--- a/tests/wave2/test-page-fidelity-mocks.sh
+++ b/tests/wave2/test-page-fidelity-mocks.sh
@@ -247,6 +247,40 @@ hasnt "no layout hint when no missed class looks like chrome" "$OUT19" "is not i
hasnt "no layout hint for page classes (seg-tabs, dg-*)" "$OUT6" "is not in the input"
has "the hint names the layout when region-* is missed" "$OUT16" "layout LayoutTest.App_Default is not in the input"
+echo " -- a popup wireframe scores the dialog, not the caller's page behind it (#471)"
+# fixtures/page-fidelity-popup/CAPTURE.md: the MDL is a verbatim mxcli v0.23.0 describe of a
+# popup page; the wireframe draws it in the issue's shape, .popup-stage > .shell-behind +
+# .dialog-scrim > .dialog, with the caller's overview (div.main, h1, card) behind the scrim.
+PF="$TOOLKIT/tests/wave2/fixtures/page-fidelity-popup"
+OUT20=$(cd "$TMP" && node "$SUT" --no-log "$PF/product-newedit-popup.html" Product_NewEdit "$PF/product-newedit-describe-v023.mdl" 2>&1)
+echo "$OUT20" | sed 's/^/ | /'
+hasnt "the caller's h1 behind the scrim is not scored" "$OUT20" "heading: Product catalog"
+hasnt "the caller's card behind the scrim is not scored" "$OUT20" "heading: Active items"
+hasnt "the caller's button is not an owed action" "$OUT20" "action: New item"
+has "the dialog's fields and buttons all match" "$OUT20" "text-match 100%"
+sed 's/class="dialog" /class="sheet" /' "$PF/product-newedit-popup.html" > "$TMP/stage-only.html"
+OUT21=$(cd "$TMP" && node "$SUT" --no-log "$TMP/stage-only.html" Product_NewEdit "$PF/product-newedit-describe-v023.mdl" 2>&1)
+hasnt "a .popup-stage with no .dialog still drops the shell" "$OUT21" "heading: Product catalog"
+has "...and still scores what is in front of it" "$OUT21" "headings 1/1"
+sed 's/class="dialog" /class="panel" /; s/class="popup-stage"/class="stage"/' "$PF/product-newedit-popup.html" > "$TMP/no-popup.html"
+OUT22=$(cd "$TMP" && node "$SUT" --no-log "$TMP/no-popup.html" Product_NewEdit "$PF/product-newedit-describe-v023.mdl" 2>&1)
+has "popup evidence but no .dialog and no stage: the old div.main boundary, as before" "$OUT22" "heading: Product catalog"
+# Popup evidence from the page alone: no stage, no scrim, but the MDL names Atlas_Core.PopupLayout.
+sed 's/class="popup-stage"/class="stage"/; s/class="dialog-scrim"/class="scrim"/' "$PF/product-newedit-popup.html" > "$TMP/layout-only.html"
+OUT23=$(cd "$TMP" && node "$SUT" --no-log "$TMP/layout-only.html" Product_NewEdit "$PF/product-newedit-describe-v023.mdl" 2>&1)
+hasnt "a popup layout in the MDL is evidence enough: the shell is not scored" "$OUT23" "heading: Product catalog"
+has "...and the dialog is" "$OUT23" "text-match 100%"
+echo " -- a full-page wireframe with an inline .dialog scores as before (review of #482)"
+# .dialog is the design system's component; a full page may draw an open confirm with it. On
+# master this wireframe scored 39% (the confirm counted as page content); the first cut of #471
+# scored the confirm alone, 5%. No stage, no scrim, a full-page layout: no popup evidence.
+sed 's##&Delete project?
This cannot be undone.
#' \
+ "$FIX/grouped-overview.html" > "$TMP/inline-dialog.html"
+grep -q 'Delete project' "$TMP/inline-dialog.html" || bad "inline-dialog setup: the sed did not insert the confirm" ""
+OUT24=$(cd "$TMP" && node "$SUT" --no-log "$TMP/inline-dialog.html" Demo_Overview "$FIX/demo-overview.mdl" 2>&1)
+echo "$OUT24" | sed 's/^/ | /'
+has "an inline confirm does not become the boundary: the master score, unchanged" "$OUT24" "text-match 39% headings 1/2 actions 1/3 content 1/2 classes 1/5"
+
echo
printf 'test-page-fidelity-mocks: %d passed, %d failed\n' "$PASS" "$FAIL"
[ "$FAIL" -eq 0 ]
Product catalog
+Every item offered on sales orders.
+ +Active items
+Filtered by category and brand.
+Catalog item
Set when the item is created. It cannot change afterwards.
Inactive items are not offered on new sales orders.
Delete project?
This cannot be undone.