qe-fe-automation
Version:
FE test automation framework using cypress
33 lines (31 loc) • 1.08 kB
text/typescript
import {
buildPassengerInfo,
buildPaymentMethod,
Employee,
generateBookingId,
getFiveDaysAgoDate,
getOneMonthAheadDate,
getOneMonthAndHalfAheadDate
} from '@fixtures/navan_pro/reed_mackay_booking/common';
import { faker } from '@faker-js/faker';
export const buildHotelForEmployee = (employee: Employee) => {
return {
bookingStatus: 'CONFIRMED',
bookingId: generateBookingId(),
employeeId: employee.uuid,
amount: faker.datatype.number({ max: 1000, min: 20 }),
cancelable: faker.datatype.boolean(),
currency: 'GBP',
serviceFee: faker.datatype.number({ max: 100 }),
confirmationNumber: faker.datatype.number({ max: 99999999999 }),
hotelName: '1 CRAVEN HILL GARDENS-ID466960',
hotelNameEn: '1 CRAVEN HILL GARDENS-ID466960',
address: '1 CRAVEN HILL GARDENS, LO, W2 3ES, England',
orderDateTime: getFiveDaysAgoDate(),
startTime: getOneMonthAheadDate(),
endTime: getOneMonthAndHalfAheadDate(),
personal: false,
paymentMethod: buildPaymentMethod(),
clientInfo: [buildPassengerInfo(employee)]
};
};