qe-fe-automation
Version:
FE test automation framework using cypress
33 lines (30 loc) • 968 B
text/typescript
import {
CancellationFlow,
TrainSearchModalUtil,
TrainTripType,
TrenItaliaBookingParams,
TrainBookingManager,
AgencyCurrency
} from '@train-lib/index';
describe('Train: Trenitalia oneway cancellation workflow', () => {
it(
'C48354: Should be able to book and cancel one way train ticket',
{ tags: ['@trainitalia', '@all_train_test'] },
() => {
TrainSearchModalUtil.createCompanyWithProviderName({
feeModelInfo: AgencyCurrency.Euro
});
TrainBookingManager.createFirstClassBooking({
origin: TrenItaliaBookingParams.Location.Rome,
destination: TrenItaliaBookingParams.Location.Milan,
trainClass: true,
fareType: TrenItaliaBookingParams.FareType.FIRST_CLASS,
tripType: TrainTripType.ONEWAY
});
CancellationFlow.executeTrainCancellation(
'We will send your e-ticket(s) to your email and Navan mobile app',
TrainTripType.ONEWAY
);
}
);
});