[object Object]

← back to Dw Validator Debug TK11314

cover existing retail sample allowance

bbe955c876d434e9c41337c06163cd5ac647a37f · 2026-08-31 01:45:29 -0700 · Steve

Files touched

Diff

commit bbe955c876d434e9c41337c06163cd5ac647a37f
Author: Steve <steve@designerwallcoverings.com>
Date:   Mon Aug 31 01:45:29 2026 -0700

    cover existing retail sample allowance
---
 .../extensions/free-samples-discount/src/run.test.js           | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/shopify/staged/free-samples-function/extensions/free-samples-discount/src/run.test.js b/shopify/staged/free-samples-function/extensions/free-samples-discount/src/run.test.js
index bd36e6e7..8c9a2c74 100644
--- a/shopify/staged/free-samples-function/extensions/free-samples-discount/src/run.test.js
+++ b/shopify/staged/free-samples-function/extensions/free-samples-discount/src/run.test.js
@@ -90,6 +90,16 @@ test("retail lifetime usage reduces the remaining allowance", () => {
   assert.equal(candidate.value.fixedAmount.amount, "4.25");
 });
 
+test("existing retail account needs no new-signup or verification tag", () => {
+  const oldAccount = {
+    id: "gid://shopify/Customer/old-account",
+    hasTrade: [{ tag: "trade_approved", hasTag: false }],
+    samplesUsed: { value: "1" },
+  };
+  const r = run(cart(oldAccount, [line(1, 3, sampleVariant(), "4.25")]));
+  assert.equal(r.operations[0].productDiscountsAdd.candidates[0].value.fixedAmount.amount, "8.50");
+});
+
 test("retail with all 3 lifetime samples used gets no discount", () => {
   assert.deepEqual(run(cart(retail(3), [line(1, 1, sampleVariant())])).operations, []);
 });

← db57aff5 auto-data-snapshot: 2026-08-31T00:07:16 (2 data files) — sho  ·  back to Dw Validator Debug TK11314  ·  auto-data-snapshot: 2026-08-31T02:00:54 (1 data files) — sho 05b61dfb →