@mohasinac/appkit 4.40.1 → 4.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/categories/repository/categories.repository.js +2 -2
- package/dist/features/shell/SectionForm.js +44 -5
- package/dist/features/tester/seed-data/_money-flows.js +65 -49
- package/dist/features/tester/seed-data/authored/admin__admin-detail-round-trips.js +6 -4
- package/dist/features/tester/seed-data/authored/admin__coupons.js +14 -13
- package/dist/features/tester/seed-data/authored/buying__bidding.js +154 -140
- package/dist/features/tester/seed-data/authored/buying__browsing-search.js +4 -4
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +59 -56
- package/dist/features/tester/seed-data/authored/buying__buying-coupons.js +18 -18
- package/dist/features/tester/seed-data/authored/buying__cart.js +105 -79
- package/dist/features/tester/seed-data/authored/buying__image-tile-layout.js +6 -8
- package/dist/features/tester/seed-data/authored/buying__my-orders.js +13 -13
- package/dist/features/tester/seed-data/authored/buying__offers.js +6 -6
- package/dist/features/tester/seed-data/authored/buying__order-detail-actions.js +8 -7
- package/dist/features/tester/seed-data/authored/buying__product-detail.js +62 -56
- package/dist/features/tester/seed-data/authored/buying__return-request.js +6 -6
- package/dist/features/tester/seed-data/authored/buying__reviews-pagination.js +4 -4
- package/dist/features/tester/seed-data/authored/buying__reviews.js +1 -1
- package/dist/features/tester/seed-data/authored/buying__user-dashboard-extras.js +8 -8
- package/dist/features/tester/seed-data/authored/content-discovery__category-counts-and-rollup.js +1 -1
- package/dist/features/tester/seed-data/authored/content-discovery__coupons.js +29 -16
- package/dist/features/tester/seed-data/authored/content-discovery__event-detail-subroutes.js +9 -9
- package/dist/features/tester/seed-data/authored/content-discovery__events.js +69 -36
- package/dist/features/tester/seed-data/authored/content-discovery__notifications.js +1 -1
- package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.js +2 -2
- package/dist/features/tester/seed-data/authored/design-ux__back-to-top-button.js +2 -2
- package/dist/features/tester/seed-data/authored/design-ux__general-design.js +1 -1
- package/dist/features/tester/seed-data/authored/design-ux__status-badge-legibility.js +1 -1
- package/dist/features/tester/seed-data/authored/design-ux__sticky-cta-bar.js +3 -3
- package/dist/features/tester/seed-data/authored/index.js +0 -2
- package/dist/features/tester/seed-data/authored/page-wiring__data-loss.js +2 -2
- package/dist/features/tester/seed-data/authored/page-wiring__reachability.js +6 -4
- package/dist/features/tester/seed-data/authored/public-pages__auth-error-pages.js +2 -2
- package/dist/features/tester/seed-data/authored/public-pages__core-listing-pages.js +1 -1
- package/dist/features/tester/seed-data/authored/public-pages__stores-sellers-directories.js +8 -10
- package/dist/features/tester/seed-data/authored/selling__become-seller.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__digital-content-delivery.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__listing-a-product.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__listing-edit-roundtrip.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__listing-lifecycle.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__seller-listing-types.js +2 -2
- package/dist/features/tester/seed-data/authored/seo__og-images.js +3 -4
- package/dist/features/tester/seed-data/authored/seo__page-metadata.js +6 -8
- package/dist/features/tester/seed-data/authored/seo__sitemap-and-robots.js +5 -5
- package/dist/features/tester/seed-data/index.d.ts +0 -10
- package/dist/features/tester/seed-data/index.js +0 -10
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +75 -89
- package/dist/features/tester/seed-data/tester-responses-seed-data.js +5 -5
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -21
- package/dist/seed/addresses-seed-data.js +0 -34
- package/dist/seed/index.d.ts +1 -1
- package/dist/seed/index.js +4 -3
- package/dist/seed/manifest.js +11 -12
- package/dist/seed/notifications-seed-data.js +4 -4
- package/dist/seed/stores-seed-data.js +7 -52
- package/dist/seed/users-seed-data.js +3 -83
- package/package.json +2 -2
- package/scripts/seed-cli.mjs +15 -20
- package/dist/_internal/server/features/classified/actions.d.ts +0 -12
- package/dist/_internal/server/features/classified/actions.js +0 -33
- package/dist/_internal/server/features/digital-code/actions.d.ts +0 -12
- package/dist/_internal/server/features/digital-code/actions.js +0 -33
- package/dist/_internal/server/features/homepage/data.d.ts +0 -18
- package/dist/_internal/server/features/homepage/data.js +0 -70
- package/dist/_internal/server/features/live/actions.d.ts +0 -6
- package/dist/_internal/server/features/live/actions.js +0 -27
- package/dist/_internal/server/features/messages/actions.d.ts +0 -6
- package/dist/_internal/server/features/messages/actions.js +0 -6
- package/dist/_internal/server/features/messages/data.d.ts +0 -10
- package/dist/_internal/server/features/messages/data.js +0 -24
- package/dist/_internal/server/features/messages/index.d.ts +0 -2
- package/dist/_internal/server/features/messages/index.js +0 -2
- package/dist/_internal/server/jobs/core/testerSandboxRefresh.d.ts +0 -12
- package/dist/_internal/server/jobs/core/testerSandboxRefresh.js +0 -112
- package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.js +0 -2
- package/dist/_internal/shared/features/homepage/section-gate.d.ts +0 -14
- package/dist/_internal/shared/features/homepage/section-gate.js +0 -51
- package/dist/_internal/shared/features/lottery/config-form.d.ts +0 -58
- package/dist/_internal/shared/features/lottery/config-form.js +0 -71
- package/dist/client/api/useFeatureFlags.d.ts +0 -22
- package/dist/client/api/useFeatureFlags.js +0 -27
- package/dist/features/account/address-validation.d.ts +0 -20
- package/dist/features/account/address-validation.js +0 -35
- package/dist/features/account/components/ChatList.d.ts +0 -14
- package/dist/features/account/components/ChatList.js +0 -9
- package/dist/features/account/components/ChatWindow.d.ts +0 -17
- package/dist/features/account/components/ChatWindow.js +0 -6
- package/dist/features/account/components/MessagesView.d.ts +0 -16
- package/dist/features/account/components/MessagesView.js +0 -5
- package/dist/features/account/components/UserOffersView.d.ts +0 -10
- package/dist/features/account/components/UserOffersView.js +0 -5
- package/dist/features/account/constants/addresses.d.ts +0 -13
- package/dist/features/account/constants/addresses.js +0 -43
- package/dist/features/account/hooks/useAddressForm.d.ts +0 -24
- package/dist/features/account/hooks/useAddressForm.js +0 -58
- package/dist/features/admin/actions/chat-actions.d.ts +0 -29
- package/dist/features/admin/actions/chat-actions.js +0 -101
- package/dist/features/admin/components/AdminFeatureFlagsView.d.ts +0 -9
- package/dist/features/admin/components/AdminFeatureFlagsView.js +0 -109
- package/dist/features/admin/components/AdminSiteView.d.ts +0 -10
- package/dist/features/admin/components/AdminSiteView.js +0 -52
- package/dist/features/admin/hooks/useChat.d.ts +0 -24
- package/dist/features/admin/hooks/useChat.js +0 -100
- package/dist/features/admin/permission-map.d.ts +0 -3
- package/dist/features/admin/permission-map.js +0 -26
- package/dist/features/admin/repository/chat.repository.d.ts +0 -50
- package/dist/features/admin/repository/chat.repository.js +0 -223
- package/dist/features/auth/actions/password-change-otp-actions.d.ts +0 -18
- package/dist/features/auth/actions/password-change-otp-actions.js +0 -88
- package/dist/features/auth/actions/realtime-token-actions.d.ts +0 -11
- package/dist/features/auth/actions/realtime-token-actions.js +0 -38
- package/dist/features/auth/password-change-otp.d.ts +0 -34
- package/dist/features/auth/password-change-otp.js +0 -56
- package/dist/features/classified/components/ClassifiedContactSellerPanel.d.ts +0 -12
- package/dist/features/classified/components/ClassifiedContactSellerPanel.js +0 -49
- package/dist/features/events/api/route.d.ts +0 -12
- package/dist/features/events/api/route.js +0 -90
- package/dist/features/faq/api/route.d.ts +0 -11
- package/dist/features/faq/api/route.js +0 -52
- package/dist/features/faq/hooks/useFAQs.d.ts +0 -22
- package/dist/features/faq/hooks/useFAQs.js +0 -41
- package/dist/features/media/upload/video-poster.test.d.ts +0 -1
- package/dist/features/media/upload/video-poster.test.js +0 -42
- package/dist/features/messages/actions/index.d.ts +0 -2
- package/dist/features/messages/actions/index.js +0 -2
- package/dist/features/messages/actions/messages-actions.d.ts +0 -15
- package/dist/features/messages/actions/messages-actions.js +0 -33
- package/dist/features/messages/actions/ping-rtdb.d.ts +0 -2
- package/dist/features/messages/actions/ping-rtdb.js +0 -26
- package/dist/features/messages/hooks/useConversation.d.ts +0 -22
- package/dist/features/messages/hooks/useConversation.js +0 -155
- package/dist/features/messages/hooks/useConversations.d.ts +0 -15
- package/dist/features/messages/hooks/useConversations.js +0 -104
- package/dist/features/messages/index.d.ts +0 -6
- package/dist/features/messages/index.js +0 -4
- package/dist/features/messages/realtime.d.ts +0 -32
- package/dist/features/messages/realtime.js +0 -39
- package/dist/features/messages/repository/conversations.repository.d.ts +0 -71
- package/dist/features/messages/repository/conversations.repository.js +0 -284
- package/dist/features/messages/schemas/firestore.d.ts +0 -34
- package/dist/features/messages/schemas/firestore.js +0 -16
- package/dist/features/messages/schemas/index.d.ts +0 -177
- package/dist/features/messages/schemas/index.js +0 -35
- package/dist/features/messages/server.d.ts +0 -6
- package/dist/features/messages/server.js +0 -6
- package/dist/features/products/components/MakeOfferForm.d.ts +0 -20
- package/dist/features/products/components/MakeOfferForm.js +0 -9
- package/dist/features/reviews/api/route.d.ts +0 -21
- package/dist/features/reviews/api/route.js +0 -174
- package/dist/features/seller/api/offers/route.d.ts +0 -17
- package/dist/features/seller/api/offers/route.js +0 -63
- package/dist/features/seller/components/SellerAuctionsView.d.ts +0 -9
- package/dist/features/seller/components/SellerAuctionsView.js +0 -113
- package/dist/features/seller/components/SellerOffersPanel.d.ts +0 -21
- package/dist/features/seller/components/SellerOffersPanel.js +0 -160
- package/dist/features/seller/components/SellerPreOrdersView.d.ts +0 -6
- package/dist/features/seller/components/SellerPreOrdersView.js +0 -148
- package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +0 -6
- package/dist/features/seller/components/SellerPrizeDrawsView.js +0 -152
- package/dist/features/seller/permission-map.d.ts +0 -5
- package/dist/features/seller/permission-map.js +0 -17
- package/dist/features/shell/StepForm.d.ts +0 -80
- package/dist/features/shell/StepForm.js +0 -136
- package/dist/features/stores/api/route.d.ts +0 -12
- package/dist/features/stores/api/route.js +0 -110
- package/dist/features/tester/seed-data/authored/account-auth__testing-program--admin.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/account-auth__testing-program--admin.js +0 -33
- package/dist/features/tester/seed-data/authored/account-auth__testing-program.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/account-auth__testing-program.js +0 -138
- package/dist/features/tester/seed-data/bids-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/bids-tester-seed-data.js +0 -37
- package/dist/features/tester/seed-data/blog-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/blog-tester-seed-data.js +0 -40
- package/dist/features/tester/seed-data/carts-tester-seed-data.d.ts +0 -3
- package/dist/features/tester/seed-data/carts-tester-seed-data.js +0 -70
- package/dist/features/tester/seed-data/categories-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/categories-tester-seed-data.js +0 -218
- package/dist/features/tester/seed-data/coupons-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/coupons-tester-seed-data.js +0 -76
- package/dist/features/tester/seed-data/events-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/events-tester-seed-data.js +0 -193
- package/dist/features/tester/seed-data/offers-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/offers-tester-seed-data.js +0 -191
- package/dist/features/tester/seed-data/orders-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/orders-tester-seed-data.js +0 -329
- package/dist/features/tester/seed-data/products-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/products-tester-seed-data.js +0 -815
- package/dist/features/tester/seed-data/stores-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/stores-tester-seed-data.js +0 -79
- package/dist/features/wishlist/components/WishlistToggleButton.d.ts +0 -12
- package/dist/features/wishlist/components/WishlistToggleButton.js +0 -36
- package/dist/monitoring/analytics.d.ts +0 -80
- package/dist/monitoring/analytics.js +0 -176
- package/dist/next/middleware/pii-redactor.d.ts +0 -32
- package/dist/next/middleware/pii-redactor.js +0 -84
- package/dist/providers/db-firebase/realtime.d.ts +0 -42
- package/dist/providers/db-firebase/realtime.js +0 -138
- package/dist/security/rbac/Can.d.ts +0 -31
- package/dist/security/rbac/Can.js +0 -22
- package/dist/security/rbac/default-roles.d.ts +0 -2
- package/dist/security/rbac/default-roles.js +0 -83
- package/dist/security/rbac/hook.d.ts +0 -20
- package/dist/security/rbac/hook.js +0 -30
- package/dist/security/rbac/index.d.ts +0 -8
- package/dist/security/rbac/index.js +0 -6
- package/dist/security/rbac/middleware.d.ts +0 -51
- package/dist/security/rbac/middleware.js +0 -51
- package/dist/security/rbac/resolver.d.ts +0 -5
- package/dist/security/rbac/resolver.js +0 -38
- package/dist/security/rbac/server.d.ts +0 -24
- package/dist/security/rbac/server.js +0 -42
- package/dist/security/rbac/types.d.ts +0 -22
- package/dist/security/rbac/types.js +0 -2
- package/dist/seed/conversations-seed-data.d.ts +0 -2
- package/dist/seed/conversations-seed-data.js +0 -292
- package/dist/utils/filter.helper.d.ts +0 -18
- package/dist/utils/filter.helper.js +0 -21
- package/dist/utils/pagination.helper.d.ts +0 -23
- package/dist/utils/pagination.helper.js +0 -24
- package/dist/utils/search-tokens.d.ts +0 -2
- package/dist/utils/search-tokens.js +0 -21
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* WHY: Shared tester sandbox — a pre-ACCEPTED offer for the tester persona.
|
|
3
|
-
* Needed because the offer lifecycle spans two parties: a tester can make
|
|
4
|
-
* an offer (buyer side) but cannot accept it, since acceptance belongs to
|
|
5
|
-
* the store that owns the listing (`store-beyblade-arena`, not the
|
|
6
|
-
* tester's own sandbox store). Without a pre-accepted fixture, the
|
|
7
|
-
* "checkout at the agreed price" and "offer flips to paid" cases are not
|
|
8
|
-
* reachable by a single tester at all.
|
|
9
|
-
* WHAT: Exports offersTesterSeedData — 1 Partial<OfferDocument> already in the
|
|
10
|
-
* `accepted` state, with a live `checkoutDeadline`, so the tester can
|
|
11
|
-
* drive it straight through the Offers checkout lane.
|
|
12
|
-
*
|
|
13
|
-
* Every date is Date.now()-relative (per CLAUDE.md's tester-fixture standards)
|
|
14
|
-
* so each seed run re-arms it instead of letting it go stale.
|
|
15
|
-
*
|
|
16
|
-
* EXPORTS:
|
|
17
|
-
* offersTesterSeedData — Array of 1 Partial<OfferDocument> for the seed runner
|
|
18
|
-
*
|
|
19
|
-
* @tag domain:offers,seller,tester
|
|
20
|
-
* @tag layer:seed
|
|
21
|
-
* @tag pattern:none
|
|
22
|
-
* @tag access:server-only
|
|
23
|
-
* @tag consumers:seed/manifest.ts,seed-cli.mjs
|
|
24
|
-
* @tag sideEffects:none
|
|
25
|
-
*/
|
|
26
|
-
import { OfferStatusValues } from "../../seller/schemas/firestore";
|
|
27
|
-
import { testDataExpiresAt } from "./tester-ttl";
|
|
28
|
-
import { windowOffset } from "./tester-window";
|
|
29
|
-
const NOW = new Date();
|
|
30
|
-
const hoursAgo = (n) => new Date(NOW.getTime() - n * 3600000);
|
|
31
|
-
/*
|
|
32
|
-
* Deadlines expressed as fractions of the testing window rather than fixed hours.
|
|
33
|
-
*
|
|
34
|
-
* "An accepted offer past its checkoutDeadline cannot be checked out" is a real
|
|
35
|
-
* checklist case, and a fixed 36-hour deadline makes it untestable in any session
|
|
36
|
-
* shorter than a day and a half. Fractions scale with TESTER_WINDOW_MINUTES, so the
|
|
37
|
-
* lapse actually happens while someone is watching.
|
|
38
|
-
*
|
|
39
|
-
* OUTLASTS_RUN is deliberately greater than 1: the "still live" offers must NOT
|
|
40
|
-
* lapse mid-run, or every other offer case starts failing for the wrong reason.
|
|
41
|
-
*/
|
|
42
|
-
const OUTLASTS_RUN = 2;
|
|
43
|
-
const LAPSES_MID_RUN = 1 / 3;
|
|
44
|
-
const CHECKOUT_LAPSES_MID_RUN = 1 / 6;
|
|
45
|
-
export const offersTesterSeedData = [
|
|
46
|
-
{
|
|
47
|
-
id: "offer-tester-sandbox-accepted",
|
|
48
|
-
productId: "product-beyblade-burst-valkyrie",
|
|
49
|
-
productTitle: "Beyblade Burst Valkyrie",
|
|
50
|
-
productSlug: "product-beyblade-burst-valkyrie",
|
|
51
|
-
storeId: "store-beyblade-arena",
|
|
52
|
-
storeName: "Beyblade Arena",
|
|
53
|
-
buyerUid: "user-tester-qa",
|
|
54
|
-
buyerName: "QA Tester",
|
|
55
|
-
buyerEmail: "tester@letitrip.in",
|
|
56
|
-
// Realigned 2026-08-24: this carried listedPrice 1899 / offer 1450 against
|
|
57
|
-
// a product that costs ₹999 — an offer ABOVE the listing price, which
|
|
58
|
-
// `makeOffer` would reject outright. Same stale-snapshot drift the main
|
|
59
|
-
// offers seed had.
|
|
60
|
-
listedPrice: 999,
|
|
61
|
-
offerAmount: 780,
|
|
62
|
-
// The agreed price. Checkout MUST bill this, not `listedPrice` — that
|
|
63
|
-
// divergence is exactly what the paired checklist case checks.
|
|
64
|
-
lockedPrice: 780,
|
|
65
|
-
currency: "INR",
|
|
66
|
-
status: OfferStatusValues.ACCEPTED,
|
|
67
|
-
buyerNote: "Sandbox offer — already accepted so testers can drive checkout.",
|
|
68
|
-
sellerNote: "Accepted for QA sandbox testing.",
|
|
69
|
-
expiresAt: windowOffset(OUTLASTS_RUN),
|
|
70
|
-
acceptedAt: hoursAgo(1),
|
|
71
|
-
respondedAt: hoursAgo(1),
|
|
72
|
-
// Well inside the 48h window so the lane is live for a whole test session.
|
|
73
|
-
checkoutDeadline: windowOffset(OUTLASTS_RUN),
|
|
74
|
-
createdAt: hoursAgo(2),
|
|
75
|
-
updatedAt: hoursAgo(1),
|
|
76
|
-
isTestData: true,
|
|
77
|
-
testDataExpiresAt: testDataExpiresAt(),
|
|
78
|
-
},
|
|
79
|
-
/**
|
|
80
|
-
* COUNTERED. The buyer-accepts-a-counter path had no fixture at all, so
|
|
81
|
-
* `acceptCounterOffer` was unreachable for a tester working solo.
|
|
82
|
-
*/
|
|
83
|
-
{
|
|
84
|
-
id: "offer-tester-sandbox-countered",
|
|
85
|
-
productId: "product-beyblade-metal-storm-pegasus",
|
|
86
|
-
productTitle: "Beyblade Metal Storm Pegasus",
|
|
87
|
-
productSlug: "product-beyblade-metal-storm-pegasus",
|
|
88
|
-
storeId: "store-beyblade-arena",
|
|
89
|
-
storeName: "Beyblade Arena",
|
|
90
|
-
buyerUid: "user-tester-qa",
|
|
91
|
-
buyerName: "QA Tester",
|
|
92
|
-
buyerEmail: "tester@letitrip.in",
|
|
93
|
-
listedPrice: 1299,
|
|
94
|
-
offerAmount: 1000,
|
|
95
|
-
counterAmount: 1150,
|
|
96
|
-
currency: "INR",
|
|
97
|
-
status: OfferStatusValues.COUNTERED,
|
|
98
|
-
buyerNote: "Sandbox offer — seller has countered, accept it to test the counter path.",
|
|
99
|
-
sellerNote: "Counter: ₹1,150.",
|
|
100
|
-
expiresAt: windowOffset(OUTLASTS_RUN),
|
|
101
|
-
respondedAt: hoursAgo(1),
|
|
102
|
-
createdAt: hoursAgo(2),
|
|
103
|
-
updatedAt: hoursAgo(1),
|
|
104
|
-
isTestData: true,
|
|
105
|
-
testDataExpiresAt: testDataExpiresAt(),
|
|
106
|
-
},
|
|
107
|
-
/**
|
|
108
|
-
* ACCEPTED with a deliberately SHORT window, so the live countdown and the
|
|
109
|
-
* "pay before it closes" case are observable inside one test session rather
|
|
110
|
-
* than needing a 36-hour wait.
|
|
111
|
-
*/
|
|
112
|
-
{
|
|
113
|
-
id: "offer-tester-sandbox-expiring",
|
|
114
|
-
productId: "product-beyblade-x-wizard-arrow",
|
|
115
|
-
productTitle: "Beyblade X Wizard Arrow",
|
|
116
|
-
productSlug: "product-beyblade-x-wizard-arrow",
|
|
117
|
-
storeId: "store-beyblade-arena",
|
|
118
|
-
storeName: "Beyblade Arena",
|
|
119
|
-
buyerUid: "user-tester-qa",
|
|
120
|
-
buyerName: "QA Tester",
|
|
121
|
-
buyerEmail: "tester@letitrip.in",
|
|
122
|
-
listedPrice: 899,
|
|
123
|
-
offerAmount: 700,
|
|
124
|
-
lockedPrice: 700,
|
|
125
|
-
currency: "INR",
|
|
126
|
-
status: OfferStatusValues.ACCEPTED,
|
|
127
|
-
buyerNote: "Sandbox offer — accepted with a short checkout window.",
|
|
128
|
-
sellerNote: "Accepted. Pay soon!",
|
|
129
|
-
expiresAt: windowOffset(LAPSES_MID_RUN),
|
|
130
|
-
acceptedAt: hoursAgo(0),
|
|
131
|
-
respondedAt: hoursAgo(0),
|
|
132
|
-
checkoutDeadline: windowOffset(CHECKOUT_LAPSES_MID_RUN),
|
|
133
|
-
createdAt: hoursAgo(1),
|
|
134
|
-
updatedAt: hoursAgo(0),
|
|
135
|
-
isTestData: true,
|
|
136
|
-
testDataExpiresAt: testDataExpiresAt(),
|
|
137
|
-
},
|
|
138
|
-
/**
|
|
139
|
-
* PENDING. Two cases need this: withdrawing an offer, and the
|
|
140
|
-
* "you already have an active offer on this item" rejection when the tester
|
|
141
|
-
* tries to offer on the same listing again.
|
|
142
|
-
*/
|
|
143
|
-
{
|
|
144
|
-
id: "offer-tester-sandbox-pending",
|
|
145
|
-
productId: "product-beyblade-original-driger-v",
|
|
146
|
-
productTitle: "Beyblade Original Driger V",
|
|
147
|
-
productSlug: "product-beyblade-original-driger-v",
|
|
148
|
-
storeId: "store-beyblade-arena",
|
|
149
|
-
storeName: "Beyblade Arena",
|
|
150
|
-
buyerUid: "user-tester-qa",
|
|
151
|
-
buyerName: "QA Tester",
|
|
152
|
-
buyerEmail: "tester@letitrip.in",
|
|
153
|
-
listedPrice: 1799,
|
|
154
|
-
offerAmount: 1450,
|
|
155
|
-
currency: "INR",
|
|
156
|
-
status: OfferStatusValues.PENDING,
|
|
157
|
-
buyerNote: "Sandbox offer — still pending, withdraw it to test that path.",
|
|
158
|
-
expiresAt: windowOffset(OUTLASTS_RUN),
|
|
159
|
-
createdAt: hoursAgo(1),
|
|
160
|
-
updatedAt: hoursAgo(1),
|
|
161
|
-
isTestData: true,
|
|
162
|
-
testDataExpiresAt: testDataExpiresAt(),
|
|
163
|
-
},
|
|
164
|
-
/**
|
|
165
|
-
* The SELLER side. Every fixture above has the tester as the buyer, so
|
|
166
|
-
* accept / decline / counter at /store/offers were unreachable for them —
|
|
167
|
-
* you cannot respond to your own offer. This one is addressed TO the
|
|
168
|
-
* tester's own sandbox store from a different persona.
|
|
169
|
-
*/
|
|
170
|
-
{
|
|
171
|
-
id: "offer-tester-sandbox-inbound",
|
|
172
|
-
productId: "product-tester-standard-1",
|
|
173
|
-
productTitle: "Test Gadget — Standard Listing #1",
|
|
174
|
-
productSlug: "product-tester-standard-1",
|
|
175
|
-
storeId: "store-tester-qa-seller",
|
|
176
|
-
storeName: "Tester QA Seller",
|
|
177
|
-
buyerUid: "user-yugi-muto",
|
|
178
|
-
buyerName: "Mock User 3",
|
|
179
|
-
buyerEmail: "rehan.sheikh@gmail.com",
|
|
180
|
-
listedPrice: 150,
|
|
181
|
-
offerAmount: 120,
|
|
182
|
-
currency: "INR",
|
|
183
|
-
status: OfferStatusValues.PENDING,
|
|
184
|
-
buyerNote: "Sandbox inbound offer — accept, counter, or decline it from your store dashboard.",
|
|
185
|
-
expiresAt: windowOffset(OUTLASTS_RUN),
|
|
186
|
-
createdAt: hoursAgo(2),
|
|
187
|
-
updatedAt: hoursAgo(2),
|
|
188
|
-
isTestData: true,
|
|
189
|
-
testDataExpiresAt: testDataExpiresAt(),
|
|
190
|
-
},
|
|
191
|
-
];
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* WHY: Shared tester sandbox — one order per OrderStatus value (9 statuses) plus one
|
|
3
|
-
* each for the non-standard order types (auction win, bundle, prize-draw win,
|
|
4
|
-
* prize-draw loss/auto-refund) so testers can see every order-management state
|
|
5
|
-
* without manually driving each one through the full checkout/shipping/return
|
|
6
|
-
* flow first. Buyer is the dedicated user-tester-qa persona. Auto-expires in 7
|
|
7
|
-
* days via testerSandboxCleanup (orders aren't cascade-deleted — see note below).
|
|
8
|
-
* Also includes one 5-item order specifically to exercise the "My Orders" /
|
|
9
|
-
* dashboard Recent Orders item-summary UI (thumbnails/title/qty for the first 3
|
|
10
|
-
* items + a "+N more" badge beyond that) — the other fixtures here are all
|
|
11
|
-
* single- or 2-item orders, which never trigger the "+N more" badge at all.
|
|
12
|
-
* WHAT: Exports ordersTesterSeedData — 14 Partial<OrderDocument> for the seed runner.
|
|
13
|
-
*
|
|
14
|
-
* NOTE: OrderDocument does not currently carry isTestData/testDataExpiresAt (unlike
|
|
15
|
-
* categories/stores/products/blogPosts/events) — testerSandboxCleanup does not
|
|
16
|
-
* cascade-delete these order documents when the parent product/store expires.
|
|
17
|
-
* They're small and harmless to leave; extending the cleanup script to cover
|
|
18
|
-
* orders is a follow-up, not blocking.
|
|
19
|
-
*
|
|
20
|
-
* EXPORTS:
|
|
21
|
-
* ordersTesterSeedData — Array of 14 Partial<OrderDocument> for the seed runner
|
|
22
|
-
*
|
|
23
|
-
* @tag domain:orders,tester
|
|
24
|
-
* @tag layer:seed
|
|
25
|
-
* @tag pattern:none
|
|
26
|
-
* @tag access:server-only
|
|
27
|
-
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
28
|
-
* @tag sideEffects:none
|
|
29
|
-
*/
|
|
30
|
-
import { seedPhoto } from "../../../seed/_helpers/media";
|
|
31
|
-
const NOW = new Date();
|
|
32
|
-
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
33
|
-
// Deterministic per-product thumbnail — see the identical helper's comment
|
|
34
|
-
// in appkit/src/seed/orders-seed-data.ts for why this doesn't need to match
|
|
35
|
-
// the real product's own seeded image.
|
|
36
|
-
function orderItemImage(productId) {
|
|
37
|
-
return seedPhoto(`order-item-${productId}`, 300, 300);
|
|
38
|
-
}
|
|
39
|
-
const BUYER_ID = "user-tester-qa";
|
|
40
|
-
const BUYER_NAME = "QA Tester";
|
|
41
|
-
const BUYER_EMAIL = "tester@letitrip.in";
|
|
42
|
-
const STORE_ID = "store-tester-sandbox";
|
|
43
|
-
const STORE_NAME = "Tester Sandbox Store";
|
|
44
|
-
const STANDARD_PRODUCT_ID = "product-tester-standard-1";
|
|
45
|
-
const STANDARD_PRODUCT_TITLE = "Test Gadget — Standard Listing #1";
|
|
46
|
-
const PRIZEDRAW_PRODUCT_ID = "prizedraw-tester-sandbox-1";
|
|
47
|
-
const PRIZEDRAW_PRODUCT_TITLE = "Test Prize Draw — Reveal Me!";
|
|
48
|
-
function standardOrder({ key, status, paymentStatus, extra }) {
|
|
49
|
-
return {
|
|
50
|
-
id: `order-tester-sandbox-standard-${key}`,
|
|
51
|
-
productId: STANDARD_PRODUCT_ID,
|
|
52
|
-
productTitle: STANDARD_PRODUCT_TITLE,
|
|
53
|
-
userId: BUYER_ID,
|
|
54
|
-
userName: BUYER_NAME,
|
|
55
|
-
userEmail: BUYER_EMAIL,
|
|
56
|
-
storeId: STORE_ID,
|
|
57
|
-
storeName: STORE_NAME,
|
|
58
|
-
items: [
|
|
59
|
-
{ productId: STANDARD_PRODUCT_ID, productTitle: STANDARD_PRODUCT_TITLE, listingType: "standard", quantity: 1, unitPrice: 199, totalPrice: 199 },
|
|
60
|
-
],
|
|
61
|
-
orderType: "standard",
|
|
62
|
-
quantity: 1,
|
|
63
|
-
unitPrice: 199,
|
|
64
|
-
totalPrice: 199,
|
|
65
|
-
currency: "INR",
|
|
66
|
-
status,
|
|
67
|
-
paymentStatus,
|
|
68
|
-
paymentMethod: "upi_manual",
|
|
69
|
-
shippingAddress: "addr-tester-qa-home",
|
|
70
|
-
orderDate: daysAgo(3),
|
|
71
|
-
createdAt: daysAgo(3),
|
|
72
|
-
updatedAt: daysAgo(1),
|
|
73
|
-
...extra,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
const _rawOrdersTesterSeedData = [
|
|
77
|
-
// ── One order per OrderStatus value (9) ──────────────────────────────────────
|
|
78
|
-
standardOrder({ key: "pending", status: "pending", paymentStatus: "pending" }),
|
|
79
|
-
standardOrder({ key: "confirmed", status: "confirmed", paymentStatus: "paid" }),
|
|
80
|
-
standardOrder({ key: "processing", status: "processing", paymentStatus: "paid" }),
|
|
81
|
-
standardOrder({
|
|
82
|
-
key: "shipped",
|
|
83
|
-
status: "shipped",
|
|
84
|
-
paymentStatus: "paid",
|
|
85
|
-
extra: {
|
|
86
|
-
trackingNumber: "TEST-TRACK-001",
|
|
87
|
-
shippingCarrier: "Test Carrier",
|
|
88
|
-
shippingDate: daysAgo(1),
|
|
89
|
-
// Real-looking passthrough URL — exercises the "opens in new tab"
|
|
90
|
-
// tracking-link case on /user/orders/[id]/track (no live courier
|
|
91
|
-
// API integration; this is exactly what a seller/admin would type in).
|
|
92
|
-
trackingUrl: "https://www.example.com/track/TEST-TRACK-001",
|
|
93
|
-
},
|
|
94
|
-
}),
|
|
95
|
-
standardOrder({
|
|
96
|
-
key: "delivered",
|
|
97
|
-
status: "delivered",
|
|
98
|
-
paymentStatus: "paid",
|
|
99
|
-
extra: { trackingNumber: "TEST-TRACK-002", shippingCarrier: "Test Carrier", shippingDate: daysAgo(2), deliveryDate: daysAgo(1) },
|
|
100
|
-
}),
|
|
101
|
-
standardOrder({
|
|
102
|
-
key: "cancelled",
|
|
103
|
-
status: "cancelled",
|
|
104
|
-
paymentStatus: "refunded",
|
|
105
|
-
extra: { cancellationDate: daysAgo(1), cancellationReason: "Disposable test cancellation — buyer changed their mind." },
|
|
106
|
-
}),
|
|
107
|
-
standardOrder({
|
|
108
|
-
key: "refunded",
|
|
109
|
-
status: "refunded",
|
|
110
|
-
paymentStatus: "refunded",
|
|
111
|
-
extra: { refundAmount: 199, refundStatus: "completed", refundNote: "Disposable test refund." },
|
|
112
|
-
}),
|
|
113
|
-
standardOrder({
|
|
114
|
-
key: "return-requested",
|
|
115
|
-
status: "return_requested",
|
|
116
|
-
paymentStatus: "paid",
|
|
117
|
-
extra: { trackingNumber: "TEST-TRACK-003", shippingDate: daysAgo(3), deliveryDate: daysAgo(2) },
|
|
118
|
-
}),
|
|
119
|
-
standardOrder({
|
|
120
|
-
key: "returned",
|
|
121
|
-
status: "returned",
|
|
122
|
-
paymentStatus: "refunded",
|
|
123
|
-
extra: {
|
|
124
|
-
trackingNumber: "TEST-TRACK-004",
|
|
125
|
-
shippingDate: daysAgo(5),
|
|
126
|
-
deliveryDate: daysAgo(4),
|
|
127
|
-
refundAmount: 199,
|
|
128
|
-
refundStatus: "completed",
|
|
129
|
-
},
|
|
130
|
-
}),
|
|
131
|
-
// ── Auction win — order created from the already-ended auction-tester-sandbox-won ──
|
|
132
|
-
{
|
|
133
|
-
id: "order-tester-sandbox-auction-win",
|
|
134
|
-
productId: "auction-tester-sandbox-won",
|
|
135
|
-
productTitle: "Test Auction — Already Won",
|
|
136
|
-
userId: BUYER_ID,
|
|
137
|
-
userName: BUYER_NAME,
|
|
138
|
-
userEmail: BUYER_EMAIL,
|
|
139
|
-
storeId: STORE_ID,
|
|
140
|
-
storeName: STORE_NAME,
|
|
141
|
-
items: [
|
|
142
|
-
{ productId: "auction-tester-sandbox-won", productTitle: "Test Auction — Already Won", listingType: "auction", quantity: 1, unitPrice: 15000, totalPrice: 15000 },
|
|
143
|
-
],
|
|
144
|
-
orderType: "auction",
|
|
145
|
-
quantity: 1,
|
|
146
|
-
unitPrice: 15000,
|
|
147
|
-
totalPrice: 15000,
|
|
148
|
-
currency: "INR",
|
|
149
|
-
status: "delivered",
|
|
150
|
-
paymentStatus: "paid",
|
|
151
|
-
paymentMethod: "upi_manual",
|
|
152
|
-
shippingAddress: "addr-tester-qa-home",
|
|
153
|
-
trackingNumber: "TEST-TRACK-AUCTION-001",
|
|
154
|
-
shippingCarrier: "Test Carrier",
|
|
155
|
-
shippingDate: daysAgo(1),
|
|
156
|
-
deliveryDate: NOW,
|
|
157
|
-
orderDate: daysAgo(1),
|
|
158
|
-
createdAt: daysAgo(1),
|
|
159
|
-
updatedAt: NOW,
|
|
160
|
-
},
|
|
161
|
-
// ── Bundle purchase — a real checkout produces ONE order item for the whole
|
|
162
|
-
// bundle (see addBundleToCartAction / checkout/actions.ts bundle-expansion),
|
|
163
|
-
// not one item per member product. Previously mis-modeled against
|
|
164
|
-
// "group-tester-sandbox-bundle" (a real standalone product that separately
|
|
165
|
-
// demonstrates the Tier-GP product-group "Set" feature, not a bundle at
|
|
166
|
-
// all) — the actual bundle is the categories row "bundle-tester-sandbox".
|
|
167
|
-
{
|
|
168
|
-
id: "order-tester-sandbox-bundle",
|
|
169
|
-
productId: "bundle-tester-sandbox",
|
|
170
|
-
productTitle: "Test Bundle",
|
|
171
|
-
userId: BUYER_ID,
|
|
172
|
-
userName: BUYER_NAME,
|
|
173
|
-
userEmail: BUYER_EMAIL,
|
|
174
|
-
storeId: STORE_ID,
|
|
175
|
-
storeName: STORE_NAME,
|
|
176
|
-
items: [
|
|
177
|
-
{
|
|
178
|
-
productId: "bundle-tester-sandbox",
|
|
179
|
-
productTitle: "Test Bundle",
|
|
180
|
-
listingType: "standard",
|
|
181
|
-
quantity: 1,
|
|
182
|
-
unitPrice: 199,
|
|
183
|
-
totalPrice: 199,
|
|
184
|
-
bundleCategorySlug: "bundle-tester-sandbox",
|
|
185
|
-
bundleProductIds: ["product-tester-standard-1", "product-tester-standard-2"],
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
orderType: "standard",
|
|
189
|
-
bundleId: "bundle-tester-sandbox",
|
|
190
|
-
isNonRefundable: true,
|
|
191
|
-
quantity: 1,
|
|
192
|
-
unitPrice: 199,
|
|
193
|
-
totalPrice: 199,
|
|
194
|
-
currency: "INR",
|
|
195
|
-
status: "processing",
|
|
196
|
-
paymentStatus: "paid",
|
|
197
|
-
paymentMethod: "upi_manual",
|
|
198
|
-
shippingAddress: "addr-tester-qa-home",
|
|
199
|
-
orderDate: daysAgo(1),
|
|
200
|
-
createdAt: daysAgo(1),
|
|
201
|
-
updatedAt: daysAgo(1),
|
|
202
|
-
},
|
|
203
|
-
// ── Prize draw — winning entry (auto reveal isn't required for this seed to be
|
|
204
|
-
// useful; it just represents the post-reveal state a real reveal would produce) ──
|
|
205
|
-
{
|
|
206
|
-
id: "order-tester-sandbox-prizedraw-win",
|
|
207
|
-
productId: PRIZEDRAW_PRODUCT_ID,
|
|
208
|
-
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
209
|
-
userId: BUYER_ID,
|
|
210
|
-
userName: BUYER_NAME,
|
|
211
|
-
userEmail: BUYER_EMAIL,
|
|
212
|
-
storeId: STORE_ID,
|
|
213
|
-
storeName: STORE_NAME,
|
|
214
|
-
items: [
|
|
215
|
-
{
|
|
216
|
-
productId: PRIZEDRAW_PRODUCT_ID,
|
|
217
|
-
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
218
|
-
listingType: "prize-draw",
|
|
219
|
-
quantity: 1,
|
|
220
|
-
unitPrice: 50,
|
|
221
|
-
totalPrice: 50,
|
|
222
|
-
prizeRevealStatus: "revealed",
|
|
223
|
-
},
|
|
224
|
-
],
|
|
225
|
-
orderType: "prize-draw",
|
|
226
|
-
prizeDrawProductId: PRIZEDRAW_PRODUCT_ID,
|
|
227
|
-
prizeRevealMode: "scheduled",
|
|
228
|
-
prizeWon: { itemNumber: 1, title: "Test Prize — Grand", images: [], wonAt: daysAgo(1) },
|
|
229
|
-
isNonRefundable: true,
|
|
230
|
-
quantity: 1,
|
|
231
|
-
unitPrice: 50,
|
|
232
|
-
totalPrice: 50,
|
|
233
|
-
currency: "INR",
|
|
234
|
-
status: "delivered",
|
|
235
|
-
paymentStatus: "paid",
|
|
236
|
-
paymentMethod: "upi_manual",
|
|
237
|
-
orderDate: daysAgo(1),
|
|
238
|
-
createdAt: daysAgo(1),
|
|
239
|
-
updatedAt: daysAgo(1),
|
|
240
|
-
},
|
|
241
|
-
// ── Prize draw — a second entry on the same closed draw, revealed to a
|
|
242
|
-
// different item. Every paid entry on a prize draw is eventually
|
|
243
|
-
// assigned some item (prizeMaxEntries === item count) — there's no
|
|
244
|
-
// "losing" outcome under the automatic-reveal model, unlike a lottery
|
|
245
|
-
// with fewer prizes than tickets. ─────────────────────────────────────
|
|
246
|
-
{
|
|
247
|
-
id: "order-tester-sandbox-prizedraw-lose",
|
|
248
|
-
productId: PRIZEDRAW_PRODUCT_ID,
|
|
249
|
-
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
250
|
-
userId: "user-admin-letitrip",
|
|
251
|
-
userName: "LetItRip Admin",
|
|
252
|
-
userEmail: "admin@letitrip.in",
|
|
253
|
-
storeId: STORE_ID,
|
|
254
|
-
storeName: STORE_NAME,
|
|
255
|
-
items: [
|
|
256
|
-
{
|
|
257
|
-
productId: PRIZEDRAW_PRODUCT_ID,
|
|
258
|
-
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
259
|
-
listingType: "prize-draw",
|
|
260
|
-
quantity: 1,
|
|
261
|
-
unitPrice: 50,
|
|
262
|
-
totalPrice: 50,
|
|
263
|
-
prizeRevealStatus: "revealed",
|
|
264
|
-
},
|
|
265
|
-
],
|
|
266
|
-
orderType: "prize-draw",
|
|
267
|
-
prizeDrawProductId: PRIZEDRAW_PRODUCT_ID,
|
|
268
|
-
prizeRevealMode: "scheduled",
|
|
269
|
-
prizeWon: { itemNumber: 2, title: "Test Prize — Runner-up", images: [], wonAt: daysAgo(1) },
|
|
270
|
-
isNonRefundable: true,
|
|
271
|
-
quantity: 1,
|
|
272
|
-
unitPrice: 50,
|
|
273
|
-
totalPrice: 50,
|
|
274
|
-
currency: "INR",
|
|
275
|
-
status: "delivered",
|
|
276
|
-
paymentStatus: "paid",
|
|
277
|
-
paymentMethod: "upi_manual",
|
|
278
|
-
orderDate: daysAgo(1),
|
|
279
|
-
createdAt: daysAgo(1),
|
|
280
|
-
updatedAt: NOW,
|
|
281
|
-
},
|
|
282
|
-
// ── Multi-item order — 5 line items so the "My Orders" list / dashboard Recent
|
|
283
|
-
// Orders widget shows real thumbnails+title+qty for the first 3 and a genuine
|
|
284
|
-
// "+2 more" badge for the rest (every other fixture above tops out at 2 items).
|
|
285
|
-
{
|
|
286
|
-
id: "order-tester-sandbox-multi-item",
|
|
287
|
-
productId: STANDARD_PRODUCT_ID,
|
|
288
|
-
productTitle: STANDARD_PRODUCT_TITLE,
|
|
289
|
-
userId: BUYER_ID,
|
|
290
|
-
userName: BUYER_NAME,
|
|
291
|
-
userEmail: BUYER_EMAIL,
|
|
292
|
-
storeId: STORE_ID,
|
|
293
|
-
storeName: STORE_NAME,
|
|
294
|
-
items: [
|
|
295
|
-
{ productId: "product-tester-standard-1", productTitle: "Test Gadget — Standard Listing #1", listingType: "standard", quantity: 1, unitPrice: 199, totalPrice: 199 },
|
|
296
|
-
{ productId: "product-tester-standard-2", productTitle: "Test Collectible — Standard Listing #2", listingType: "standard", quantity: 1, unitPrice: 149, totalPrice: 149 },
|
|
297
|
-
{ productId: "product-tester-standard-accessory-case", productTitle: "Test Accessory — Carry Case", listingType: "standard", quantity: 1, unitPrice: 99, totalPrice: 99 },
|
|
298
|
-
{ productId: "product-tester-standard-accessory-stand", productTitle: "Test Accessory — Display Stand", listingType: "standard", quantity: 2, unitPrice: 49, totalPrice: 98 },
|
|
299
|
-
{ productId: "product-tester-standard-accessory-stickers", productTitle: "Test Accessory — Sticker Set", listingType: "standard", quantity: 3, unitPrice: 19, totalPrice: 57 },
|
|
300
|
-
],
|
|
301
|
-
orderType: "standard",
|
|
302
|
-
quantity: 8,
|
|
303
|
-
unitPrice: 199,
|
|
304
|
-
totalPrice: 602,
|
|
305
|
-
currency: "INR",
|
|
306
|
-
status: "delivered",
|
|
307
|
-
paymentStatus: "paid",
|
|
308
|
-
paymentMethod: "upi_manual",
|
|
309
|
-
shippingAddress: "addr-tester-qa-home",
|
|
310
|
-
trackingNumber: "TEST-TRACK-MULTI-001",
|
|
311
|
-
shippingCarrier: "Test Carrier",
|
|
312
|
-
shippingDate: daysAgo(2),
|
|
313
|
-
deliveryDate: daysAgo(1),
|
|
314
|
-
orderDate: daysAgo(3),
|
|
315
|
-
createdAt: daysAgo(3),
|
|
316
|
-
updatedAt: daysAgo(1),
|
|
317
|
-
},
|
|
318
|
-
];
|
|
319
|
-
// Backfills image/imageUrls the same way appkit/src/seed/orders-seed-data.ts
|
|
320
|
-
// does, so tester-sandbox order fixtures also show a thumbnail on My Orders
|
|
321
|
-
// and order-detail like real post-2026-08-20 orders do.
|
|
322
|
-
export const ordersTesterSeedData = _rawOrdersTesterSeedData.map((order) => ({
|
|
323
|
-
...order,
|
|
324
|
-
imageUrls: order.imageUrls ?? (order.productId ? [orderItemImage(order.productId)] : undefined),
|
|
325
|
-
items: order.items?.map((item) => ({
|
|
326
|
-
...item,
|
|
327
|
-
image: item.image ?? orderItemImage(item.productId),
|
|
328
|
-
})),
|
|
329
|
-
}));
|