可以尝试的变体
| 变体 | 示例 | 到达 |
|---|---|---|
| 普通 | k3f9x2@mailclub.dev |
该收件箱 |
| 加号标签 | k3f9x2+promo1@mailclub.dev |
同一个收件箱 |
| 大写字母 | K3F9X2@mailclub.dev |
同一个收件箱 |
任何 +tag 都可以,收件箱会显示每封邮件发往哪个变体。智能体通过 get_address_variants 获取能投递的变体。
测试一下
- 注册领取优惠:使用普通地址,并记下优惠券。
- 再次注册:先用加号标签变体,再用大写字母,每次都在无痕窗口中进行,避免会话延续。
- 查看收件箱。 每封邮件都会显示发往哪个变体。如果收到了第二张优惠券,它的
offer_reuse检查会失败,Accounts 页面会警告新用户优惠发放了不止一次。
检查还会说明优惠券是否不同(应用每次都发了新券),还是同一个共享代码(这时需要结账环节拒绝第二次使用)。用 优惠券结果 记录结账时的处理:重复领取的优惠券如果被接受,检查就会失败。
在测试中
const tagged = address.replace('@', '+promo1@');let submitted = new Date();await signUpForOffer(page, address);await qa.waitForCode(address, { type: 'coupon', since: submitted, timeout: 600 });
submitted = new Date();await signUpForOffer(page, tagged);// The same person: no second coupon should come.await qa.expectNoEmail(tagged, { since: submitted, type: 'code', subtype: 'coupon', timeout: 300 });expect((await qa.offers(address)).passed).toBe(true);智能体通过 get_address_variants、wait_for_code(kind 为 coupon)和 check_offers 获得相同功能,test_offer_reuse 提示词会一步步带你完成。