donation item, shop soft open
All checks were successful
Deploy / build-deploy (push) Successful in 4m11s
All checks were successful
Deploy / build-deploy (push) Successful in 4m11s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b0666841f6
commit
abbd616b40
23 changed files with 2898 additions and 209 deletions
|
|
@ -21,15 +21,15 @@ int main(int argc, char** argv) {
|
|||
|
||||
// The price is rendered from the same integers the checkout charges, with
|
||||
// the derived ex-VAT twin alongside — asserting both pins the arithmetic.
|
||||
srv.BodyHas("/shop/fp6-pmos", "€563.30",
|
||||
"product page shows the from-price (green supplier + €50)");
|
||||
srv.BodyHas("/shop/fp6-pmos", "€465.54", "product page shows the derived ex-VAT price");
|
||||
srv.BodyHas("/shop/fp6-pmos", "€573.80",
|
||||
"product page shows the from-price (green supplier + €60.50 gross markup)");
|
||||
srv.BodyHas("/shop/fp6-pmos", "€474.21", "product page shows the derived ex-VAT price");
|
||||
srv.BodyHas("/shop/fp6-pmos", ">from<", "product page marks the price as a from-price");
|
||||
srv.BodyHas("/shop", "€563.30", "shop card shows the from-price");
|
||||
srv.BodyHas("/shop", "€573.80", "shop card shows the from-price");
|
||||
// Every colour is priced in the selector, and the form carries the exact
|
||||
// data blob the preview computes from.
|
||||
srv.BodyHas("/shop/fp6-pmos", "Black — €569.30", "colour selector prices black");
|
||||
srv.BodyHas("/shop/fp6-pmos", "White — €654.88", "colour selector prices white");
|
||||
srv.BodyHas("/shop/fp6-pmos", "Black — €579.80", "colour selector prices black");
|
||||
srv.BodyHas("/shop/fp6-pmos", "White — €665.38", "colour selector prices white");
|
||||
if (srv.ShopOpen()) {
|
||||
srv.BodyHas("/shop/fp6-pmos", "data-cc=", "form embeds the pricing blob");
|
||||
srv.BodyHas("/shop/fp6-pmos", "id=\"cc-total\"", "live total element present");
|
||||
|
|
@ -38,6 +38,29 @@ int main(int argc, char** argv) {
|
|||
srv.BodyHas("/shop", "coming soon", "shop card carries the coming-soon badge");
|
||||
srv.BodyLacks("/shop/fp6-pmos", "<form", "no order form while coming soon");
|
||||
}
|
||||
// The donation item: open while the phone above may not be — the shop's
|
||||
// soft opening. Its card quotes no price (there is none), its page is a
|
||||
// form asking an amount and, optionally, an email — never an address.
|
||||
srv.BodyHas("/shop", "/shop/donation", "shop grid lists the donation item");
|
||||
srv.BodyHas("/shop", "any amount", "donation card quotes no price");
|
||||
srv.BodyHas("/shop/donation", "name=\"amount\"", "donation form asks for an amount");
|
||||
srv.BodyHas("/shop/donation", "Donate — continue to payment",
|
||||
"donation form submits to payment");
|
||||
srv.BodyLacks("/shop/donation", "name=\"street\"",
|
||||
"donation form asks no address — nothing ships");
|
||||
srv.BodyLacks("/shop/donation", "name=\"quantity\"",
|
||||
"donation form has no quantity — one gift, one line");
|
||||
srv.BodyHas("/shop/donation", "No VAT is charged on a donation",
|
||||
"donation page states the VAT treatment");
|
||||
srv.BodyHas("/shop/donation", "aggregate total",
|
||||
"donation page states how it appears on the financials page");
|
||||
// Both rails are configured in this harness, so the donation offers the
|
||||
// same payment choice checkout does.
|
||||
srv.BodyHas("/shop/donation", "value=\"crypto\"", "donation form offers crypto");
|
||||
// No price, no conversions, no preview: the donation page ships NO
|
||||
// executable script at all — stricter than the shop pages' one-script rule.
|
||||
srv.BodyLacks("/shop/donation", "<script>", "donation page ships no executable script");
|
||||
|
||||
srv.BodyHas("/shop/fp6-pmos", "src=\"/fp6-pmos.jpg\"", "product page embeds the photo");
|
||||
srv.BodyHas("/shop", "src=\"/fp6-pmos.jpg\"", "shop card embeds the thumbnail");
|
||||
// The image file itself is Caddy's to serve (static asset), so its
|
||||
|
|
@ -56,7 +79,7 @@ int main(int argc, char** argv) {
|
|||
srv.BodyHas("/shop", "class=\"price__single\"", "shop card renders the single-number price");
|
||||
srv.BodyHas("/shop", "data-gbp=\"~£", "shop card carries a GBP conversion");
|
||||
srv.BodyHas("/shop", "data-sek=\"~kr ", "shop card carries an SEK conversion");
|
||||
srv.BodyHas("/shop", "data-world=\"€465.54\"", "shop card carries the euro export fallback");
|
||||
srv.BodyHas("/shop", "data-world=\"€474.21\"", "shop card carries the euro export fallback");
|
||||
srv.BodyLacks("/shop", "data-usd=", "no USD price for a country the shop refuses");
|
||||
srv.BodyLacks("/shop", "data-cad=", "no CAD price for a country the shop refuses");
|
||||
// The product page gets the same headline element, so a British visitor
|
||||
|
|
|
|||
Loading…
Reference in a new issue