feat: the cart and the account ask for the customer's name
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 4m49s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m15s
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 4m49s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m15s
The Site asked only for CPF/CNPJ, WhatsApp and e-mail, so a person's Tiny contact was named after the recipient or the e-mail, and the WhatsApp notices the client's n8n sends from Tiny greeted "Olá, fulano@gmail.com". The cart's "Seus dados" and the signup now ask for a name, the account page can change it, and it names a CPF customer's Tiny contact (a CNPJ keeps the registry's razão social), the Kanban card and the team's alerts. Orders placed before have none, as the server still accepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,5 +24,15 @@ class CustomerDocumentTest(unittest.TestCase):
|
||||
customer(document)
|
||||
|
||||
|
||||
class CustomerNameTest(unittest.TestCase):
|
||||
def test_a_name_is_tidied_and_may_be_left_out_by_older_carts(self):
|
||||
self.assertEqual(Customer(cnpj='52998224725', zap='16999999999', mail='a@example.test',
|
||||
name=' Maria da Silva ').name, 'Maria da Silva')
|
||||
self.assertEqual(customer('52998224725').name, '')
|
||||
for name in ('1', 'A', '-- .'):
|
||||
with self.subTest(name=name), self.assertRaises(ValidationError):
|
||||
Customer(cnpj='52998224725', zap='16999999999', mail='a@example.test', name=name)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user