qe-fe-automation
Version:
FE test automation framework using cypress
30 lines (28 loc) • 993 B
text/typescript
import {
CancellationFlow,
TrainSearchModalUtil,
TrainTripType,
DeutscheBahnBookingParams,
TrainBookingManager,
AgencyCurrency,
TrainItinerary
} from '@train-lib/index';
describe('Train: Deutsche Bahn roundtrip cancellation workflow', () => {
it('C473867: Should be able to book round train ticket', { tags: ['@db', '@all_train_test'] }, () => {
TrainSearchModalUtil.createCompanyWithProviderName({
feeModelInfo: AgencyCurrency.Euro
});
TrainBookingManager.createFirstClassBooking({
origin: DeutscheBahnBookingParams.Location.Berlin,
destination: DeutscheBahnBookingParams.Location.Munich,
trainClass: true,
fareType: DeutscheBahnBookingParams.FareType.FIRST_CLASS,
tripType: TrainTripType.ROUND_TRIP
});
TrainItinerary.expectETicketIsDownloadable();
CancellationFlow.executeTrainCancellation(
'We will send your e-ticket(s) to your email and Navan mobile app',
TrainTripType.ROUND_TRIP
);
});
});