migration

This commit is contained in:
Daniel Arantes Loverde
2026-08-11 13:22:02 -03:00
parent c4d6998595
commit 7702836fe7
231 changed files with 4329 additions and 1958 deletions

View File

@@ -0,0 +1,32 @@
import Testing
@testable import PediFoods
@Test("CheckoutPaymentMethod raw values match the backend's expected wire format")
func checkoutPaymentMethodRawValues() {
#expect(CheckoutPaymentMethod.pix.rawValue == "PIX")
#expect(CheckoutPaymentMethod.creditCard.rawValue == "CREDIT_CARD")
#expect(CheckoutPaymentMethod.debitCard.rawValue == "DEBIT_CARD")
#expect(CheckoutPaymentMethod.money.rawValue == "MONEY")
#expect(CheckoutPaymentMethod.voucher.rawValue == "VOUCHER")
}
@Test("CheckoutPaymentMethod only pix and creditCard have a subtitle")
func checkoutPaymentMethodSubtitles() {
#expect(CheckoutPaymentMethod.pix.subtitle == "Aprovação imediata")
#expect(CheckoutPaymentMethod.creditCard.subtitle == "No app: rápido e seguro")
#expect(CheckoutPaymentMethod.debitCard.subtitle == nil)
#expect(CheckoutPaymentMethod.money.subtitle == nil)
#expect(CheckoutPaymentMethod.voucher.subtitle == nil)
}
@Test("CheckoutPaymentMethod credit and debit cards share the same icon")
func checkoutPaymentMethodCardIconsShared() {
#expect(CheckoutPaymentMethod.creditCard.iconName == "creditcard.fill")
#expect(CheckoutPaymentMethod.debitCard.iconName == "creditcard.fill")
}
@Test("CheckoutDeliveryType raw values match the backend's expected wire format")
func checkoutDeliveryTypeRawValues() {
#expect(CheckoutDeliveryType.delivery.rawValue == "DELIVERY")
#expect(CheckoutDeliveryType.pickup.rawValue == "PICKUP")
}