Add tests for ticket validity and event date formatting

- Create TicketValiditySchemaTest to verify database schema for ticket validity.
- Update CatalogModelsTest to include tests for event date attributes and selection options.
- Introduce EventDateTextFormatterTest for formatting event dates in Spanish.
- Refactor EventModelsTest to include validity time relationships.
- Add SaleDetailResourceTest to ensure correct serialization of purchase items.
- Enhance TicketTest with validity time checks and status management.
- Implement ValidityTimeResourceTest to validate resource output for different validity types.
- Add ValidityTimeTest to verify casting and validity checks for validity time types.
This commit is contained in:
2026-08-11 12:41:35 -03:00
parent b294e5c46e
commit 02cf3f3773
166 changed files with 10203 additions and 1849 deletions

View File

@@ -24,6 +24,7 @@ return [
'cart' => [
'item_added' => 'Product added to cart.',
'quantity_updated' => 'Product quantity updated.',
'item_updated' => 'Product updated.',
'item_removed' => 'Product removed from cart.',
'positive_quantity' => 'The quantity must be greater than zero.',
'insufficient_stock' => 'There is not enough stock for the requested product. Maximum available: :max.',
@@ -49,6 +50,9 @@ return [
'not_available_for_payment' => 'The purchase is no longer available for payment.',
'not_available_for_review' => 'The purchase is no longer available for review.',
],
'purchase_limit' => [
'exceeded' => 'You can purchase up to :max units of this product.',
],
'ticket' => [
'not_available' => 'One or more tickets are not available.',
'positive_quantity' => 'The number of tickets to generate must be greater than zero.',
@@ -89,6 +93,18 @@ return [
'variants_required' => 'An item with attribute_codes must have variants.',
'variants_forbidden' => 'An item without attribute_codes cannot have variants.',
'direct_inventory_forbidden' => 'An item with variants cannot have direct inventory.',
'event_date_attribute_required' => 'The event_date attribute is required for event date variants.',
'multi_select_attribute_not_on_item' => 'Multi-select attributes must also be present in attribute_codes.',
'event_date_selection_required' => 'At least one event date must be selected.',
'single_event_date_required' => 'Exactly one event date must be selected.',
'event_date_wrong_tenant' => 'Every event date must belong to the catalog item tenant.',
'duplicate_variant_combination' => 'The variant combination must be unique.',
'multi_value_required' => 'At least one value must be selected.',
'single_value_required' => 'Exactly one value must be selected.',
'selected_values_non_empty' => 'Every selected value must be a non-empty string.',
'selected_values_distinct' => 'Selected values must be distinct.',
'invalid_attribute_options' => 'One or more selected values are not valid attribute options.',
'incompatible_validity_windows' => 'Selected values cannot have different validity windows.',
],
'menu' => [
'schema_required' => 'The schema is required for static menus.',

View File

@@ -24,6 +24,7 @@ return [
'cart' => [
'item_added' => 'Producto agregado al carrito.',
'quantity_updated' => 'Cantidad de producto actualizada.',
'item_updated' => 'Producto actualizado.',
'item_removed' => 'Producto eliminado del carrito.',
'positive_quantity' => 'La cantidad debe ser mayor a cero.',
'insufficient_stock' => 'Stock insuficiente para el producto solicitado. Máximo disponible: :max.',
@@ -49,6 +50,9 @@ return [
'not_available_for_payment' => 'La compra ya no está disponible para el pago.',
'not_available_for_review' => "La compra ya no est\u{00E1} disponible para revisi\u{00F3}n.",
],
'purchase_limit' => [
'exceeded' => 'Podés comprar hasta :max unidades de este producto.',
],
'ticket' => [
'not_available' => 'Uno o más tickets no están disponibles.',
'positive_quantity' => 'La cantidad de tickets a generar debe ser mayor a cero.',
@@ -89,6 +93,18 @@ return [
'variants_required' => 'Un ítem con attribute_codes debe tener variantes.',
'variants_forbidden' => 'Un ítem sin attribute_codes no puede tener variantes.',
'direct_inventory_forbidden' => 'Un ítem con variantes no puede tener inventario directo.',
'event_date_attribute_required' => 'El atributo event_date es obligatorio para las variantes con fecha de evento.',
'multi_select_attribute_not_on_item' => 'Los atributos multiselección también deben estar incluidos en attribute_codes.',
'event_date_selection_required' => 'Debe seleccionar al menos una fecha de evento.',
'single_event_date_required' => 'Debe seleccionar exactamente una fecha de evento.',
'event_date_wrong_tenant' => 'Todas las fechas del evento deben pertenecer al tenant del ítem de catálogo.',
'duplicate_variant_combination' => 'La combinación de la variante debe ser única.',
'multi_value_required' => 'Debe seleccionar al menos un valor.',
'single_value_required' => 'Debe seleccionar exactamente un valor.',
'selected_values_non_empty' => 'Cada valor seleccionado debe ser un texto no vacío.',
'selected_values_distinct' => 'Los valores seleccionados no pueden repetirse.',
'invalid_attribute_options' => 'Uno o más valores seleccionados no son opciones válidas del atributo.',
'incompatible_validity_windows' => 'Los valores seleccionados no pueden tener ventanas de validez diferentes.',
],
'menu' => [
'schema_required' => 'El schema es obligatorio para los menús estáticos.',