freshyo/apps/admin-ui/JEST-TEST-CASES.md
2026-11-15 23:53:14 +05:30

66 KiB

admin-ui — Jest page-by-page test case catalogue

This is the replacement checklist for the deleted apps/admin-ui/tests suite. It is written page-first: every route under app/ gets a test file, and every page gets cases for loading, error, empty, populated, auth, refresh, navigation, API payloads, validation and data edge cases.

  • Runner: jest-expo + @testing-library/react-native
  • Network: mock at the tRPC layer; keep components, hooks, stores and router behavior real
  • One row = one it() unless the row says “table test”
  • Suggested layout: apps/admin-ui/tests/pages/<page>.test.tsx
  • State: reset Zustand stores, React Query cache and StorageService in beforeEach
  • Auth: wrap pages in the real StaffAuthProvider or a deterministic auth mock; always test the loading, signed-out and signed-in branches for route-level pages

1. Shared fixtures

Use these fixture names in the cases below.

Fixture Value
STAFF {id: 3, name: 'Admin One', regionId: 1, regionName: 'Mahabubnagar'}
STAFF_NO_REGION {id: 4, name: 'Unassigned', regionId: 0}
REGION {id:1,name:'Mahabubnagar',description:'...',effectiveBoundId:7}
BOUNDS [B1 priority 1 id 7, B2 priority 10 id 8]
BOUND_SETTINGS {freeDeliveryThreshold:'249',deliveryCharge:'15',flashFreeDeliveryThreshold:'199',flashDeliveryCharge:'25',isFlashDeliveryEnabled:'true'}
REGION_CONSTANTS {popularItems:'[2,5]',allItemsOrder:'[2,5,7]',supportMobile:'8688182552',supportEmail:'support@freshyo.in',welcomeMessage:'Welcome',tagsOrder:'[1,2]'}
P_CHICKEN product id 2, SKU ids 11 and 12, store 1, quantity feature 500g, price 215
P_CUCUMBER product id 5, SKU id 13, store 1, price 15
P_GLOBAL product id 9, isGlobal:true, SKU 91, store 1
P_OUT product id 6, SKU 61, isOutOfStock:true
P_NO_IMAGE product id 7, SKU 71, no images
STORE_1 {id:1,name:'The Freshyo Meat House',description:'...',isGlobal:false,productCount:12}
STORE_GLOBAL {id:2,name:'Freshyo Central',isGlobal:true}
SLOT_1 {id:1849,deliveryTime:future+2h,freezeTime:future+1h,isActive:true,products:[P_CHICKEN,P_CUCUMBER]}
SLOT_FULL same but isCapacityFull:true
ORDER_1 id 11, readableId 101, user 5, status pending, 2 items, total 430, delivery 15
ORDER_FLASH id 12, flash, status pending
ORDER_DELIVERED id 13, delivered
ORDER_CANCELLED id 14, cancelled with reason
USER_1 {id:5,mobile:'9876543210',name:'Test User',totalOrders:3,isSuspended:false}
USER_SUSPENDED same with isSuspended:true
COUPON_1 {id:21,couponCode:'SAVE10',discountPercent:'10',isApplyForAll:true,isInvalidated:false}
COUPON_GLOBAL {id:22,couponCode:'GLOBAL10',regionId:null}
COUPON_EXPIRED {id:23,couponCode:'OLD',validTill:yesterday}
TAG_1 {id:1,tagName:'Chicken',tagDescription:'...',isDashboardTag:true,productIds:[2]}
TAG_2 {id:2,tagName:'Veg',productIds:[5]}
GROUP_1 {id:1,groupName:'Breakfast',description:'...',products:[{id:2},{id:5}]}
BANNER_1 {id:1,name:'Dash Banner',imageUrl:'https://...',skuIds:[11],isActive:true}

Global reset rules

  1. Clear React Query (queryClient.clear()), all Jest mocks and fake timers.
  2. Reset useAppStore/any admin Zustand state, useNavigationTarget, staff-auth mocks.
  3. Clear StorageService keys used by useJWT: jwt, staff.
  4. Mock expo-router for navigation but keep useLocalSearchParams controllable per test.
  5. Every mutation case asserts the procedure name and exact input (expectProcedureCalled, lastProcedureInput).
  6. Every page that uses useManualRefresh/useMarkDataFetchers has a refresh case.
  7. For large lists, test page 1, page 2, empty, error and duplicate-page protection.

2. Page → test file map

Page Test file Main mocks
app/_layout.tsx tests/app/root-layout.test.tsx auth, notifications, toast
app/index.tsx tests/app/index.test.tsx auth
app/login.tsx tests/pages/login.test.tsx admin.staffUser.login
app/(drawer)/_layout.tsx tests/app/drawer-layout.test.tsx auth, staffUser.me, refresh event
dashboard/index.tsx tests/pages/dashboard.test.tsx admin.user.getEssentials, navigation targets
dashboard/products/index.tsx tests/pages/products.test.tsx admin.product.getProducts
dashboard/products/add.tsx tests/pages/product-add.test.tsx stores, SKUs, createProduct, upload
dashboard/products/edit.tsx tests/pages/product-edit.test.tsx getProductById, updateProduct, global form
dashboard/products/detail/[id].tsx tests/pages/product-detail.test.tsx getProductById, reviews, respondToReview
dashboard/prices-overview/index.tsx tests/pages/prices-overview.test.tsx products, stores, updateProductPrices
dashboard/rebalance-orders/index.tsx tests/pages/rebalance-orders.test.tsx admin.slots.getAll, rebalanceSlots
dashboard/stores/index.tsx tests/pages/stores.test.tsx getStores, deleteStore
dashboard/stores/add.tsx tests/pages/store-add.test.tsx createStore, upload
dashboard/stores/edit.tsx tests/pages/store-edit.test.tsx getStoreById, updateStore, upload
dashboard/slots/index.tsx tests/pages/slots.test.tsx getAll, updateSlotCapacity
dashboard/slots/add.tsx tests/pages/slot-add.test.tsx getSlotById (replicate), createSlot
dashboard/slots/edit/[id].tsx tests/pages/slot-edit.test.tsx getSlotById, updateSlot
dashboard/slots/slot-details.tsx tests/pages/slot-details.test.tsx getSlotById, share link
dashboard/coupons/index.tsx tests/pages/coupons.test.tsx getAll, getReservedCoupons, delete
dashboard/coupons/create.tsx tests/pages/coupon-create.test.tsx create, createReservedCoupon
dashboard/coupons/detail/[id].tsx tests/pages/coupon-detail.test.tsx getById
dashboard/coupons/edit/[id].tsx tests/pages/coupon-edit.test.tsx getById, update
dashboard/dashboard-banners/index.tsx tests/pages/banners.test.tsx getBanners, update, delete
dashboard/dashboard-banners/create.tsx tests/pages/banner-create.test.tsx createBanner, upload
dashboard/dashboard-banners/edit/[id].tsx tests/pages/banner-edit.test.tsx getBanner, updateBanner
dashboard/product-tags/index.tsx tests/pages/product-tags.test.tsx getProductTags
dashboard/product-tags/add.tsx tests/pages/product-tag-add.test.tsx createProductTag
dashboard/product-tags/edit/index.tsx tests/pages/product-tag-edit.test.tsx getProductTagById, updateProductTag
dashboard/product-tags/order.tsx tests/pages/product-tag-order.test.tsx getRegionConstants, updateRegionConstants
dashboard/product-groupings/index.tsx tests/pages/product-groupings.test.tsx getGroups, deleteGroup
dashboard/product-groupings/create.tsx tests/pages/product-grouping-create.test.tsx createGroup
dashboard/product-groupings/edit/[id].tsx tests/pages/product-grouping-edit.test.tsx getGroups, updateGroup
dashboard/manage-orders/index.tsx tests/pages/manage-orders-hub.test.tsx slots, navigation target
dashboard/manage-orders/orders/index.tsx tests/pages/orders.test.tsx getAll, updatePackaged/Delivered/ItemPackaging, notes
dashboard/manage-orders/order-details/[id].tsx tests/pages/order-details.test.tsx getOrderDetails, removeDeliveryCharge, cancel
dashboard/manage-orders/delivery-sequences/index.tsx tests/pages/delivery-sequences.test.tsx slots, getSlotOrders, update sequences/status/coords
dashboard/complaints/index.tsx tests/pages/complaints.test.tsx getAll, resolve
dashboard/send-notifications/index.tsx tests/pages/send-notifications.test.tsx getUsersForNotification, sendNotification
dashboard/user-management/index.tsx tests/pages/user-management.test.tsx getAllUsers
dashboard/user-management/[id].tsx tests/pages/user-detail.test.tsx getUserDetails, suspension, incidents
dashboard/customize-app/index.tsx tests/pages/customize-app.test.tsx bounds/settings/region constants
dashboard/customize-app/popular-items.tsx tests/pages/popular-items.test.tsx region constants, products summary
dashboard/customize-app/all-items-order.tsx tests/pages/all-items-order.test.tsx region constants, products summary
shared components tests/components/*.test.tsx page fixtures

3. App shell, login and drawer

3.1 Root layout

ID Type Case Assert
AROOT-01 happy render root app-root, QueryClient/trpc/StaffAuth/Notification providers
AROOT-02 edge children render Stack + RefreshProvider
AROOT-03 edge notification provider mount NotifChecker and Toast mounted
AROOT-04 edge __DEV__ LogBox warnings ignored
AROOT-05 edge unmount notification listeners cleaned up
AROOT-06 happy tap that launched the app getLastNotificationResponseAsync → order details; response cleared
AROOT-07 edge launch response + live delivery deduped by notification id; opens once
AROOT-08 edge launch tap while signed out no navigation; target href pending for login
AROOT-09 happy complaint push opens the complaints list

3.2 Login

ID Type Case Assert
ALOGIN-01 happy render “Admin Login”; name/password fields; Login button
ALOGIN-02 error both fields empty alert “Please enter both name and password”; no API
ALOGIN-03 error name whitespace only same alert
ALOGIN-04 error password whitespace only same alert
ALOGIN-05 happy valid submit admin.staffUser.login({name,password}); trims name
ALOGIN-06 edge password not trimmed exact password sent
ALOGIN-07 happy success saves JWT + staff; replaces dashboard
ALOGIN-08 error invalid credentials context loginError shown; stays on page
ALOGIN-09 error server error with no message “Login failed”
ALOGIN-10 edge pending button “Logging in...”; disabled
ALOGIN-11 edge loginError cleared on new attempt error disappears
ALOGIN-12 edge secure entry password masked
ALOGIN-13 edge successful login while already signed in replaces dashboard, no duplicate provider
ALOGIN-14 edge storage save failure login state/alert? assert current
ALOGIN-15 edge pending order notification replaces order details, not dashboard

3.3 Index and drawer

ID Type Case Assert
AINDEX-01 edge auth loading spinner
AINDEX-02 happy logged in redirect /(drawer)/dashboard
AINDEX-03 edge logged out redirect /login
ADRAW-01 edge drawer auth loading blue spinner
ADRAW-02 edge logged out redirect /login
ADRAW-03 happy staff header from me name + regionName
ADRAW-04 edge me unavailable falls back to stored staff
ADRAW-05 edge regionId 0 “No region”
ADRAW-06 edge regionId non-zero, no name Region #<id>
ADRAW-07 happy Dashboard item dismissTo('/(drawer)/dashboard')
ADRAW-08 happy Products and Prices correct routes
ADRAW-09 happy Groupings/Banners/Slots correct routes
ADRAW-10 happy Complaints/Manage Orders/Coupons correct routes
ADRAW-11 happy Stores/Users/Notifications correct routes
ADRAW-12 happy Logout deletes JWT/staff, clears query cache, replaces login
ADRAW-13 edge force logout event logout runs
ADRAW-14 edge header back on nested route router.back()
ADRAW-15 edge header menu on dashboard openDrawer()
ADRAW-16 edge header title mapping each child screen title
ADRAW-17 edge refresh header button emits REFRESH_EVENT
ADRAW-18 edge unknown nested route title “Dashboard”
ADRAW-19 edge drawer swipe disabled swipeEnabled:false

3.4 Dashboard hub

ID Type Case Assert
ADASH-01 happy render “Quick Actions”; all categories/menu items
ADASH-02 edge essentials query unresolved complaint badge/count
ADASH-03 edge zero unresolved no badge
ADASH-04 happy Manage Orders sets navigation target; push manage-orders
ADASH-05 happy Delivery Sequences sets target; push manage-orders
ADASH-06 happy Delivery Slots push slots
ADASH-07 happy Add Product push products/add
ADASH-08 happy Complaints push complaints
ADASH-09 happy Products/Prices/Tags/Groupings correct routes
ADASH-10 happy Stores/Coupons/App Constants correct routes
ADASH-11 happy User Management/Send Notifications correct routes
ADASH-12 edge category with no items omitted
ADASH-13 edge long descriptions truncation/no crash
ADASH-14 edge essentials error menu still renders, no badge
ADASH-15 edge testID/accessibility quick/menu items expose labels

4. Products

4.1 Product list

ID Type Case Assert
APLIST-01 happy loading “Loading products...”
APLIST-02 error query fails “Error loading products”; Retry refetches
APLIST-03 edge empty “No products found”; “Start by adding your first product”
APLIST-04 happy populated name, short description, variant count, image
APLIST-05 edge no image placeholder icon
APLIST-06 edge global product “GLOBAL” badge
APLIST-07 edge all SKUs in stock green “In”
APLIST-08 edge all SKUs out red “Out”; “N Variants · N out”
APLIST-09 edge mixed stock amber “Partial”
APLIST-10 edge zero SKUs treated as in stock; “0 Variants”
APLIST-11 happy search name filtered
APLIST-12 edge search shortDescription filtered
APLIST-13 edge search case-insensitive filtered
APLIST-14 edge search no match “No products match your filters”; Clear Filters
APLIST-15 happy filter In Stock only all-in
APLIST-16 happy filter Out of Stock partial + out
APLIST-17 happy filter Global only global
APLIST-18 edge filter counts counts match products
APLIST-19 edge Clear Filters search cleared, filter all
APLIST-20 happy View product detail route
APLIST-21 happy Edit edit route with id
APLIST-22 happy Stock opens VariantStockDialog for product
APLIST-23 happy Add Product add route
APLIST-24 edge pull refresh getProducts refetch
APLIST-25 edge mark data fetchers refetch
APLIST-26 edge 100+ products list virtualization/no crash

4.2 Variant stock dialog

ID Type Case Assert
AVSTOCK-01 happy open product name, all variants selected
AVSTOCK-02 edge partial state amber “N of M variants out”
AVSTOCK-03 edge select/deselect variant count updates
AVSTOCK-04 edge Select all/Clear all toggles all
AVSTOCK-05 edge no selection both apply buttons disabled
AVSTOCK-06 happy Mark out toggleOutOfStock({id,skuIds,isOutOfStock:true})
AVSTOCK-07 happy Mark in false
AVSTOCK-08 edge success toast; onApplied; close
AVSTOCK-09 error mutation fails error toast; dialog stays
AVSTOCK-10 edge pending buttons loading/disabled
AVSTOCK-11 edge cancel close only
AVSTOCK-12 edge product changes while open selection resets to new SKUs

4.3 Add product page

ID Type Case Assert
APADD-01 happy render create form empty name; one variant with quantity feature
APADD-02 error price missing/0 alert “Please enter a valid price for every variant”
APADD-03 error duplicate variant signatures alert “Two variants have the same attributes”
APADD-04 error missing quantity feature alert “Every SKU must have a quantity feature”
APADD-05 happy submit no images create payload skus/images []
APADD-06 happy upload images upload all blobs; keys mapped per variant
APADD-07 edge image mapping across variants cursor maps counts correctly
APADD-08 edge feature names trimmed/lowercased payload normalized
APADD-09 edge market/flash price strings numeric payload
APADD-10 edge create pending “Creating...”; disabled
APADD-11 happy success refetch products; alert “Product created successfully!”
APADD-12 error API failure alert with message/fallback
APADD-13 edge upload failure alert error; no create
APADD-14 edge no store selected form default first store
APADD-15 edge combo product + items payload comboItems
APADD-16 edge create with only global store allowed/labeled global
APADD-17 edge empty image list no upload call
APADD-18 edge 2 variants same feature but different values allowed
APADD-19 edge same feature values different order duplicate signature detected

4.4 Edit product page

ID Type Case Assert
APEDIT-01 edge missing/invalid id query disabled; “Product not found”
APEDIT-02 happy loading “Loading product...”
APEDIT-03 happy regular product ProductForm prefilled
APEDIT-04 happy global product GlobalProductForm; structure read-only
APEDIT-05 edge global isSuspended maps to isSuspendedInRegion correct initial toggle
APEDIT-06 happy save regular updateProduct payload with existing+new images
APEDIT-07 edge deleted existing images deletedImageKeys includes removed keys
APEDIT-08 edge new images upload; newImageUrls; keys
APEDIT-09 edge no changes still submits (current)
APEDIT-10 error update fails alert; stays
APEDIT-11 edge update pending “Saving...”; disabled
APEDIT-12 happy success refetch product/list; “Product updated successfully!”; clear images
APEDIT-13 happy global save updateProduct with market fields; “Market data updated for your region”
APEDIT-14 edge global storeId 0 payload storeId 0 (current)
APEDIT-15 edge global price empty to 0 (current)
APEDIT-16 edge global flash toggle off flashPrice null
APEDIT-17 edge global suspend isSuspendedInRegion true
APEDIT-18 error global save fails alert
APEDIT-19 edge refresh getProductById refetch
APEDIT-20 edge image keys conversion bucket-relative, query removed
APEDIT-21 edge regional suspend toggle reads/sends isSuspendedInRegion; isSuspended untouched
APEDIT-22 edge legacy structural suspension shown as the regional toggle; sent as isSuspendedInRegion

4.5 Product detail page

ID Type Case Assert
APDET-01 happy loading spinner + “Loading...”
APDET-02 error unknown product “Product Not Found”; Go Back
APDET-03 happy product hero image/carousel, name, variant count
APDET-04 edge no image gray hero
APDET-05 edge rating average calculated to 1 decimal
APDET-06 edge no reviews rating “-”; 0 reviews
APDET-07 edge description short + long; fallback text
APDET-08 edge variants features, price, market, flash, stock
APDET-09 edge deals quantity/price/validTill
APDET-10 edge reviews list user, stars, body, images
APDET-11 edge admin response response block and images
APDET-12 edge no admin response Reply button
APDET-13 happy Reply dialog with quoted review
APDET-14 happy submit response upload images, respondToReview payload, invalidate reviews, alert, close
APDET-15 edge empty response allowed current; API/schema behavior
APDET-16 edge response pending spinner/disabled
APDET-17 error response fails alert; dialog stays
APDET-18 happy Edit edit route
APDET-19 happy back router.back
APDET-20 edge mark data fetchers getProductById refetch
APDET-21 edge review image upload failure alert; no response
APDET-22 edge many variants/reviews scroll/no crash

4.6 ProductForm shared

ID Type Case Assert
APFORM-01 happy default variant quantity feature auto-added
APFORM-02 edge initial variant without quantity quantity prepended
APFORM-03 edge existing quantity case variants normalized to lowercase
APFORM-04 edge add/remove variant images array stays aligned
APFORM-05 edge remove last variant allowed? assert validation
APFORM-06 edge existing SKU remove marks isDeleted, not removed
APFORM-07 edge restore deleted SKU unmarks
APFORM-08 edge add/remove feature quantity cannot be removed unless duplicate
APFORM-09 edge duplicate quantity features validation error
APFORM-10 edge price validation positive number
APFORM-11 edge market/flash negative validation error
APFORM-12 edge flash toggle off flash price cleared
APFORM-13 edge combo type combo items section
APFORM-14 edge combo duplicate SKU alert, not set
APFORM-15 edge combo item removal removed
APFORM-16 edge store options regional + global labeled
APFORM-17 edge store default regional preferred
APFORM-18 edge product type combo with combo items hides combo-only current
APFORM-19 edge submit invalid alert first error message
APFORM-20 edge submit valid onSubmit normalized values/images/deletedKeys
APFORM-21 edge image uploader testID add/remove per variant
APFORM-22 edge many features no crash

4.7 GlobalProductForm

ID Type Case Assert
AGP-01 happy render “Global product”; read-only details
AGP-02 edge multiple SKUs one card per SKU
AGP-03 edge price/market/flash inputs prefilled
AGP-04 edge flash toggle on flash price input
AGP-05 edge stock/offer/suspend toggles payload flags
AGP-06 edge empty price 0
AGP-07 edge invalid number undefined/0
AGP-08 happy save calls onSubmit payload with IDs preserved
AGP-09 edge loading button loading

5. Prices overview and rebalance

5.1 Prices overview

ID Type Case Assert
APRICE-01 happy loading products/stores “Loading...” spinner
APRICE-02 happy populated flattened SKUs, product name, unit, prices
APRICE-03 edge product with no SKUs omitted
APRICE-04 edge no image placeholder URI
APRICE-05 edge no market/flash price “N/A”
APRICE-06 edge long product name truncated 20 chars
APRICE-07 happy default store filter all stores selected
APRICE-08 edge deselect store SKUs from other stores shown/none
APRICE-09 edge store filter no matches empty list
APRICE-10 happy edit dialog prefilled price/market/flash
APRICE-11 error price empty/0/negative alert “Please enter a valid price”
APRICE-12 error invalid market price alert
APRICE-13 error invalid flash price alert
APRICE-14 edge market/flash empty null pending value
APRICE-15 edge unchanged values pending change object still created? assert
APRICE-16 edge pending change dot green check
APRICE-17 edge change count “Save (N)”
APRICE-18 edge no changes Save disabled
APRICE-19 happy save updateProductPrices({updates:[{skuId,...}]})
APRICE-20 edge multiple SKUs one update per SKU
APRICE-21 edge flash checkbox only isFlashAvailable update
APRICE-22 edge update pending Save spinner/disabled
APRICE-23 happy success pending cleared; refetch; alert
APRICE-24 error mutation fails alert with message
APRICE-25 edge close edit dialog temporary fields reset
APRICE-26 happy menu → Rebalance route rebalance
APRICE-27 edge field changes across multiple dialogs pending map preserved
APRICE-28 edge store filter switch with pending changes pending changes preserved
APRICE-29 edge SKU id preserved skuId not productId (regression)
APRICE-30 edge update with marketPrice null payload null

5.2 Rebalance orders

ID Type Case Assert
AREB-01 happy loading “Loading slots...”
AREB-02 edge no upcoming slots empty copy
AREB-03 edge past slots filtered out
AREB-04 happy upcoming slots slot id, delivery/freeze, active status
AREB-05 edge >2 products “+N more” opens dialog
AREB-06 happy select/deselect slot selection toggles
AREB-07 edge no selection rebalance button disabled/opacity
AREB-08 happy rebalance alert “Rebalancing...” then rebalanceSlots({slotIds})
AREB-09 edge success refetch slots; “Rebalance Complete”
AREB-10 error mutation fails onSettled still alerts (current)
AREB-11 edge products dialog all product names
AREB-12 edge pull refresh refetch slots
AREB-13 edge multiple selected slots payload all ids

6. Stores

6.1 Store list

ID Type Case Assert
ASTOREUI-01 happy loading “Loading stores...”
ASTOREUI-02 error fail “Oops!”; retry
ASTOREUI-03 edge empty “No stores found”; add action
ASTOREUI-04 happy populated name, id, product count/image
ASTOREUI-05 edge global store no edit action, badge/current
ASTOREUI-06 edge edit mode toggle delete/edit actions show/hide
ASTOREUI-07 happy edit edit route with id
ASTOREUI-08 edge global store edit disabled
ASTOREUI-09 happy delete confirm; Cancel no API
ASTOREUI-10 happy confirm delete deleteStore({storeId}); success refetch
ASTOREUI-11 error delete fails alert
ASTOREUI-12 edge deleting pending/disabled
ASTOREUI-13 happy add store add route
ASTOREUI-14 edge mark data fetchers refetch
ASTOREUI-15 edge image missing fallback/no crash
ASTOREUI-16 edge long store name truncation

6.2 Add/edit store

ID Type Case Assert
ASTOREADD-01 happy render “Add New Store”; form
ASTOREADD-02 happy create createStore payload; success alert/route list
ASTOREADD-03 error API fail alert error
ASTOREADD-04 edge upload image uploadSingle; presigned URL submitted
ASTOREADD-05 error upload fail alert “Failed to upload image”; no create
ASTOREADD-06 edge upload pending “Uploading...”; disabled
ASTOREADD-07 edge no image no upload, create without image
ASTOREEDIT-01 happy loading “Loading store...”
ASTOREEDIT-02 error unknown “Store not found”
ASTOREEDIT-03 happy prefill name/description/products/store image
ASTOREEDIT-04 happy update updateStore payload
ASTOREEDIT-05 edge remove existing image imageUrl undefined
ASTOREEDIT-06 edge replace image upload and send new URL
ASTOREEDIT-07 edge product selection preselect SKUs belonging to store
ASTOREEDIT-08 edge global store edit disabled/no route
ASTOREEDIT-09 error update fails alert
ASTOREEDIT-10 edge success alert; route list
ASTOREEDIT-11 edge storeId filter disables other-store SKUs current
ASTOREEDIT-12 edge product selection value uses SKU ids payload

6.3 StoreForm shared

ID Type Case Assert
ASTOREF-01 happy render name/description/products/image
ASTOREF-02 error name empty validation error
ASTOREF-03 edge description empty allowed
ASTOREF-04 edge products optional empty selection allowed
ASTOREF-05 edge image picker single replaces existing
ASTOREF-06 edge remove image no imageUrl
ASTOREF-07 edge submit with invalid name current code calls submit directly, bypassing validation (gap)
ASTOREF-08 edge onSubmit callback values + imageUrl
ASTOREF-09 edge create vs edit labels Creating/Updating/Create/Update
ASTOREF-10 edge upload error alert and no onSubmit
ASTOREF-11 edge isUploading “Uploading...”

7. Slots

7.1 Slot list

ID Type Case Assert
ASLOTUI-01 happy loading “Loading slots...”
ASLOTUI-02 edge empty empty state
ASLOTUI-03 happy populated id, delivery/freeze, status, products
ASLOTUI-04 edge inactive red “Inactive”
ASLOTUI-05 edge full capacity “FULL” badge
ASLOTUI-06 edge >2 products “+N more” opens dialog
ASLOTUI-07 happy tap card slot details route
ASLOTUI-08 happy Edit edit route
ASLOTUI-09 happy menu actions dialog
ASLOTUI-10 happy Mark full confirm; updateSlotCapacity
ASLOTUI-11 happy Mark not full confirm false
ASLOTUI-12 error capacity fails alert
ASLOTUI-13 happy Replicate add route with baseslot
ASLOTUI-14 happy Add Slot FAB add route
ASLOTUI-15 edge products dialog all product names
ASLOTUI-16 edge no products no product row

7.2 Slot add/edit/details

ID Type Case Assert
ASLOTADD-01 happy add with no base blank SlotForm
ASLOTADD-02 edge base slot loading spinner
ASLOTADD-03 edge base slot found replicated times/products
ASLOTADD-04 edge base slot missing blank/invalid state
ASLOTADD-05 happy create mutation; back
ASLOTADD-06 error create fails alert/SlotForm error
ASLOTEDIT-01 happy loading spinner
ASLOTEDIT-02 edge missing id “Slot not found”
ASLOTEDIT-03 happy prefill delivery/freeze/active/products/groups
ASLOTEDIT-04 happy update mutation; back
ASLOTEDIT-05 error update fails alert
ASLOTDET-01 happy loading “Loading slot details...”
ASLOTDET-02 error fail “Error loading slot details”
ASLOTDET-05 edge products names/count; empty copy
ASLOTDET-06 happy Edit FAB edit route

7.3 SlotForm

ID Type Case Assert
ASLOTF-01 happy create fields delivery/freeze/active
ASLOTF-02 error missing delivery/freeze validation/API error
ASLOTF-03 edge invalid date order current behavior
ASLOTF-04 happy select products SKU ids payload
ASLOTF-08 edge group selection group ids
ASLOTF-09 edge create/update labels current
ASLOTF-10 edge submit pending loading/disabled

8. Coupons

8.1 Coupon list (General / Reserved)

ID Type Case Assert
ACOUPUI-01 happy tabs General/Reserved
ACOUPUI-02 happy General loading “Loading Coupons...”
ACOUPUI-03 error General fail “Failed to load coupons”; retry
ACOUPUI-04 edge empty General “No Coupons Found”
ACOUPUI-05 edge empty with search Clear Search resets
ACOUPUI-06 happy coupon card code/id/status/discount/min/max/validity/target/products
ACOUPUI-07 edge active green Active
ACOUPUI-08 edge expired yellow Expired
ACOUPUI-09 edge invalidated red Inactive
ACOUPUI-10 edge global coupon “Global”; no edit/delete; explanatory box
ACOUPUI-11 edge applicable users N Users vs All Users
ACOUPUI-12 edge skuIds empty no Products line
ACOUPUI-13 happy Edit edit route
ACOUPUI-13B happy View details detail route
ACOUPUI-14 happy Delete confirm; Cancel no API
ACOUPUI-15 happy confirm delete mutation; success; refetch
ACOUPUI-16 error delete fails alert
ACOUPUI-17 edge status filter multi-select filters active/expired/inactive
ACOUPUI-18 edge search query API search called
ACOUPUI-19 edge pagination fetchNextPage; no duplicate
ACOUPUI-20 edge refresh refetch
ACOUPUI-21 happy Add FAB create route
ACOUPUI-22 reserved loading “Loading Reserved Coupons...”
ACOUPUI-23 reserved error retry
ACOUPUI-24 reserved empty “No Reserved Coupons Found”
ACOUPUI-25 reserved card secretCode/couponCode/status/discount/validity
ACOUPUI-26 reserved active/expired/redeemed correct status
ACOUPUI-27 reserved redeemed by user name/mobile/redeemedAt
ACOUPUI-28 reserved creator creator name
ACOUPUI-29 reserved status filter active/expired/redeemed
ACOUPUI-30 reserved pagination/search/refresh works

8.2 Coupon detail

ID Type Case Assert
ACOUPD-01 happy loading “Loading coupon...”
ACOUPD-02 error missing coupon “Coupon not found”; Go Back
ACOUPD-03 happy core fields code/status/discount/min/max/validity/audience/products/creator/region
ACOUPD-04 edge flat discount flat amount, min order, uses/user, formatted validity
ACOUPD-05 edge expired “Expired”
ACOUPD-06 edge invalidated “Inactive”
ACOUPD-07 edge global coupon “Global”; “All regions”; no Edit
ACOUPD-08 edge user-based audience “N users” + user name/mobile rows
ACOUPD-09 edge targeted products “N selected”
ACOUPD-10 happy Edit edit route
ACOUPD-11 happy Back router.back

8.3 Coupon create/edit

ID Type Case Assert
ACOUPC-01 happy create render form + “Create Coupon”
ACOUPC-02 error no codes alert “At least one coupon code is required”
ACOUPC-03 edge blank code filtered no payload
ACOUPC-04 happy multiple codes one mutation payload couponCodes
ACOUPC-05 happy normal coupon create
ACOUPC-06 happy reserved toggle createReservedCoupon
ACOUPC-07 edge flat discount maxValue copied to flatDiscount
ACOUPC-08 edge targetUsers array targetUser first id; targetUsers removed
ACOUPC-09 edge create pending loading
ACOUPC-10 happy success invalidates both lists; alert; back on OK
ACOUPC-11 error mutation fails alert message/fallback
ACOUPC-12 edge create reserved target fields disabled current
ACOUPE-01 happy edit loading “Loading...”
ACOUPE-02 error missing coupon “Coupon not found”
ACOUPE-03 happy prefill code/discount/users/validity/skuIds
ACOUPE-04 happy update update({id,updates}); refetch; invalidate; alert
ACOUPE-05 error update fails alert
ACOUPE-06 edge flat maxValue copy payload
ACOUPE-07 edge targetUsers transform payload
ACOUPE-08 edge update pending loading
ACOUPE-09 edge back on OK router.back
ACOUPE-10 edge global coupon edit route should not be reachable; assert guard if direct

8.4 CouponForm shared

ID Type Case Assert
ACOUPF-01 happy default values one blank code, no discount, all users
ACOUPF-02 error code <3/>50/invalid chars validation
ACOUPF-03 edge lowercase typed uppercase
ACOUPF-04 edge add/remove code blank fallback remains
ACOUPF-05 error both discounts validation
ACOUPF-06 error no discount validation
ACOUPF-07 error percent >100 validation
ACOUPF-08 edge percent/flat toggle clears other only one set
ACOUPF-09 edge maxValue only for percent hidden for flat
ACOUPF-10 edge minOrder/maxLimit numeric parsed
ACOUPF-11 edge validTill date ISO string
ACOUPF-12 edge exclusive/first-order toggles values
ACOUPF-13 edge all users vs specific user fields disabled/cleared
ACOUPF-14 edge reserved coupon target audience disabled
ACOUPF-15 happy user selector search/pagination/selection
ACOUPF-16 edge user selector query only when open enabled flag
ACOUPF-17 edge select/deselect user applicableUsers
ACOUPF-18 edge product selector skuIds; empty = whole cart
ACOUPF-19 edge product count copy selected count
ACOUPF-20 edge pattern code ABC12 Add Multiple visible
ACOUPF-21 edge generate N codes sequential from highest
ACOUPF-22 error generate 0/>100 no change/current
ACOUPF-23 edge codes unique validation duplicate error
ACOUPF-24 edge submit onSubmit values

9. Dashboard banners

ID Type Case Assert
ABANUI-01 happy loading “Loading banners...”
ABANUI-02 error fail “Error loading banners”
ABANUI-03 edge empty “No Banners Yet” + add
ABANUI-04 happy populated banner name/status/slots/actions
ABANUI-05 edge inactive status
ABANUI-06 edge active status
ABANUI-07 happy Add New Banner create route
ABANUI-08 happy edit icon edit route
ABANUI-09 happy delete confirm; success refetch; error alert
ABANUI-10 happy select banner then slot assignment mode
ABANUI-11 happy save slot assignments updateBanner calls; success
ABANUI-12 error save assignments fails error alert
ABANUI-13 happy cancel assignment clears selection
ABANUI-14 happy empty slot updateBanner clear; success/error
ABANUI-15 edge 4 fixed slots slot numbers rendered
ABANUI-16 edge banner with SKUs slot assignment display
ABANUI-17 edge image missing fallback
ABANUI-18 edge long names truncation
ABANUI-19 edge two updateBanner mutation instances assignment and empty-slot paths each call updateBanner correctly
ABANUI-20 edge loading images no crash

Banner create/edit/forms

ID Type Case Assert
ABANC-01 happy create render “Create Banner”
ABANC-02 error no image alert “Image is required”
ABANC-03 happy create upload, create payload; success/back
ABANC-04 error create fails alert
ABANC-05 edge cancel back
ABANC-06 edge upload pending loading/disabled
ABANE-01 happy loading “Loading banner...”
ABANE-02 error not found “Banner not found”; back
ABANE-03 happy prefill name/description/image/skus/redirect/serial/active
ABANE-04 happy update payload; success/back
ABANE-05 error update fails alert
ABANE-06 edge missing id/data back after alert
ABANE-07 edge remove image imageUrl undefined
ABANE-08 edge cancel back
ABANF-01 happy form fields name/image/description/skus/redirect/serial/active
ABANF-02 error name empty validation
ABANF-03 error image URL invalid validation
ABANF-04 error redirect URL invalid validation
ABANF-05 happy product selector skuIds
ABANF-06 edge serial null allowed
ABANF-07 edge active toggle boolean
ABANF-08 edge submit payload
ABANF-09 edge upload error alert

10. Product tags and tag ordering

10.1 Tag list

ID Type Case Assert
ATAG-01 happy loading “Loading tags...”
ATAG-02 error fail “Error”; Retry
ATAG-03 edge empty “No tags yet”; add
ATAG-04 happy list name/description/dashboard badge
ATAG-05 happy Tag Orders tag order route
ATAG-06 happy Add New Tag add route
ATAG-07 edge mark data fetchers refetch
ATAG-08 edge long tag name truncation

10.2 Tag add/edit/order/form

ID Type Case Assert
ATAGA-01 happy add render TagForm
ATAGA-02 happy create createProductTag payload
ATAGA-03 edge image upload keys/uploadUrls
ATAGA-04 error create fails errorMessage alert
ATAGA-05 edge success refetch; alert; back
ATAGE-01 happy edit loading “Loading tag...”
ATAGE-02 error not found “Tag not found”
ATAGE-03 happy prefill name/description/image/dashboard/stores/products
ATAGE-04 happy update payload; refetch; alert; back
ATAGE-05 edge remove existing image imageUrl null
ATAGE-06 edge replace image upload/delete old
ATAGE-07 error update fails errorMessage
ATAGO-01 happy loading constants/tags “Loading...”
ATAGO-02 error constants/tags fail Error; Go Back
ATAGO-03 happy ordered tags tagsOrder first, unknown after
ATAGO-04 edge drag/reorder order state changes
ATAGO-05 happy save updateRegionConstants tagsOrder
ATAGO-06 edge no change still saves? assert
ATAGO-07 error save fails alert
ATAGO-08 edge empty tags empty copy
ATAGF-01 happy form fields name/description/image/dashboard/stores/products
ATAGF-02 error empty name validation
ATAGF-03 edge image upload uploadUrls
ATAGF-04 edge dashboard toggle boolean
ATAGF-05 edge related stores ids
ATAGF-06 edge product selector skuIds/productIds
ATAGF-07 edge submit payload
ATAGF-08 edge cancel close

11. Product groupings

11.1 List

ID Type Case Assert
AGRP-01 happy loading “Loading product groups...”
AGRP-02 error fail “Error loading groups”
AGRP-03 edge empty empty state + create
AGRP-04 happy card name/description/product count
AGRP-05 happy View Products dialog/list
AGRP-06 happy Edit edit route
AGRP-07 happy Delete confirm; Cancel
AGRP-08 happy confirm delete deleteGroup; refetch
AGRP-09 error delete fails alert
AGRP-10 happy create create route
AGRP-11 edge mark data fetchers refetch

11.2 Create/edit/form

ID Type Case Assert
AGRPC-01 happy create render “Create Product Group”
AGRPC-02 error empty name validation
AGRPC-03 happy create createGroup payload
AGRPC-04 edge description empty allowed
AGRPC-05 edge product selection product_ids
AGRPC-06 error API fail alert
AGRPC-07 edge pending Saving/disabled
AGRPE-01 happy edit load group found
AGRPE-02 edge missing/loading “Loading group...” / not found
AGRPE-03 happy prefill name/description/products
AGRPE-04 happy update updateGroup payload
AGRPE-05 edge no group not found
AGRPE-06 edge product IDs are SKU IDs end-to-end edit preselects the group SKUs; create/update sends the same SKU ids
AGRPE-07 edge success refetch/onSuccess
AGRPE-08 edge cancel/close onClose

12. Manage orders hub and order list

12.1 Manage orders hub

ID Type Case Assert
AMHUB-01 happy render Delivery Sequences and Orders actions; slot dropdown
AMHUB-02 edge slots loading no crash
AMHUB-03 edge no slots options empty
AMHUB-04 happy Delivery Sequences with selected slot push delivery sequences with slotId
AMHUB-05 edge Flash selected alert “Flash deliveries do not have…”
AMHUB-06 happy Orders regular push orders
AMHUB-07 happy Orders flash push orders?filter=flash
AMHUB-08 edge navigation target set/consume
AMHUB-09 edge mark data fetchers slots refetch

12.2 Orders list

ID Type Case Assert
AORDUI-01 happy loading “Loading orders...”
AORDUI-02 edge empty empty copy
AORDUI-03 happy order card id/readableId/status/items/address/total/coupons
AORDUI-04 edge flash FLASH badge
AORDUI-05 edge negative customer “Negative Customer”
AORDUI-06 edge cancelled red id/status/cancelled banner
AORDUI-07 edge delivery charge shows amount; remove?
AORDUI-08 edge user notes user note dialog
AORDUI-09 edge admin notes admin note dialog
AORDUI-10 edge applied coupons code/discount
AORDUI-11 edge item packaging toggles updateOrderItemPackaging
AORDUI-12 edge item packaging pending disabled/indicator
AORDUI-13 error packaging fails alert
AORDUI-14 edge inline “Packaged” toggle inert (onPress={() => {}}) current gap
AORDUI-15 happy Delivered toggle updateDelivered
AORDUI-16 error delivered toggle fails alert
AORDUI-17 happy card press order detail route
AORDUI-18 happy items dialog all items; close
AORDUI-19 happy menu OrderOptionsMenu
AORDUI-20 happy Admin Notes save mutation; alert; refetch
AORDUI-21 error Admin Notes fails alert
AORDUI-22 edge empty admin notes saves empty
AORDUI-23 happy filter by slot query slotId
AORDUI-24 edge flash shortcut sets flash filter, resets others
AORDUI-25 edge packaged filter all/packaged/not_packaged
AORDUI-26 edge delivered filter all/delivered/not_delivered
AORDUI-27 edge cancellation filter all/cancelled/not_cancelled
AORDUI-28 edge delivery type filter all/flash/regular
AORDUI-29 edge filter dialog close selections persist
AORDUI-30 edge pagination fetchNextPage; loading footer
AORDUI-31 edge pull refresh refetch
AORDUI-32 edge mark data fetchers refetch
AORDUI-33 edge no duplicate pages dedupe/append current
AORDUI-34 edge filter from URL filter=flash initial flash state
AORDUI-35 edge status capitalization statuses rendered
AORDUI-36 edge long address/product names truncation

13. Order details, notes, cancel and delivery sequences

13.1 Order details

ID Type Case Assert
AOD-01 happy loading “Loading order details...”
AOD-02 error fail “Order not found” + Go Back
AOD-03 edge missing id query disabled/error
AOD-04 happy header order id/date/status/flash/region
AOD-05 edge cancellation reason block
AOD-06 happy customer card name/mobile/address; link to user
AOD-07 happy items quantity/unit/price/amount/packaging state
AOD-08 edge toggle packaged updateOrderItemPackaging
AOD-09 edge toggle verified updateOrderItemPackaging
AOD-10 edge pending item “updating…” state
AOD-11 error item update fails alert
AOD-12 happy bill subtotal/discount/delivery/total
AOD-13 happy remove delivery charge confirm; mutation; refetch
AOD-14 error remove fails alert
AOD-15 edge delivery 0 no remove action
AOD-16 edge coupon applied coupon block/discount
AOD-17 edge flash amber theme, FLASH
AOD-18 edge user notes/admin notes note blocks
AOD-19 happy Cancel order dialog
AOD-20 error cancel reason empty blocked/validation
AOD-21 happy confirm cancel cancelOrder; success/refetch
AOD-22 error cancel fails alert
AOD-23 happy Back to orders route
AOD-24 edge customer link user detail route
AOD-25 edge no OrderOptionsMenu on details only the explicit Cancel/Back actions are present (current)
AOD-26 edge delivered timestamp "Delivered on …" when deliveredAt is set
AOD-27 edge not delivered no delivered timestamp
AOD-28 edge packed timestamp per-item "Packed …" only when packagedAt is set

13.2 OrderNotesForm / CancelOrderDialog / OrderOptionsMenu

ID Type Case Assert
AONF-01 happy empty notes input
AONF-02 happy save updateNotes payload; success/refetch
AONF-03 error save fails alert
AONF-04 edge cancel onClose
AONF-05 edge pending disabled
ACANCEL-01 happy render warning text (COD-only, no refund wording)
ACANCEL-02 error empty reason alert; no mutation
ACANCEL-03 happy valid reason cancelOrder payload; success
ACANCEL-04 error mutation fails alert
ACANCEL-05 edge pending “Cancelling...”/disabled
ACANCEL-06 edge cancel onClose
AOPT-01 happy menu View Details/Edit Notes/Raise Complaint/Cancel
AOPT-02 happy view details route
AOPT-03 happy edit notes dialog; save
AOPT-04 happy raise complaint parent callback/dialog
AOPT-05 happy cancel dialog
AOPT-06 edge pending states disabled
AOPT-07 edge complaint close triggers refresh

13.3 Delivery sequences

ID Type Case Assert
ADSEQ-01 happy loading slots “Loading slots...”
ADSEQ-02 edge no slots empty copy
ADSEQ-03 edge selected slot from URL loaded
ADSEQ-04 edge no slotId first slot selected/replace
ADSEQ-05 happy slot dropdown replace URL with slotId
ADSEQ-06 happy orders loading “Loading orders...”
ADSEQ-07 edge no orders empty copy
ADSEQ-08 happy stats total/packaged/delivered/etc
ADSEQ-09 happy staff filter dropdown
ADSEQ-10 happy drag/reorder sequence order state
ADSEQ-11 happy save sequence updateDeliverySequence
ADSEQ-12 edge save success alert
ADSEQ-13 error save fail alert
ADSEQ-14 edge toggle packaged updatePackaged
ADSEQ-15 edge toggle delivered updateDelivered
ADSEQ-16 edge update coords updateAddressCoords
ADSEQ-17 edge item order press order details
ADSEQ-18 edge flash order in a slot it is listed like any order; no separate flash-sequence branch (current)
ADSEQ-19 edge mark data fetchers refetch
ADSEQ-20 edge no orders for slot no save/sequence

14. Complaints, notifications and users

14.1 Complaints

ID Type Case Assert
ACOMPUI-01 happy loading “Loading complaints...”
ACOMPUI-02 error fail “Error”; Retry
ACOMPUI-03 edge empty empty copy
ACOMPUI-04 happy complaint card id/user/order/text/status/images/response
ACOMPUI-05 edge pending pending status
ACOMPUI-06 edge resolved resolved status
ACOMPUI-07 edge user link user detail
ACOMPUI-08 edge order link order detail
ACOMPUI-09 happy Mark resolved dialog
ACOMPUI-10 error empty response submit disabled/validation (current server min 1)
ACOMPUI-11 happy resolve mutation; success; refetch
ACOMPUI-12 error resolve fails alert
ACOMPUI-13 edge pagination fetchNextPage
ACOMPUI-14 edge refresh refetch
ACOMPUI-15 edge mark data fetchers refetch
ACOMPUI-16 edge image viewer opens

14.2 Send notifications

ID Type Case Assert
ANOTIF-01 happy loading users spinner
ANOTIF-02 happy render title/message/user dropdown/send
ANOTIF-03 error empty title alert
ANOTIF-04 error empty message alert
ANOTIF-05 edge no users eligible dropdown empty; send-to-all still
ANOTIF-06 happy Send to All confirmation; Cancel no API
ANOTIF-07 happy confirm all sendNotification({userIds:[],title,text})
ANOTIF-08 happy selected users payload ids
ANOTIF-09 edge one user display mobile/name
ANOTIF-10 edge multiple users display “N users selected”
ANOTIF-11 edge search users query refetch
ANOTIF-12 edge pending “Sending...”; disabled
ANOTIF-13 happy success alert; reset title/message/selection
ANOTIF-14 error send fails alert
ANOTIF-15 edge double alert on failure current gap (mutation onError + catch)
ANOTIF-16 edge back router.back

14.3 User management

ID Type Case Assert
AUM-01 happy loading “Loading users...”
AUM-02 error fail Error + Retry
AUM-03 edge empty “No users found”
AUM-04 edge search with no results “Try adjusting your search”
AUM-05 happy list mobile/name/registered/orders/last order
AUM-06 edge no name “Unnamed User”
AUM-07 edge no mobile “No Mobile”
AUM-08 edge suspended Suspended badge
AUM-09 edge zero orders gray/0
AUM-10 happy search query input with trim/undefined
AUM-11 happy infinite scroll page 2 appended, deduped
AUM-12 edge duplicate pages dedupe by id
AUM-13 edge pull refresh refetch
AUM-14 edge footer loading spinner
AUM-15 happy tap user detail route
AUM-16 edge hasLoadedOnce no full-screen spinner on load-more
AUM-17 edge search resets page new query page 1
AUM-18 edge empty after search Clear? current no clear button

14.4 User detail

ID Type Case Assert
AUD-01 happy loading “Loading user details...”
AUD-02 error fail Error + Retry
AUD-03 edge invalid id query disabled/error
AUD-04 happy header mobile/name/registered
AUD-05 edge no name/mobile fallbacks
AUD-06 edge suspended badge
AUD-07 happy suspension toggle updateUserSuspension; refetch
AUD-08 edge pending spinner
AUD-09 error suspension fails current no alert? assert
AUD-10 happy incidents UserIncidentsView
AUD-11 happy orders count/order cards
AUD-12 edge no orders “No orders yet”
AUD-13 happy order press order detail
AUD-14 edge status colors delivered/cancelled/pending
AUD-15 edge flash badge
AUD-16 edge item count singular/plural
AUD-17 edge back router.back

14.5 User incidents

ID Type Case Assert
AINC-01 happy loading spinner
AINC-02 edge empty empty copy
AINC-03 happy list comment/date/addedBy/negativity/order status
AINC-04 happy add incident dialog/form
AINC-05 error empty comment? validation/current
AINC-06 happy submit addUserIncident; refetch
AINC-07 error mutation fails alert
AINC-08 edge optional order/score payload
AINC-09 edge pending disabled

16. Customize app

16.1 Main screen

ID Type Case Assert
ACUST-01 happy loading region/bounds spinner
ACUST-02 edge bounds error error + Retry
ACUST-03 edge no bounds “No bounds configured”
ACUST-04 happy bounds list priority/current/effective labels
ACUST-05 edge default bound lowest priority selected
ACUST-06 happy tab switch Bound/Region sections
ACUST-07 happy Bound form threshold/charge/flash fields
ACUST-08 edge boolean flash enabled/disabled
ACUST-09 happy save bound updateBoundSettings changed keys only
ACUST-10 edge no changes “No Changes” alert, no API
ACUST-11 error save fails alert
ACUST-12 edge number parsing empty/invalid -> 0
ACUST-13 edge array parsing/serialization comma-separated
ACUST-14 happy Region form popular/all order links/counts; support/welcome
ACUST-15 happy popular link route
ACUST-16 happy all-items link route
ACUST-17 happy save region updateRegionConstants changed keys
ACUST-18 edge no region changes “No Changes”
ACUST-19 error region save fails alert
ACUST-20 edge missing bound settings defaults
ACUST-21 edge refetch on save queries refresh
ACUST-22 edge loading settings spinner
ACUST-23 edge settings error error + Retry
ACUST-24 edge region constants loading spinner
ACUST-25 edge flash toggle serialized “true”/“false”
ACUST-26 edge welcome multiline preserved
ID Type Case Assert
APOP-01 happy loading “Loading...”
APOP-02 error constants/products fail Error + Go Back
APOP-03 edge empty empty copy
APOP-04 happy current popular list products in stored order
APOP-05 edge product id missing skipped/placeholder
APOP-06 happy drag reorder order changes
APOP-07 happy delete product confirm; removed
APOP-08 happy Add Products dialog; selector
APOP-09 edge no selection Add disabled
APOP-10 edge add multiple appended
APOP-11 edge duplicate product deduped/current
APOP-12 happy save updateRegionConstants popularItems
APOP-13 edge save no changes still saves? assert
APOP-14 error save fails alert
APOP-15 edge selection IDs are SKU IDs selected items resolve against the SKU summary and persist the same IDs
APOP-16 edge long list scroll/drag

16.3 All items order

ID Type Case Assert
AALL-01 happy loading “Loading order...”
AALL-02 error constants/products fail Error + Go Back
AALL-03 edge empty empty copy
AALL-04 happy products ordered by allItemsOrder first ids, remaining after
AALL-05 edge unknown ids in order skipped
AALL-06 edge duplicate ids deduped
AALL-07 happy drag reorder order state
AALL-08 happy save updateRegionConstants allItemsOrder
AALL-09 edge save no change still saves?
AALL-10 error save fails alert
AALL-11 edge product image missing placeholder
AALL-12 edge item count “N items”
AALL-13 edge long list/drag scroll

17. Shared components and services

17.1 OrderOptionsMenu, UserIncidentsView

ID Type Case Assert
AOO-01 happy render action rows
AOO-02 edge callback props invoked
AOO-03 edge disabled/loading disabled
AUIV-01 happy loading/empty/list
AUIV-02 happy add incident API/refetch
AUIV-03 error fail alert

17.2 useJWT / upload hook / trpc client / queryClient

ID Type Case Assert
AJWT-01 happy save/get/delete JWT round-trip
AJWT-02 happy save/get/delete staff round-trip
AJWT-03 edge missing keys null
AUPL-01 happy upload single presigned PUT; returns key/url
AUPL-02 happy upload multiple all URLs/PUTs
AUPL-03 edge empty images no request
AUPL-04 error URL count mismatch throws
AUPL-05 error PUT failure throws
AUPL-06 edge isUploading state true/false
ATRPC-01 edge 401 UNAUTHORIZED force-logout event
ATRPC-02 edge 500/other no force logout
ATRPC-03 edge bearer token header attached
AQC-01 edge queryClient defaults retry/refetch config
AQC-02 edge logout clear cache cleared

17.3 Notification service

ID Type Case Assert
ANOT-01 happy register push token/permission
ANOT-02 error permission denied denied dialog
ANOT-03 edge settings button openSettings
ANOT-04 edge cancel dialog closes
ANOT-05 edge foreground notification toast
ANOT-06 edge response link router
ANOT-07 edge cleanup listeners removed
ANOT-08 edge provider absent useNotification throws

18. Known current gaps to pin explicitly

  1. Orders list inline “Packaged” checkbox is inert (onPress={() => {}}).
  2. ID-space watchpoint: groups/popular items/order screens use SKU IDs; assert the selector and the payload stay in the same ID space (the old suite had a product-ID/SKU-ID regression).
  3. StoreForm calls a local submit() instead of Formik handleSubmit, so name validation can be bypassed.
  4. Coupon “Apply” is not an action; cards are display-only apart from edit/delete.
  5. CouponForm has no testID on the submit button; use text.
  6. Banners uses two separate updateBanner mutation instances (assignment vs empty-slot); tests must assert each path independently.
  7. admin.order.getAll swallows backend errors in the API; the UI may show an empty list.
  8. admin.order.getOrderDetails/updateNotes/removeDeliveryCharge can surface raw 500s.
  9. Send Notifications can show two error alerts (mutation onError plus catch). 10.User suspension toggle has no error alert on failure (only stops the spinner). 11.Slot update API masks failures as “Unable to Update Slot”. 12.Product create/update requires a quantity feature; the UI auto-adds it but allows edge cases. 13.ProductForm validation for a missing feature value must be explicit; do not rely on the unguarded .trim() in the duplicate-signature check. 14.All cache-dependent pages must not assume immediate refresh; the admin API is immediate but the user cache is eventual.

19. Procedure coverage checklist (admin UI callers)

Procedure Covered by
admin.staffUser.login ALOGIN-01..14
admin.staffUser.me ADRAW-03..06
admin.staffUser.getStaff ADSEQ-09, AINC?
admin.user.getEssentials ADASH-02..03
admin.product.getProducts APLIST-01..26, APRICE-01..30
admin.product.getProductById APDET-01..22, APEDIT-01..20
admin.product.createProduct APADD-01..19
admin.product.updateProduct APEDIT-01..20, AGP-01..09
admin.product.toggleOutOfStock AVSTOCK-01..12
admin.product.getProductReviews APDET-10..12
admin.product.respondToReview APDET-13..21
admin.product.getProductTags ATAG-01..08
admin.product.getProductTagById ATAGE-01..07
admin.product.createProductTag ATAGA-01..05
admin.product.updateProductTag ATAGE-01..07
admin.product.deleteProductTag ATAG edit/delete paths
admin.product.getGroups AGRP-01..11, AGRPE-01..08
admin.product.createGroup AGRPC-01..07
admin.product.updateGroup AGRPE-01..08
admin.product.deleteGroup AGRP-07..09
admin.product.updateProductPrices APRICE-19..30
admin.store.getStores ASTOREUI-01..16, ASTOREADD-01..06
admin.store.getStoreById ASTOREEDIT-01..12
admin.store.createStore ASTOREADD-01..06
admin.store.updateStore ASTOREEDIT-01..12
admin.store.deleteStore ASTOREUI-09..12
admin.slots.getAll ASLOTUI-01..16, AREB-01..13
admin.slots.getSlotById ASLOTADD-01..04, ASLOTDET-01..10
admin.slots.createSlot ASLOTADD-01..06
admin.slots.updateSlot ASLOTEDIT-01..05
admin.slots.updateSlotCapacity ASLOTUI-10..12
admin.slots.getDeliverySequence ADSEQ-01..20
admin.slots.updateDeliverySequence ADSEQ-10..13
admin.coupon.getAll ACOUPUI-01..21
admin.coupon.getReservedCoupons ACOUPUI-22..30
admin.coupon.getById ACOUPE-01..10
admin.coupon.create ACOUPC-01..11
admin.coupon.createReservedCoupon ACOUPC-06..12
admin.coupon.update ACOUPE-04..10
admin.coupon.delete ACOUPUI-13..16
admin.coupon.getUsersMiniInfo ACOUPF-15..17
admin.banner.getBanners ABANUI-01..20
admin.banner.getBanner ABANE-01..08
admin.banner.createBanner ABANC-01..06
admin.banner.updateBanner ABANUI-10..14, ABANE-04..08
admin.banner.deleteBanner ABANUI-09
admin.order.getAll AORDUI-01..36
admin.order.getOrderDetails AOD-01..25
admin.order.updateNotes AORDUI-20..22, AONF-01..05
admin.order.updatePackaged AORDUI-14..16, ADSEQ-14
admin.order.updateDelivered AORDUI-15..16, ADSEQ-15
admin.order.updateOrderItemPackaging AORDUI-11..13, AOD-08..11
admin.order.removeDeliveryCharge AOD-13..15
admin.order.getSlotOrders ADSEQ-01..20
admin.order.updateAddressCoords ADSEQ-16
admin.order.rebalanceSlots AREB-08..13
admin.order.cancelOrder AOD-19..22, ACANCEL-01..06
admin.complaint.getAll ACOMPUI-01..16
admin.complaint.resolve ACOMPUI-09..12
admin.user.getAllUsers AUM-01..18
admin.user.getUserDetails AUD-01..17
admin.user.updateUserSuspension AUD-07..09
admin.user.getUsersForNotification ANOTIF-01..16
admin.user.sendNotification ANOTIF-06..15
admin.user.getUserIncidents AINC-01..09
admin.user.addUserIncident AINC-04..09
admin.region.current ACUST-01..26
admin.region.bounds ACUST-01..06
admin.region.getBoundSettings ACUST-07..13
admin.region.updateBoundSettings ACUST-09..13
admin.region.getRegionConstants ACUST-14..26, ATAGO-01..08, APOP-01..16, AALL-01..13
admin.region.updateRegionConstants ACUST-17..20, ATAGO-05..07, APOP-12..14, AALL-08..10
common.product.getAllProductsSummary APOP-04..15, AALL-04..13, AGRP/AGRPF product selector
common.product.getAllSkusSummary APFORM-16..22, ACOUPF-18..19, AVFORM-05..06
common.getStoresSummary APFORM-16..18, ASTOREF-07
common.generateUploadUrls APADD-06..09, APEDIT-07..09, ABANC-03, ASTOREADD-04..06, ATAGA-03, AVFORM?
notifications ANOT-01..08, ANOTIF-01..16

20. Suggested execution order

  1. tests/lib — auth, JWT, tRPC client, upload hook.
  2. tests/components — ProductForm, CouponForm, BannerForm, TagForm, SlotForm, StoreForm, ProductGroupForm, OrderOptionsMenu, VariantStockDialog.
  3. tests/pages — login/dashboard → products → stores/slots → coupons/banners/tags/groups → orders/delivery → complaints/users/notifications → customize.
  4. tests/app — root, index, drawer.
  5. Full NODE_ENV=test bun run test from apps/admin-ui.

Run serially if the test setup shares React Query or storage singletons. Reset the cache and storage between every test.