qe-fe-automation
Version:
FE test automation framework using cypress
31 lines (26 loc) • 824 B
text/typescript
import { TeamEventParamsStringInvitees } from '@group-events-lib/interface';
export function generateEventData(teamEventParams: TeamEventParamsStringInvitees) {
const { eventName, locationType, startDate, endDate, placeId } = teamEventParams;
return {
name: eventName,
locationType: locationType,
start: startDate,
end: endDate,
type: 'GROUP_TRAVEL',
location: {
companyOfficeId: null,
placeId: placeId,
type: locationType
}
};
}
export function generateParticipantDataWithCarsTrains(item: any) {
const updatedItem = structuredClone(item);
updatedItem.travelConditions.transportation.trainConditions = {
numberOfBookingsAllowed: 1
};
updatedItem.travelConditions.transportation.carConditions = {
numberOfBookingsAllowed: 1
};
return updatedItem;
}