chore: build
Backend - Build & Lint / build (push) Successful in 31m59s
Frontend Admin - EAS Build / build (push) Successful in 1h32m56s

This commit is contained in:
Xor290
2026-11-01 13:08:58 +01:00
parent f3eaea4347
commit 0a18460f13
20 changed files with 1694 additions and 190 deletions
+5 -4
View File
@@ -51,15 +51,16 @@ func TestTotalRevenue_NetsReferralAndExcludesNonApproved(t *testing.T) {
}
}
// TotalOrders exclut uniquement les commandes annulées (contrairement à
// TotalRevenue, il compte aussi les commandes non encore approuvées).
func TestTotalOrders_ExcludesOnlyCancelled(t *testing.T) {
// TotalOrders compte uniquement les commandes actives (même périmètre que le
// dashboard) : les commandes terminées (approved) et annulées sont exclues.
func TestTotalOrders_CountsOnlyActiveOrders(t *testing.T) {
cleanupStockTestData(t)
username := newTestClient(t, "stats_total_orders")
productID := newTestProduct(t, "StatsTotalOrders", 100)
now := time.Now()
newTestOrderForStats(t, username, "pending", productID, 1, 10, 0, now)
newTestOrderForStats(t, username, "en_route", productID, 1, 10, 0, now)
newTestOrderForStats(t, username, "approved", productID, 1, 10, 0, now)
newTestOrderForStats(t, username, "cancelled", productID, 1, 10, 0, now)
@@ -68,7 +69,7 @@ func TestTotalOrders_ExcludesOnlyCancelled(t *testing.T) {
t.Fatalf("TotalOrders: %v", err)
}
if total != 2 {
t.Errorf("TotalOrders: got=%d want=2 (pending+approved, cancelled exclue)", total)
t.Errorf("TotalOrders: got=%d want=2 (pending+en_route ; approved et cancelled exclues)", total)
}
}