import {
  TrainSearchModalUtil,
  TrainTripType,
  SncfBookingParams,
  TrainBookingManager,
  TrainItinerary,
  AgencyCurrency
} from '@train-lib/index';

describe('Train: SNCF oneway Seat selection using SeatMap', () => {
  it(
    'C473860: Should be able to select a seat using a seat map and book a train ticket',
    { tags: ['@sncf', '@all_train_test', '@france'] },
    () => {
      const oneWay = TrainTripType.ONEWAY;

      TrainSearchModalUtil.createCompanyWithProviderName({
        feeModelInfo: AgencyCurrency.Euro
      });

      TrainBookingManager.createFirstClassBooking({
        origin: SncfBookingParams.Location.Paris,
        destination: SncfBookingParams.Location.Lyon,
        fareType: SncfBookingParams.FareType.FIRST_CLASS,
        trainClass: true,
        tripType: oneWay,
        SeatMap: true
      });
      TrainItinerary.expectSeatMapDetailsArePresent(oneWay);
      TrainItinerary.expectETicketIsDownloadable();
    }
  );
});
