All files / src/lib/data/mocks index.ts

0% Statements 0/100
100% Branches 0/0
0% Functions 0/1
0% Lines 0/100

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101                                                                                                                                                                                                         
/**
 * Mock Data Index for E2E Testing
 * Central export for all mock data used when USE_MOCK_DATA=true
 */

export { mockHeroData } from './hero.mock';

// Mock products matching the e2e fixtures format
export const mockProducts = [
  {
    id: 1,
    title: "Premium Event Package",
    slug: "premium-event-package",
    description: "Everything you need for your special event",
    price: 299.99,
    discountedPrice: 249.99,
    stock: 50,
    sku: "EVT-001",
    categoryId: 1,
    createdAt: new Date("2024-01-01"),
    updatedAt: new Date("2024-01-01"),
    images: [
      { id: 1, url: "/images/placeholder.jpg", thumbnailUrl: "/images/placeholder.jpg", order: 1 },
    ],
    category: { id: 1, title: "Events", slug: "events" },
    reviews: [],
    details: "[]",
    metaTitle: null,
    metaDescription: null,
    metaKeywords: null,
  },
  {
    id: 2,
    title: "Deluxe Decoration Set",
    slug: "deluxe-decoration-set",
    description: "Transform any space into a celebration",
    price: 149.99,
    discountedPrice: null,
    stock: 100,
    sku: "EVT-002",
    categoryId: 1,
    createdAt: new Date("2024-01-02"),
    updatedAt: new Date("2024-01-02"),
    images: [
      { id: 2, url: "/images/placeholder.jpg", thumbnailUrl: "/images/placeholder.jpg", order: 1 },
    ],
    category: { id: 1, title: "Events", slug: "events" },
    reviews: [],
    details: "[]",
    metaTitle: null,
    metaDescription: null,
    metaKeywords: null,
  },
  {
    id: 3,
    title: "Party Essentials Bundle",
    slug: "party-essentials-bundle",
    description: "All the essentials for a great party",
    price: 79.99,
    discountedPrice: 59.99,
    stock: 75,
    sku: "EVT-003",
    categoryId: 2,
    createdAt: new Date("2024-01-03"),
    updatedAt: new Date("2024-01-03"),
    images: [
      { id: 3, url: "/images/placeholder.jpg", thumbnailUrl: "/images/placeholder.jpg", order: 1 },
    ],
    category: { id: 2, title: "Party Supplies", slug: "party-supplies" },
    reviews: [],
    details: "[]",
    metaTitle: null,
    metaDescription: null,
    metaKeywords: null,
  },
];

export const mockCategories = [
  { id: 1, title: "Events", slug: "events", description: "Event supplies", image: null, parentId: null },
  { id: 2, title: "Party Supplies", slug: "party-supplies", description: "Party items", image: null, parentId: null },
];

export const mockReviews = [
  {
    id: 1,
    productId: 1,
    userId: "user-1",
    rating: 5,
    title: "Great product!",
    comment: "Loved everything about this package.",
    createdAt: new Date("2024-01-10"),
    updatedAt: new Date("2024-01-10"),
    user: { id: "user-1", name: "Test User", email: "test@example.com" },
  },
];

// Check if mock mode is enabled
export function isMockMode(): boolean {
  return process.env.USE_MOCK_DATA === 'true';
}