{"id":"vibe-hs-science-fair-vote-test-cases","audience":"high-school","category":"coding","track":"coding","technique":"grounding","title":"Write test cases for a science fair voting page","free":false,"task":"Your class used an AI app builder to make a People's Choice voting page for the science fair. Write exactly 5 numbered test cases, each 'Do: ... | Expect: ...', covering a normal vote, voting twice, a wrong student code, voting for your own project, and voting after the deadline. Use the deadline that's current now. No code blocks, under 130 words.","materialLabel":"The voting rules and a teacher update (attached to your prompt automatically)","material":"People's Choice voting - Eastfield High Science Fair\n\nRules (from the planning doc):\n- Each student gets a 6-character voting code on a slip of paper.\n- One vote per code. Second try shows: \"This code has already voted.\"\n- A wrong code shows: \"Code not found. Check your slip.\"\n- You can't vote for your own project. Shows: \"You can't vote for your own project.\"\n- Voting closes Friday at 3:00pm. After that: \"Voting is closed.\"\n- After a good vote: \"Thanks! Your vote for [project name] is in.\"\n\nUpdate from Ms. Carvalho (Wednesday):\n\"Judges need the results earlier, so voting now closes THURSDAY at 3:00pm. Please test that.\"\n\nOur team: Ana built the page, I'm testing. We'd like to add a live results chart later.\n","rules":[{"type":"numberedItems","count":5},{"type":"codeBlocks","count":0},{"type":"maxProseWords","max":130}],"mistakes":[{"title":"Testing the old deadline","why":"The rules say Friday, and the AI tests Friday.","fix":"Add: \"Voting now closes Thursday 3:00pm.\"","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 rules.\"","checks":["r2"]},{"title":"Ideas instead of tests","why":"The AI lists things to think about without steps.","fix":"Show it: \"1. Do: vote with a new code | Expect: Thanks! Your vote for ... is in.\"","checks":["r0","numberedItems"]},{"title":"Test code","why":"The AI writes automated tests in code blocks.","fix":"Add: \"Plain words, no code blocks.\"","checks":["codeBlocks","maxProseWords"]}],"promptHints":[{"label":"Shows the test shape","patterns":["do:","expect"]},{"label":"Uses the new deadline","patterns":["thursday","update","carvalho"]},{"label":"Asks for exact messages","patterns":["exact","word for word","message"]},{"label":"Sets the count","patterns":["\\b(5|five)\\b"]},{"label":"Caps the length","patterns":["\\d+\\s*words"]}],"hint":"A test case says exactly what you do and exactly what should appear. Use the newest rules, especially for dates.","rubricLabels":["Every one of the 5 lines has the form 'Do: ... | Expect: ...'","The deadline test uses Thursday at 3:00pm (for example voting at 3:01pm Thursday shows \"Voting is closed.\"), not Friday","The expected messages match the rules word for word for the double vote, wrong code and own-project cases"]}