DT — Borne de commande
Module : BRN Référence DSF : borne_commande
Exigences NF525
| ID | Exigence | Référence NF525 | Source |
|---|---|---|---|
| EX-BRN-001 | Ticket signé émis par la borne | §6.11, §6.3 | DSF borne_commande |
| EX-BRN-002 | Identification du poste (type borne) | §6.2 | DSF borne_commande |
Cas de test
TC-BRN-001 — Commande complète depuis la borne
| Champ | Valeur |
|---|---|
| Identifiant | TC-BRN-001 |
| Exigence(s) | EX-BRN-001 (§6.11), EX-BRN-002 (§6.2) |
| Type | Fonctionnel |
| Criticité | Bloquant |
| Automatisation | Automatisé (enrichi) — test/nf525/borne_commande/borne_commande_test.dart (24 modèle + 4 analyse statique : sendTicketAsPreparation/PreparationService, pages borne sendTicketAsPreparation, BorneCommandeDone/getReadableID, getReadableID prefix/readableid) + integration_test/nf525/borne_commande/borne_commande_e2e_test.dart (3 tests E2E-A) |
enrichi le 2026-02-24 — 3 tests E2E-A : ticket borne round-trip Firestore, signatures/chaînage, buildHashString, indépendance caisse enrichi le 2026-02-25 — 4 tests analyse statique : envoi cuisine via sendTicketAsPreparation/PreparationService, appel depuis pages borne, affichage numéro via BorneCommandeDone/getReadableID, construction numéro lisible prefix/readableid
Préconditions :
- Borne configurée avec clavier dédié, TPE intégré
Données d'entrée :
- 2 articles sélectionnés, paiement CB
Étapes :
- Le client sélectionne 2 articles sur la borne
- Le client paie par carte bancaire
- Le système génère le ticket
Résultat attendu :
- Ticket R13 créé avec
codeCaisseidentifiant la borne - Ticket signé et chaîné dans la séquence du poste borne
- Ticket borne round-trip Firestore : codeCaisse, opérateur SYSTEM, 3 lignes, 2 taux TVA (e2e-A, enrichi 2026-02-24)
- Chaînage 2 tickets borne + indépendance signingCheckoutId borne vs caisse (e2e-A, enrichi 2026-02-24)
- buildHashString ticket borne identique avant/après round-trip (e2e-A, enrichi 2026-02-24)
- Commande envoyée en cuisine — analyse statique :
sendTicketAsPreparationcréeRestaurantPreparation+managePreparation, pages borne appellent après paiement - Numéro de commande affiché — analyse statique :
BorneCommandeDoneaffiche viagetReadableID(), construit depuisprefix+readableid
TC-BRN-002 — Identification fidélité sur la borne
| Champ | Valeur |
|---|---|
| Identifiant | TC-BRN-002 |
| Exigence(s) | EX-BRN-001 (§6.11) |
| Type | Fonctionnel |
| Criticité | Majeur |
| Automatisation | Automatisé (enrichi) — test/nf525/borne_commande/borne_commande_test.dart (14 modèle + 2 analyse statique : BarcodeKeyboardListener/searchAccountWithBarCode, AccountService fidelitycards/selectAccount) + integration_test/nf525/borne_commande/borne_commande_e2e_test.dart (3 tests E2E-A) |
enrichi le 2026-02-24 — 3 tests E2E-A : ticket borne fidélité/anonyme round-trip Firestore, buildHashString enrichi le 2026-02-25 — 2 tests analyse statique : scan fidélité via BarcodeKeyboardListener/searchAccountWithBarCode, recherche client par fidelitycards/selectAccount
Préconditions :
- Borne avec scanner, client inscrit au programme fidélité
Données d'entrée :
- Carte fidélité du client, commande de 12,00 €
Étapes :
- Le client scanne sa carte fidélité
- Le client compose sa commande
- Le client paie
Résultat attendu :
- Client identifié sur le ticket
- Avantages fidélité cumulés (modèle — cumul/solde points)
- Le ticket porte l'identifiant du client
- Ticket borne fidélité round-trip Firestore : numeroCompteClient, cumul/solde points, soldesClient, parts (e2e-A, enrichi 2026-02-24)
- Ticket borne anonyme round-trip : champs fidélité null (e2e-A, enrichi 2026-02-24)
- buildHashString fidélité vs anonyme identiques avant/après, distincts entre eux (e2e-A, enrichi 2026-02-24)
- Scan carte fidélité et intégration AccountService — analyse statique :
BarcodeKeyboardListenerdans pages borne +searchAccountWithBarCode(v, caseSensitive: false)recherche parfidelitycards+selectAccount(a)
Couverture automatisée
| Exigence | Fichiers de test | Statut |
|---|---|---|
| EX-BRN-001 | test/nf525/borne_commande/borne_commande_test.dart, integration_test/nf525/borne_commande/borne_commande_e2e_test.dart | Automatisé (enrichi — TC-BRN-001 24 modèle + 4 analyse statique + 3 e2e-A) |
| EX-BRN-002 | test/nf525/borne_commande/borne_commande_test.dart, integration_test/nf525/borne_commande/borne_commande_e2e_test.dart | Automatisé (enrichi — TC-BRN-002 14 modèle + 2 analyse statique + 3 e2e-A) |