//Imports here
import { ITestData } from "@business-logic/types/ITestData"
import { PaymentType } from "@business-logic/types/Enums";
import TestCase from "@business-logic/types/TestCase";
import { VehicleLookupType } from "@business-logic/types/Enums";
import { getDefaultTestData, setFakerSeedFromTestName } from "@business-logic/constants/DefaultTestData";

// Set the seed before generating any data
setFakerSeedFromTestName("CashReplaceGlassPromoInshop");

// Now get the test data with the seeded faker
const cashReplaceGlassPromoInshopData: Partial<ITestData> = {
    ...getDefaultTestData(),  // Get default data with current seed
   
    // Add promo code - key feature of this test
    promoCode: '20CALL',
   
    // Flag for recalibration vehicle
    isRecalVehicle: true,
   
    // Override vehicle details with VIN lookup
    vehicleDetails: {
        ...getDefaultTestData().vehicleDetails!,
        year: '2020',
        make: 'Ford',
        model: 'Fusion',
        style: '4 door sedan',
        vin: '3FA6P0HD8LR234510',
        vehicleLookupType: VehicleLookupType.Vin
    },
   
    // No need to override vehicleDamage as it already defaults to WindshieldCrack
   
    // Override appointment details for in-shop service
    appointmentDetails: {
        ...getDefaultTestData().appointmentDetails!,
        shopAddress: "6826 Sawmill Rd, Columbus, OH 43235"
    },
   
    // Override payment details
    paymentDetails: {
        paymentType: PaymentType.PayAtService
    }
}

const cashReplaceGlassPromoInshopTests: TestCase[] = [];

const tc = new TestCase({
    name: `CashReplaceGlassPromoInshop`,
    tags: ['@E2E','@CashReplaceGlassPromoInshop', '@test_report', '@CASH'],
    testData: cashReplaceGlassPromoInshopData
}, undefined, 'CashReplaceGlassPromoInshop');
cashReplaceGlassPromoInshopTests.push(tc);

export default cashReplaceGlassPromoInshopTests;