PASS Tests\Unit\ExampleTest ✓ that true is true 0.01s PASS Tests\Unit\Exports\Product\ProductExportTest ✓ all product bulk export returns single sheet 0.37s ✓ all products sheet headings contain base columns and retailer groups 0.14s ✓ all products sheet headings with no retailers 0.12s ✓ all products sheet data maps correctly 0.13s ✓ all products sheet data shows n for disabled product 0.13s ✓ all products sheet data shows n when no retailer product 0.13s ✓ all products sheet caps perc inventory at 100 0.13s ✓ all products sheet title is products 0.13s ✓ all products sheet column formats are text for sku barcode 0.13s ✓ product bulk export returns products sheet only when no category enum 0.12s ✓ product bulk export returns products and categories sheets when category enum exists 0.13s ✓ product bulk export returns products and categories for fieldfolio 0.12s ✓ product bulk export returns products and categories for freedom 0.12s ✓ product bulk export returns one sheet for temple webster 0.13s ✓ product icons sheet contains all icon options 0.14s ✓ product icons sheet not added for non shopify retailers 0.13s ✓ products sheet headings for kitchen warehouse 0.16s ✓ products sheet headings for shopify skips read only fields 0.15s ✓ products sheet headings for fieldfolio skips read only catalogs 0.17s ✓ products sheet data maps correctly for kitchen warehouse 0.15s ✓ products sheet data shows n for disabled product 0.15s ✓ products sheet data defaults perc inventory to 100 when empty 0.15s ✓ products sheet data caps perc inventory at 100 0.14s ✓ products sheet data defaults when no retailer product 0.15s ✓ products sheet data uses category id for category enum field 0.15s ✓ products sheet headings for fieldfolio include per catalog position columns 0.14s ✓ products sheet headings for non fieldfolio have no position columns 0.16s ✓ products sheet data exports fieldfolio per catalog position 0.13s ✓ products sheet data uses default value when platform config empty 0.15s ✓ products sheet data converts array values to comma separated 0.13s ✓ products sheet column formats are text for sku barcode 0.15s ✓ products sheet title is products 0.16s ✓ categories sheet headings are correct 0.15s ✓ categories sheet returns correct data 0.16s ✓ categories sheet returns empty when no categories 0.16s ✓ categories sheet title is categories 0.13s ✓ all products sheet text columns are a and b 0.14s ✓ products sheet text columns are c and d 0.16s PASS Tests\Unit\Imports\ProductImportTest ✓ per retailer import skips empty rows 0.33s ✓ per retailer import errors when sku missing 0.18s ✓ per retailer import errors when retailer id missing 0.16s ✓ per retailer import errors when retailer id mismatch 0.15s ✓ per retailer import errors when product not found 0.18s ✓ per retailer import errors when retailer product not found 0.17s ✓ per retailer import updates enabled to yes 0.19s ✓ per retailer import updates enabled to no 0.18s ✓ per retailer import updates inventory percentage 0.16s ✓ per retailer import caps inventory percentage at 100 0.18s ✓ per retailer import updates category id 0.20s ✓ per retailer import updates platform configs for kitchen warehouse 0.18s ✓ per retailer import skips read only platform fields 0.19s ✓ per retailer import without slug does not update platform configs 0.19s ✓ per retailer import sets override flags from override columns 0.17s ✓ per retailer import does not overwrite override when column empty 0.19s ✓ per retailer import skips overridable value when override off 0.20s ✓ per retailer import updates overridable value when override on 0.19s ✓ per retailer import updates fieldfolio catalog position 0.18s ✓ per retailer import preserves fieldfolio position when cells empty 0.16s ✓ per retailer import skips fieldfolio catalogs not in extra configs 0.19s ✓ per retailer import creates retailer product image associations 0.21s ✓ per retailer import deletes old retailer image associations 0.20s ✓ per retailer import does not delete product images 0.22s ✓ per retailer import returns correct results on success 0.18s ✓ per retailer import handles multiple rows 0.21s ✓ all product import skips empty rows 0.18s ✓ all product import errors when product not found 0.16s ✓ all product import updates enabled per retailer 0.20s ✓ all product import updates inventory percentage per retailer 0.17s ✓ all product import caps inventory percentage at 100 0.17s ✓ all product import skips retailer products not configured 0.18s ✓ all product import handles images by sort order 0.22s ✓ all product import returns correct results 0.19s ✓ round trip per retailer with images exports then imports correctly 0.23s ✓ round trip per retailer without images skips image processing 0.17s ✓ round trip per retailer import with images enabled but no image columns errors 0.19s ✓ round trip per retailer image toggle changes associations 0.21s ✓ round trip fieldfolio catalog positions export import 0.21s ✓ round trip all product with images exports full urls and imports 0.22s ✓ round trip all product without images preserves existing images 0.19s PASS Tests\Unit\Services\BaseServiceTest ✓ it matches price from retailer price band 0.30s ✓ it matches first comma separated price band 0.14s ✓ it falls back to price band i when no match 0.13s ✓ it returns zero price when no match and no fallback 0.13s ✓ it skips zero price entries 0.12s ✓ it applies fixed price campaign type p 0.12s ✓ it applies discount amount campaign type d 0.14s ✓ it applies percentage campaign type percent 0.13s ✓ it ignores campaigns not matching retailer code 0.13s ✓ it ignores campaigns when no campaign code on retailer 0.14s ✓ it applies active campaign within date range 0.13s ✓ it ignores expired campaigns 0.13s ✓ it ignores future campaigns 0.11s ✓ it picks lowest campaign price from multiple 0.14s ✓ it sets compare at to zero when campaign price equals base 0.13s ✓ it prevents negative campaign price 0.14s ✓ it ignores campaign with zero unit discount 0.13s ✓ it handles empty stock price array 0.13s ✓ it handles missing stock price key 0.15s ✓ it returns correct gst type from matched band 0.12s PASS Tests\Unit\Services\SyncServiceFactoryTest ✓ it returns correct service class for slug with data set "shopify" 0.29s ✓ it returns correct service class for slug with data set "amazon" 0.16s ✓ it returns correct service class for slug with data set "temple webster" 0.15s ✓ it returns correct service class for slug with data set "kitchen warehouse" 0.14s ✓ it returns correct service class for slug with data set "fantastic" 0.14s ✓ it returns correct service class for slug with data set "freedom" 0.13s ✓ it returns correct service class for slug with data set "fieldfolio" 0.15s ✓ it returns correct service class for slug with data set "living styles" 0.14s ✓ it returns correct service class for slug with data set "kg group" 0.12s ✓ it returns correct service class for slug with data set "generic feed" 0.15s ✓ it throws exception for unknown slug 0.14s ✓ it throws exception for empty slug 0.13s FAIL Tests\Unit\Services\Sync\AmazonSyncServiceTest ✓ sync product runs inventory sync when product found 0.22s ✓ sync product does nothing when product not found 0.15s ✓ it syncs inventory with correct quantity 0.17s ✓ it clamps negative inventory to zero 0.15s ✓ it updates existing inventory record 0.16s ✓ it logs error on inventory api failure 0.16s ✓ it caps perc inventory at 100 0.14s ✓ it auto links asin via catalog search when no ref id 0.15s ✓ it skips auto link when asin already exists 0.15s ✓ it skips auto link when no barcode 0.15s ✓ it continues inventory sync when catalog search fails 0.16s ✓ inventory sync description reports submission and transaction 0.17s ✓ inventory sync description reports failure with amazon errors 0.16s ✓ inventory sync description reports missing asin 0.15s ⨯ pull orders fetches and syncs new orders 0.25s ✓ pull orders skips existing orders 0.19s ✓ pull orders handles api failure 0.17s ⨯ pull orders paginates with next token 0.19s ✓ pull orders handles empty list 0.14s ✓ normalize amazon purchase order maps fields correctly 0.14s ✓ normalize amazon purchase order returns null for missing po 0.14s ⨯ sync order creates esuite transaction 0.19s ⨯ sync order handles esuite failure 0.19s ✓ build amazon trans comment prepaid 0.13s ✓ build amazon trans comment within credit 0.13s ✓ build amazon trans comment over credit 0.14s ✓ refetch order returns normalized payload on success 0.15s ✓ refetch order returns null on api failure 0.14s PASS Tests\Unit\Services\Sync\FantasticFurnitureSyncServiceTest ✓ sync product runs inventory sync when product found 0.26s ✓ sync product does nothing when product not found 0.15s ✓ it syncs inventory with warehouse and price 0.13s ✓ it uses compare at as listing price when on sale 0.15s ✓ it applies inventory percentage 0.16s ✓ it clamps negative stock to zero 0.15s ✓ it updates existing inventory record 0.15s ✓ it logs error on api failure 0.15s ✓ it caps inventory percentage at 100 0.15s ✓ it iterates multiple existing inventories 0.15s ✓ it defaults stock quantity to zero when missing 0.16s ✓ it uses default warehouse code when not configured 0.16s ✓ it uses discount type d for campaign 0.15s ✓ it uses percentage discount for campaign 0.15s ✓ it uses regular price when no campaign 0.15s ✓ it sends correct payload structure 0.13s ✓ it sends title in payload when override on 0.15s ✓ it does not send title in payload when override off 0.16s ✓ it pulls title from dsco and saves when override off 0.16s ✓ it does not pull title from dsco when override on 0.15s ✓ it does not send title when override on but product name empty 0.15s ✓ it logs payload with api payload and product details 0.16s ✓ sync inventory calls sync inventory details once when no existing inventories 0.13s ✓ sync inventory defaults perc inventory to 100 when missing 0.15s ✓ it proceeds with inventory push when product not on dsco 0.16s ✓ it proceeds with inventory push when dsco check fails 0.15s ✓ it constructs and initialises all dependencies 0.17s ✓ it sets retailer details from database 0.15s ✓ sync inventory dry run skips push but creates test sync log 0.15s ✓ sync inventory writes human readable description on success 0.14s ✓ sync inventory writes human readable description on failure 0.15s PASS Tests\Unit\Services\Sync\FeedSyncServicesTest ✓ living styles sync product runs inventory when product found 0.27s ✓ living styles sync product does nothing when product not found 0.14s ✓ living styles sync inventory creates record 0.15s ✓ living styles inventory applies percentage 0.14s ✓ generic feed sync product runs inventory when product found 0.14s ✓ generic feed sync product does nothing when product not found 0.14s ✓ generic feed sync inventory creates record 0.15s ✓ generic feed inventory updates existing 0.15s ✓ generic feed inventory caps percentage at 100 0.15s FAIL Tests\Unit\Services\Sync\FieldfolioSyncServiceTest ✓ auto badge discontinued always returns 6 0.21s ✓ auto badge zero qty with arrival date returns upcoming 4 0.15s ✓ auto badge zero qty no arrival ending status returns discontinued 6 0.15s ✓ auto badge zero qty no arrival active status returns sold out 5 0.17s ✓ auto badge existing product arrival within 7 days does not get new 0.16s ✓ auto badge new product arrival within 7 days returns new 1 0.19s ✓ auto badge existing product arrival within 7 days with campaign gets special 0.15s ✓ auto badge campaign active returns special 3 0.14s ✓ auto badge no condition matched returns null 0.17s ✓ manual badge override uses provided value 0.16s ✓ it adds ending stock tag when status e and zero qty 0.15s ✓ it creates new product when no catalog mapping 0.16s ✓ it updates existing product with catalog mapping 0.17s ✓ it syncs inventory per catalog 0.14s ✓ it clamps negative inventory to zero 0.16s ✓ it skips catalog with no product or variety id 0.16s ✓ it logs error when create returns no product id 0.15s ✓ it logs error when update api returns error 0.16s ✓ it resolves draft id and retries when published version error on product update 0.18s ✓ it logs error when published version error and draft not found 0.14s ✓ it resolves draft id and retries when published version error on inventory update 0.17s ✓ it logs error when inventory published version error and draft not found 0.19s ✓ it removes catalog mapping when product deleted from fieldfolio 0.16s ✓ it removes catalog mapping when product deleted from fieldfolio on inventory sync 0.17s ✓ is published version error detects error message 0.17s ✓ is published version error returns false for success 0.15s ✓ is published version error returns false for other errors 0.14s ✓ is published version error detects empty 422 response 0.16s ✓ is published version error detects empty 404 response 0.15s ✓ is published version error detects empty 403 response 0.14s ✓ is published version error ignores 500 with empty response 0.15s ✓ is published version error ignores 422 with non empty response 0.15s ✓ it sets sale price when campaign active 0.14s ✓ auto badge stock with arrival over 7 days and campaign returns special 3 0.16s ✓ auto badge stock with arrival over 7 days no campaign returns null 0.16s ✓ auto badge negative qty treated as zero with arrival returns upcoming 0.17s ✓ it does not duplicate ending stock tag 0.18s ✓ it fetches current badge from fieldfolio and retains it for existing product 0.18s ✓ it maps all badge labels correctly from fieldfolio 0.22s ✓ it maps unknown badge label to null 0.17s ✓ it does not fetch current badge for new product 0.17s ✓ it pulls moq from fieldfolio when esuite has no value 0.17s ✓ moq new product with esuite moq and box qty 0.14s ✓ moq new product with moq only no box qty 0.14s ✓ moq new product no moq sets partial success 0.13s ✓ moq new product moq not multiple of box qty 0.14s ✓ moq existing product ff has moq skips sync 0.16s ✓ moq existing product ff has box qty only skips sync 0.16s ✓ moq existing product ff has values esuite differs logs mismatch 0.15s ✓ moq existing product ff has values esuite same no mismatch 0.15s ✓ moq existing product ff blank esuite valid syncs 0.16s ✓ moq existing product ff blank esuite invalid multiple 0.14s ✓ moq existing product neither has values 0.16s ✓ moq existing product no varieties in response 0.16s ✓ moq new product moq is exact multiple of box qty 0.14s ✓ it updates existing inventory record 0.17s ✓ it logs error when inventory api fails 0.17s ✓ it caps perc inventory at 100 0.15s ✓ it updates badge to discontinued during inventory sync 0.15s ✓ it updates badge to sold out during inventory sync 0.17s ✓ it adds ending stock tag during inventory sync 0.16s ✓ it returns early from sync inventory when no retailer product 0.16s ✓ it sets upcoming badge during inventory sync when zero qty with arrival date 0.16s ✓ it sets special badge during inventory sync when campaign active 0.14s ✓ it sets null badge during inventory sync when no conditions met 0.15s ✓ it uses manual label override during inventory sync 0.17s ✓ it sets null badge when manual label is empty during inventory sync 0.17s ✓ it does not duplicate ending stock tag during inventory sync 0.17s ✓ it constructs with real dependencies from db 0.18s ✓ it processes local image file successfully 0.18s ✓ it creates catalog entry in extra configs during product create 0.16s ✓ it formats stock due date in create path 0.18s ✓ it uses default category when category is null 0.16s ✓ it adds new catalog entry for previously unknown catalog 0.18s ✓ it logs error when product not found in sync product 0.15s ✓ it skips catalog processing when no retailer product 0.15s ✓ it formats stock due date as dmy in api payload 0.14s ✓ it clears stock due date when qty greater than zero 0.15s ✓ it repositions already mapped images in fieldfolio 0.17s ✓ it preserves non sync fieldfolio images 0.17s ✓ it sets partial success when local image file missing 0.17s ✓ it returns error from image sync when fieldfolio id empty 0.16s ✓ it handles external url image download failure 0.15s ✓ it skips sync when barcode is empty 0.16s ✓ it propagates image sync error to product sync log 0.36s ✓ it processes multiple catalogs linked and unlinked 0.19s ✓ it creates product and updates image mapping 0.34s ✓ it handles unlinked catalog with no search result 0.17s ✓ it skips invalid pictures when preserving non sync images 0.17s ✓ it stores different image ids per catalog 0.30s ✓ it handles empty stock info str3 in sync product 0.15s ✓ it skips search for already linked catalogs 0.15s ✓ it proactively corrects published id to draft id on sync product 0.17s ✓ it searches and links unlinked catalog in sync product 0.19s ✓ it skips zero string catalog ids via continue 0.18s ✓ catch block falls back to current badge when date parse fails without campaign 0.17s ✓ catch block falls back to special when date parse fails with campaign 0.16s ✓ it processes external url image successfully 0.17s ✓ it catches local image processing error 0.19s ✓ it hits false check when external download returns false 0.18s ✓ it hits false check when local file read returns false 0.17s ✓ build brand value list returns comma separated labels 0.15s ✓ build brand value list returns empty string when no brand values 0.16s ✓ build brand value list returns empty string when brand values null 0.15s ✓ build brand value list skips invalid ids 0.15s ✓ build brand value list returns single label 0.15s ✓ parse brand values returns valid ids only 0.14s ✓ parse brand values returns empty array when input empty 0.15s ✓ parse brand values casts string ids to int for comparison 0.15s ✓ parse brand values filters out all invalid ids 0.16s ✓ pull category saves matching fieldfolio category 0.16s ✓ pull category does nothing when no db match 0.16s ✓ pull category clears local category when fieldfolio has none 0.16s ✓ it pushes category to fieldfolio on update when override enabled 0.17s ✓ it does not push category on update when override disabled 0.17s ✓ it logs partial success when override enabled but no category 0.16s ✓ it always includes category on create when available 0.16s ✓ it assigns random category when create has no category 0.17s ! it returns early with error when create has no category and no categories exist → This test did not perform… 0.16s ✓ it skips pull category on update when override enabled 0.19s ✓ it pulls category on create when override disabled 0.19s ✓ it sends brand value list in create payload 0.18s ✓ it sends brand value list in update payload 0.15s ✓ product update description reports overrides off and images 0.17s ✓ product update description reports overrides on 0.17s ✓ product create description reports required fields 0.17s ✓ product update description reports failure reason 0.16s ✓ inventory sync description reports calculation and badge 0.17s ✓ inventory sync description reports failure 0.14s ✓ it reads position from per catalog extra configs 0.17s ✓ it does not send position when override is off 0.17s ✓ it pulls position to per catalog extra configs after update 0.17s ✓ it logs position change when position differs 0.17s ✓ it does not log position when unchanged 0.17s ✓ it always sends product name on create 0.16s ✓ it sends esuite name on create when platform config empty 0.18s ✓ it includes name in update when override product name enabled 0.16s ✓ it excludes name from update when override product name disabled 0.16s ✓ it pulls product name from fieldfolio when override off 0.16s ✓ it includes brand in update when override brand enabled 0.17s ✓ it excludes brand from update when override brand disabled 0.16s ✓ it sends custom tags on update when value exists 0.16s ✓ it excludes custom tags from update when empty 0.17s ✓ it excludes brand values from update when override disabled 0.16s ✓ it defaults override flags to false so fieldfolio is source of truth 0.17s ✓ it pulls overridable fields from fieldfolio when override off 0.18s ✓ it sends custom tags in inventory sync when value exists 0.18s ✓ it excludes custom tags from inventory sync when empty 0.17s ✓ it identifies highest priority catalog correctly 0.15s ✓ it treats single catalog as highest priority 0.17s ✓ it skips pull shared fields for lower priority catalog 0.17s ✓ update does not send hidden when override disabled off 0.18s ✓ update sends hidden 1 when override disabled on and disabled checked 0.15s ✓ update sends hidden 0 when override disabled on and disabled unchecked 0.17s ⨯ pull orders fetches and syncs new orders 0.21s ✓ pull orders skips existing orders 0.19s ✓ pull orders handles api failure 0.18s ✓ pull orders handles empty list 0.19s ✓ pull orders handles detail api failure 0.20s ✓ pull orders uses last successful sync timestamp 0.20s ✓ refetch order returns normalized payload on success 0.17s ✓ refetch order strips ff prefix before api call 0.16s ✓ refetch order returns null on api failure 0.16s FAIL Tests\Unit\Services\Sync\FreedomSyncServiceTest ✓ sync product runs inventory sync when product found 0.82s ✓ sync product does nothing when product not found 0.18s ✓ sync inventory creates record 0.17s ✓ sync inventory updates existing record 0.17s ✓ sync inventory clamps negative stock to zero 0.19s ✓ sync inventory caps perc inventory at 100 0.17s ✓ sync inventory applies percentage correctly 0.19s ✓ sync inventory floors fractional quantities 0.16s ✓ sync inventory handles zero stock 0.17s ✓ sync inventory updates multiple existing inventories 0.18s ✓ sync cron product creates sync logs per product 0.26s ✓ sync cron product logs correct payload data 0.23s ✓ sync cron product uses error status when api commented out 0.21s ✓ sync cron product with no products creates no logs 0.19s ✓ sync cron product handles export failure 0.22s ✓ sync cron product deletes old files 0.21s ✓ sync cron product keeps recent files 0.23s ✓ sync cron product filename contains freedom products prefix 0.21s ✓ sync cron product incremental exports only modified products 0.23s ✓ sync cron product incremental skips when no modified stocks 0.19s ✓ sync cron product full ignores modified stock nos 0.20s ✓ sync cron product includes retailer product data in log 0.23s ✓ sync cron product calls batch api and links unlinked products 0.21s ✓ sync cron product batch skips already linked products 0.23s ✓ sync cron product batch respects category override 0.21s ✓ sync cron product batch handles empty api response 0.23s ✓ sync cron product batch skips products without barcodes 0.22s ✓ batch link skips error when product id configured but ean fails 0.22s ✓ batch link creates error log when ean fails and no product id 0.22s ✓ sync cron inventory creates sync logs per product 0.23s ✓ sync cron inventory logs correct stock calculation 0.22s ✓ sync cron inventory writes human readable description on success 0.19s ✓ sync cron inventory writes human readable description on failure 0.22s ✓ sync cron inventory caps stock percent at 100 0.22s ✓ sync cron inventory uses success status when upload stubbed 0.24s ✓ sync cron inventory with no products creates no logs 0.19s ✓ sync cron inventory handles export failure 0.20s ✓ sync cron inventory deletes old files 0.22s ✓ sync cron inventory filename contains freedom inventory prefix 0.20s ✓ sync cron inventory logs inventory count per product 0.23s ✓ sync cron inventory incremental exports only modified products 0.20s ✓ sync cron inventory incremental skips when no modified stocks 0.17s ✓ sync cron inventory full ignores modified stock nos 0.22s ✓ sync cron inventory skips products without inventory records 0.22s ✓ sync cron product ignores non matching filenames during cleanup 0.23s ✓ sync cron inventory ignores product files during cleanup 0.21s ✓ sync cron product successful export still errors because api commented out 0.23s ✓ sync cron inventory successful export returns success status 0.24s ✓ sync cron product processes many products 0.27s ✓ sync cron inventory processes many products 0.24s ✓ sync cron product skips products without enabled retailer product 0.20s ✓ sync cron product log records correct retailer integration id 0.21s ✓ sync cron inventory log records correct retailer integration id 0.22s ✓ sync cron product export failure response includes path 0.21s ✓ sync cron inventory export failure response includes path 0.19s ✓ sync cron product handles product with null retailer product 0.20s ✓ sync cron inventory handles zero stock quantity 0.21s ⨯ pull orders fetches and syncs new orders 0.21s ✓ pull orders handles api failure 0.19s ✓ pull orders handles empty list 0.17s ✓ pull orders uses last successful sync timestamp 0.21s ⨯ pull orders updates existing order at shipping status 0.24s ✓ pull orders skips existing order at waiting acceptance 0.21s ✓ refetch order returns normalized payload on success 0.17s ✓ refetch order returns null on api failure 0.16s ✓ refetch order returns null when order not found 0.17s PASS Tests\Unit\Services\Sync\KgGroupSyncServiceTest ✓ sync product runs inventory sync when product found 0.43s ✓ sync product does nothing when product not found 0.18s ✓ sync inventory creates record 0.17s ✓ sync inventory applies percentage 0.18s ✓ sync inventory updates existing record 0.19s ✓ sync inventory clamps negative to zero 0.18s ✓ sync inventory caps perc at 100 0.18s ✓ sync ftp inventory exports csv and creates per product logs 0.22s ✓ sync ftp inventory uses date filename 0.20s ✓ sync ftp inventory deletes old files 0.23s ✓ sync ftp inventory handles export failure 0.21s ✓ sync ftp inventory handles stream read failure 0.21s ✓ sync ftp inventory logs correct stock calculation 0.21s ✓ sync ftp inventory writes human readable description on failure 0.20s ✓ sync ftp inventory writes human readable description on success 0.22s ✓ sync ftp inventory with no products 0.19s ✓ sync ftp inventory creates log per product 0.24s ✓ sync ftp inventory store ok readstream ok sftp success 0.20s ✓ sync ftp inventory incremental skips when no modified stocks 0.20s ✓ sync ftp inventory incremental exports only modified products 0.21s ✓ sync ftp inventory full ignores modified stock nos 0.21s FAIL Tests\Unit\Services\Sync\KitchenWarehouseSyncServiceTest ✓ sync product logs error when product not found in db 0.24s ✓ sync product logs error when no retailer product 0.12s - it creates new product in ordoro and links to cart → Product create/update temporarily disabled 0.15s - it links existing ordoro product by barcode → Product create/update temporarily disabled 0.15s - it logs error on create failure and does not link cart → Product create/update temporarily disabled 0.16s - it updates existing product using barcode → Product create/update temporarily disabled 0.15s - it logs error on update failure → Product create/update temporarily disabled 0.17s - it skips disabled products → Product create/update temporarily disabled 0.15s - it does not link cart when cart id is missing → Product create/update temporarily disabled 0.14s - it sets partial success when cart link fails → Product create/update temporarily disabled 0.14s - it uses compare at price when available → Product create/update temporarily disabled 0.15s - it uses regular price when no compare at → Product create/update temporarily disabled 0.15s - it includes weight upc and category in product payload → Product create/update temporarily disabled 0.15s - it excludes category when not configured → Product create/update temporarily disabled 0.15s ✓ it syncs inventory to ordoro warehouse using barcode 0.14s ✓ it skips inventory push when product not in ordoro 0.15s ✓ it logs error when warehouse id is zero 0.15s ✓ it logs error when barcode is empty 0.18s ✓ it clamps negative inventory to zero 0.15s ✓ it caps perc inventory at 100 0.15s ✓ it updates existing inventory record 0.16s ✓ it logs error on inventory api failure 0.14s ✓ it returns early when no retailer product in inventory sync 0.15s ✓ sync inventory iterates multiple inventories 0.17s ✓ sync product skips inventory sync for disabled product 0.15s ✓ inventory sync description reports calculation on success 0.15s ✓ inventory sync description reports failure reason 0.15s ✓ inventory sync description reports missing warehouse id 0.13s ✓ inventory sync description reports missing barcode 0.13s ✓ it constructs and initialises all dependencies 0.15s ✓ it sets retailer details from database 0.17s ⨯ pull orders fetches and syncs new orders 0.21s ✓ pull orders skips existing orders 0.17s ✓ pull orders handles api failure 0.16s ✓ pull orders handles empty list 0.15s ✓ pull orders uses last successful sync timestamp 0.15s ✓ refetch order returns normalized payload on success 0.16s ✓ refetch order returns null on api failure 0.15s ✓ refetch order returns null when order not found 0.14s FAIL Tests\Unit\Services\Sync\LivingStylesSyncServiceTest ✓ sync product runs inventory sync when product found 0.30s ✓ sync product does nothing when product not found 0.18s ✓ sync inventory creates record 0.19s ✓ sync inventory applies percentage 0.17s ✓ sync inventory updates existing record 0.19s ✓ sync inventory clamps negative to zero 0.18s ✓ sync inventory caps perc at 100 0.16s ✓ sync ftp inventory exports xlsx and creates per product logs 0.24s ✓ sync ftp inventory uses fixed filename 0.22s ✓ sync ftp inventory handles export failure 0.21s ✓ sync ftp inventory logs correct stock calculation 0.22s ✓ sync ftp inventory with no products 0.18s ✓ sync ftp inventory creates log per product 0.24s ✓ sync ftp inventory store ok returns success without ftp 0.20s ✓ sync ftp inventory description notes ftp upload on success 0.22s ✓ sync ftp inventory description reports export failure 0.19s ✓ sync ftp inventory incremental skips when no modified stocks 0.17s ✓ sync ftp inventory incremental exports only modified products 0.22s ✓ sync ftp inventory full ignores modified stock nos 0.22s ⨯ pull orders downloads and parses csv from ftp 0.24s ✓ pull orders skips existing orders 0.20s ⨯ pull orders moves processed files 0.23s ✓ normalize ftp order maps columns correctly 0.17s ⨯ sync order creates order and syncs to esuite 0.22s ⨯ sync order handles esuite failure 0.21s ✓ pull orders handles no csv files 0.18s ✓ pull orders handles ftp connection failure 0.19s ⨯ pull orders groups multiple rows per order 0.23s ✓ refetch order always returns null 0.18s PASS Tests\Unit\Services\Sync\ShopifySyncServiceTest ✓ it constructs and initialises all dependencies 0.35s ✓ it sets retailer details from database 0.18s ✓ it archives product when status is discontinued 0.16s ✓ it archives discontinued even with high stock 0.17s ✓ it archives ending stock with zero qty 0.16s ✓ it archives active stock with zero qty and no eta 0.16s ✓ it keeps active when zero qty but has eta 0.15s ✓ it keeps active when stock available 0.16s ✓ it treats negative qty as zero 0.17s ✓ it skips sync for disabled product with ref id 0.15s ✓ it creates product when no retailer ref id 0.18s ✓ it updates existing product 0.17s ✓ it reactivates archived product with stock 0.15s ✓ it does not reactivate discontinued products 0.17s ✓ it calculates inventory with percentage 0.18s ✓ it clamps negative stock to zero for inventory 0.16s ✓ it keeps active when ending stock has positive qty 0.18s ✓ it proceeds when disabled and no ref id 0.17s ✓ it logs error when create returns no product id 0.14s ✓ it logs error when update has user errors 0.16s ✓ it logs error when update returns non 200 0.18s ✓ it recreates product when not found error 0.16s ✓ it logs error when recreate also fails 0.17s ✓ it reactivates archived product with eta date even zero stock 0.17s ✓ it does not reactivate when disabled 0.15s ✓ it does not reactivate ending stock with zero qty 0.17s ✓ it uses product name from platform configs when set 0.17s ✓ it includes tags and category in payload 0.17s ✓ it includes tags in create payload 0.16s ✓ it caps perc inventory at 100 for inventory 0.18s ✓ it updates existing inventory record 0.15s ✓ it logs error status when variant update fails 0.16s ✓ it logs error status when set inventory level fails 0.16s ✓ it applies campaign percentage discount to inventory price 0.17s ✓ it sets taxable false when gst type is not gst 0.16s ✓ it syncs each inventory record when multiple exist 0.17s ✓ it archives product during inventory sync when discontinued 0.14s ✓ it reactivates archived product during inventory sync when stock arrives 0.15s ✓ it does not reactivate disabled product during inventory sync 0.17s ✓ it archives ending stock with zero qty during inventory sync 0.17s ✓ it logs partial success when status update fails during inventory sync 0.16s ✓ it deletes then sets metafields on shopify 0.17s ✓ it skips metafield set when all values empty 0.16s ✓ it converts plain text to rich text for textarea metafields 0.15s ✓ it resolves metaobject handles to gids for product icons 0.17s ✓ it sends tags on update when value exists 0.17s ✓ it omits tags on update when value empty 0.17s ✓ it skips overridable metafields when override is off 0.18s ✓ it includes overridable metafields when override is on 0.17s ✓ it does not pull tags from shopify response 0.15s ✓ it pulls rich text metafield from shopify when override off 0.17s ✓ it pulls metaobject references as handles when override off 0.17s ✓ it does not pull overridable fields when overrides are on 0.18s ✓ it sends null category when no category set 0.17s ✓ it uses default product name when platform configs empty 0.17s ✓ it omits tags from payload when tags empty 0.17s ✓ it sends category gid in update payload when override category enabled 0.17s ✓ it sends category gid in create payload when override category enabled 0.17s ✓ it does not send category gid when override enabled but no category set 0.17s ✓ it does not send category gid when override enabled but category id empty 0.16s ✓ it saves category when shopify response has matching category 0.18s ✓ it does not update category when shopify category has no db match 0.16s ✓ it clears category when shopify response has no category 0.16s ✓ it calls create update when product found with ref id 0.17s ✓ it skips sync when duplicate barcode found in shopify 0.17s ✓ it links shopify product when barcode search finds match 0.17s ✓ it links category when barcode search finds product with category 0.18s ✓ it proceeds without linking when barcode search finds nothing 0.18s ✓ it uploads images and updates mapping on success 0.18s ✓ it logs warning when image upload fails 0.16s ✓ it logs warning when image deletion fails 0.18s ✓ it uploads images in sort order sequence 0.19s ✓ it deletes previously uploaded images before reuploading 0.15s ✓ it invokes sort order query and converts http to https 0.19s ✓ it creates new image mapping when existing mapping not found 0.21s ✓ it logs error when product not found in db 0.15s ✓ it resolves metaobject gids to handles during linking 0.19s ✓ it pulls rich text metafields as plain text during linking 0.19s ✓ it pulls plain scalar metafields during linking 0.17s ✓ it falls back to raw value for malformed rich text 0.19s ✓ it retries on 429 and returns successful result 2.18s ✓ it retries on 502 and returns successful result 5.17s ✓ it throws exception when all retries exhausted on 502 15.18s ✓ it uploads images starting after existing shopify images 0.16s ✓ it passes through valid rich text json without reconverting 0.14s ✓ product create writes description with override status 0.16s ✓ product update writes description with overrides off 0.18s ✓ inventory sync writes description with price and status 0.16s ✓ inventory sync description reports status change 0.16s ✓ inventory sync description reports failure 0.18s ✓ build trn det payload calculates negative discount when esuite price higher 0.15s ✓ build trn det payload calculates positive discount when shopify price higher 0.16s ✓ build trn det payload no discount when product not found 0.17s ✓ build trn det payload no discount when esuite price is zero 0.17s FAIL Tests\Unit\Services\Sync\TempleWebsterSyncServiceTest ✓ sync product runs inventory sync when product found 0.51s ✓ sync product does nothing when product not found 0.18s ✓ sync inventory creates record 0.19s ✓ sync inventory applies percentage 0.18s ✓ sync inventory updates existing record 0.19s ✓ sync inventory clamps negative to zero 0.19s ✓ sync inventory caps perc at 100 0.17s ✓ sync ftp inventory exports csv and creates per product logs 0.21s ✓ sync ftp inventory uses supplier id in filename 0.21s ✓ sync ftp inventory deletes old files 0.21s ✓ sync ftp inventory handles export failure 0.21s ✓ sync ftp inventory handles stream read failure 0.20s ✓ sync ftp inventory logs correct stock calculation 0.22s ✓ sync ftp inventory writes human readable description on failure 0.23s ✓ sync ftp inventory writes human readable description on success 0.23s ✓ sync ftp inventory description reports discontinued and arrival date 0.21s ✓ sync ftp inventory with no products 0.18s ✓ sync ftp inventory creates log per product 0.21s ✓ sync ftp inventory uses default supplier id 0.22s ✓ sync ftp inventory store ok readstream ok ftp success 0.21s ✓ sync ftp inventory incremental skips when no modified stocks 0.14s ✓ sync ftp inventory incremental exports only modified products 0.22s ✓ sync ftp inventory full ignores modified stock nos 0.21s ⨯ pull orders syncs new orders from api 0.20s ✓ pull orders skips existing orders 0.20s ✓ pull orders handles empty list 0.19s ✓ pull orders handles list api failure 0.19s ✓ pull orders handles detail api failure 0.18s ✓ pull orders uses last successful sync timestamp 0.19s ✓ normalize tw api order maps fields correctly 0.17s ✓ normalize tw api order returns null for missing po 0.17s ✓ normalize tw api order skips empty skus 0.17s ✓ refetch order returns normalized payload on success 0.17s ✓ refetch order returns null on api failure 0.18s ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\AmazonSyncServiceTest > pull orders fetches and syncs ne… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\AmazonSyncService.php:838 834▕ $payload = [ 835▕ 'AccountRef' => $accountRef, 836▕ 'TransComment' => $transComment, 837▕ 'TransIncGST' => false, ➜ 838▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 839▕ 'TransYourRef' => $order['name'] ?? '', 840▕ 'BatchType' => 'SO', 841▕ 'TransLedger' => 'S', 842▕ ]; 1 app\Services\Sync\Retailer\AmazonSyncService.php:838 2 app\Services\Sync\Retailer\AmazonSyncService.php:826 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\AmazonSyncServiceTest > pull orders paginates with next… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\AmazonSyncService.php:838 834▕ $payload = [ 835▕ 'AccountRef' => $accountRef, 836▕ 'TransComment' => $transComment, 837▕ 'TransIncGST' => false, ➜ 838▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 839▕ 'TransYourRef' => $order['name'] ?? '', 840▕ 'BatchType' => 'SO', 841▕ 'TransLedger' => 'S', 842▕ ]; 1 app\Services\Sync\Retailer\AmazonSyncService.php:838 2 app\Services\Sync\Retailer\AmazonSyncService.php:826 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\AmazonSyncServiceTest > sync order creates esuite transa… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\AmazonSyncService.php:838 834▕ $payload = [ 835▕ 'AccountRef' => $accountRef, 836▕ 'TransComment' => $transComment, 837▕ 'TransIncGST' => false, ➜ 838▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 839▕ 'TransYourRef' => $order['name'] ?? '', 840▕ 'BatchType' => 'SO', 841▕ 'TransLedger' => 'S', 842▕ ]; 1 app\Services\Sync\Retailer\AmazonSyncService.php:838 2 app\Services\Sync\Retailer\AmazonSyncService.php:826 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\AmazonSyncServiceTest > sync order handles esuite failur… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\AmazonSyncService.php:838 834▕ $payload = [ 835▕ 'AccountRef' => $accountRef, 836▕ 'TransComment' => $transComment, 837▕ 'TransIncGST' => false, ➜ 838▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 839▕ 'TransYourRef' => $order['name'] ?? '', 840▕ 'BatchType' => 'SO', 841▕ 'TransLedger' => 'S', 842▕ ]; 1 app\Services\Sync\Retailer\AmazonSyncService.php:838 2 app\Services\Sync\Retailer\AmazonSyncService.php:826 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\FieldfolioSyncServiceTest > pull orders fetches and sync… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\FieldfolioSyncService.php:2662 2658▕ 'AccountRef' => $customer['esuite_customer_id'] ?? '', 2659▕ // 'TransDate' => $this->parseOrderDate($order['created_at'] ?? null)->timezone('Australia/Sydney')->format('Y/m/d H:i:s'), 2660▕ 'TransComment' => $transComment ?: '[Order Sync - Fieldfolio]', 2661▕ 'TransIncGST' => false, ➜ 2662▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 2663▕ 'TransYourRef' => 'FF-' . ($order['name'] ?? ''), 2664▕ 'BatchType' => 'SO', 2665▕ 'TransLedger' => 'S', 2666▕ ]; 1 app\Services\Sync\Retailer\FieldfolioSyncService.php:2662 2 app\Services\Sync\Retailer\FieldfolioSyncService.php:2650 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\FreedomSyncServiceTest > pull orders fetches and syncs n… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\FreedomSyncService.php:594 590▕ 'AccountRef' => $accountRef, 591▕ // 'TransDate' => $this->parseOrderDate($order['created_at'] ?? null)->timezone('Australia/Sydney')->format('Y/m/d H:i:s'), 592▕ 'TransComment' => $transComment, 593▕ 'TransIncGST' => false, ➜ 594▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 595▕ 'TransYourRef' => $order['name'] ?? '', 596▕ 'BatchType' => 'SO', 597▕ 'TransLedger' => 'S', 598▕ ]; 1 app\Services\Sync\Retailer\FreedomSyncService.php:594 2 app\Services\Sync\Retailer\FreedomSyncService.php:581 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\FreedomSyncServiceTest > pull orders updates existing or… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\FreedomSyncService.php:594 590▕ 'AccountRef' => $accountRef, 591▕ // 'TransDate' => $this->parseOrderDate($order['created_at'] ?? null)->timezone('Australia/Sydney')->format('Y/m/d H:i:s'), 592▕ 'TransComment' => $transComment, 593▕ 'TransIncGST' => false, ➜ 594▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 595▕ 'TransYourRef' => $order['name'] ?? '', 596▕ 'BatchType' => 'SO', 597▕ 'TransLedger' => 'S', 598▕ ]; 1 app\Services\Sync\Retailer\FreedomSyncService.php:594 2 app\Services\Sync\Retailer\FreedomSyncService.php:581 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\KitchenWarehouseSyncServiceTest > pull orders fetches an… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\KitchenWarehouseSyncService.php:312 308▕ // 'TransDate' => $this->parseOrderDate($order['created_at'] ?? null)->timezone('Australia/Sydney')->format('Y/m/d H:i:s'), 309▕ 'AccountRef' => $accountRef, 310▕ 'TransComment' => $transComment, 311▕ 'TransIncGST' => false, ➜ 312▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 313▕ 'TransYourRef' => $order['name'] ?? '', 314▕ 'BatchType' => 'SO', 315▕ 'TransLedger' => 'S', 316▕ ]; 1 app\Services\Sync\Retailer\KitchenWarehouseSyncService.php:312 2 app\Services\Sync\Retailer\KitchenWarehouseSyncService.php:577 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\LivingStylesSyncServiceTest > pull orders downloads and… BadMethodCallException Received Mockery_8_Illuminate_Log_LogManager::error(), but no expectations were specified at vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:355 351▕ if (! $instance) { 352▕ throw new RuntimeException('A facade root has not been set.'); 353▕ } 354▕ ➜ 355▕ return $instance->$method(...$args); 356▕ } 357▕ } 358▕ 1 vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:355 2 app\Services\Sync\Retailer\LivingStylesSyncService.php:300 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\LivingStylesSyncServiceTest > pull orders moves processe… BadMethodCallException Received Mockery_8_Illuminate_Log_LogManager::error(), but no expectations were specified at vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:355 351▕ if (! $instance) { 352▕ throw new RuntimeException('A facade root has not been set.'); 353▕ } 354▕ ➜ 355▕ return $instance->$method(...$args); 356▕ } 357▕ } 358▕ 1 vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:355 2 app\Services\Sync\Retailer\LivingStylesSyncService.php:300 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\LivingStylesSyncServiceTest > sync order creates order a… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\LivingStylesSyncService.php:603 599▕ $payload = [ 600▕ 'AccountRef' => $accountRef, 601▕ 'TransComment' => $transComment, 602▕ 'TransIncGST' => false, ➜ 603▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 604▕ 'TransYourRef' => $order['name'] ?? '', 605▕ 'BatchType' => 'SO', 606▕ 'TransLedger' => 'S', 607▕ ]; 1 app\Services\Sync\Retailer\LivingStylesSyncService.php:603 2 app\Services\Sync\Retailer\LivingStylesSyncService.php:591 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\LivingStylesSyncServiceTest > sync order handles esuite… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\LivingStylesSyncService.php:603 599▕ $payload = [ 600▕ 'AccountRef' => $accountRef, 601▕ 'TransComment' => $transComment, 602▕ 'TransIncGST' => false, ➜ 603▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 604▕ 'TransYourRef' => $order['name'] ?? '', 605▕ 'BatchType' => 'SO', 606▕ 'TransLedger' => 'S', 607▕ ]; 1 app\Services\Sync\Retailer\LivingStylesSyncService.php:603 2 app\Services\Sync\Retailer\LivingStylesSyncService.php:591 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\LivingStylesSyncServiceTest > pull orders groups multipl… BadMethodCallException Received Mockery_8_Illuminate_Log_LogManager::error(), but no expectations were specified at vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:355 351▕ if (! $instance) { 352▕ throw new RuntimeException('A facade root has not been set.'); 353▕ } 354▕ ➜ 355▕ return $instance->$method(...$args); 356▕ } 357▕ } 358▕ 1 vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:355 2 app\Services\Sync\Retailer\LivingStylesSyncService.php:300 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Unit\Services\Sync\TempleWebsterSyncServiceTest > pull orders syncs new ord… BadMethodCallException Received Mockery_7_App_Services_Esuite_EsuiteApiService::getCompanyNo(), but no expectations were specified at app\Services\Sync\Retailer\TempleWebsterSyncService.php:238 234▕ $payload = [ 235▕ 'AccountRef' => $accountRef, 236▕ 'TransComment' => $transComment, 237▕ 'TransIncGST' => false, ➜ 238▕ 'CompanyNo' => $this->esuiteApiService->getCompanyNo(), 239▕ 'TransYourRef' => $order['name'] ?? '', 240▕ 'BatchType' => 'SO', 241▕ 'TransLedger' => 'S', 242▕ ]; 1 app\Services\Sync\Retailer\TempleWebsterSyncService.php:238 2 app\Services\Sync\Retailer\TempleWebsterSyncService.php:227 Tests: 14 failed, 1 risky, 12 skipped, 599 passed (1363 assertions) Duration: 133.25s