{"id":"vibe-mkt-discount-code-test-cases","audience":"marketing","category":"coding","track":"coding","technique":"grounding","title":"Write test cases for an AI-built discount code box","free":false,"task":"Your AI-built shop has a new discount code box for the spring campaign. Write exactly 5 numbered test cases, each 'Code: ... | Cart: $... | Expect: ...', one for each code or rule in the campaign sheet, using the current rules after the change. Plain text, no code blocks, under 140 words.","materialLabel":"The campaign sheet and a change note (attached to your prompt automatically)","material":"Spring campaign - discount codes (Wildroot Tea shop, built with an AI app builder)\n\nCodes:\n- SPRING15: 15% off, minimum cart $40.\n- FREESHIP: free shipping, any cart size.\n- WELCOME5: $5 off, first order only.\n- WINTER10: last season's code. Expired Mar 1. Should show \"This code has expired.\"\n\nMessages the box shows:\n- Good code: \"Code applied!\"\n- Cart too small: \"Add $[amount] more to use this code.\"\n- Unknown code: \"We don't recognize that code.\"\n\nChange note from Bea (campaign lead), Monday:\n\"Finance asked us to raise the SPRING15 minimum to $50. Everything else stays.\"\n\nWishlist: stack two codes at once. Not in this release.\n","rules":[{"type":"numberedItems","count":5},{"type":"plainText"},{"type":"maxProseWords","max":140}],"mistakes":[{"title":"Testing the old minimum","why":"The sheet says $40, and the AI tests against it.","fix":"Add: \"SPRING15 minimum is $50 now (Bea's note).\"","checks":["r1"]},{"title":"Vague expectations","why":"The AI writes 'should show an error' instead of the exact message.","fix":"Add: \"Expect the exact message from the sheet.\"","checks":["r1","r2"]},{"title":"Testing features not in the release","why":"The AI tests stacking codes because it's on the wishlist.","fix":"Add: \"No stacking tests.\"","checks":["r2"]},{"title":"Test code or a table","why":"The AI writes automated tests or a markdown table.","fix":"Show it: \"1. Code: SPRING15 | Cart: $60 | Expect: Code applied!\" Plain text.","checks":["r0","numberedItems","plainText","maxProseWords"]}],"promptHints":[{"label":"Shows the test shape","patterns":["code:","cart:","expect"]},{"label":"Uses the new minimum","patterns":["\\$?50","bea","change note"]},{"label":"Asks for exact messages","patterns":["exact","message"]},{"label":"Sets the count","patterns":["\\b(5|five)\\b"]},{"label":"Caps the length","patterns":["\\d+\\s*words"]}],"hint":"Test cases need a specific input and the exact result you expect. Use the newest rules, especially for numbers.","rubricLabels":["Every one of the 5 lines has the form 'Code: ... | Cart: $... | Expect: ...'","The SPRING15 tests use the $50 minimum: a cart under $50 expects \"Add $[amount] more to use this code.\" with the right amount (for example a $45 cart needs $5 more), not a $40 rule","WINTER10 expects \"This code has expired.\", and an unknown code expects \"We don't recognize that code.\"; no test stacks two codes"]}