import {
  TrainSearchModalUtil,
  TrainTripType,
  TrainBookings,
  AmtrakBookingParams,
  TrainItinerary
} from '@train-lib/index';

describe('Train: Amtrak one way booking', () => {
  it(
    'C473862: Should be able to book a one way train ticket with bus connection',
    { tags: ['@amtrak', '@all_train_test'] },
    () => {
      TrainSearchModalUtil.createCompanyWithProviderName({});
      const tripType = TrainTripType.ONEWAY;

      TrainBookings.createBooking({
        origin: AmtrakBookingParams.Location.Washington,
        destination: AmtrakBookingParams.Location.Norfolk,
        tripType
      });
      TrainItinerary.expectTrainDepartureDateIsCorrect();
      cy.contains('We advise you to print your e-ticket(s) for this route.');
    }
  );
});
