import { FlightBookingUtility, FlightUtility } from '@flight-modal/index';
import { FlightTripType } from '@flight-lib/index';
import { User_Type } from '@support-onboard/index';
import { LocationUtility } from '@utility-lib/index';

describe('Flight: One way flight edit search', () => {
  it('C351748: Traveler searches again from results page', { tags: ['@tier1'] }, () => {
    FlightUtility.prepareCompanyAndUserCreation(User_Type.TRAVELER);
    const flightBookingParams = FlightBookingUtility.initFlightBookingParams({
      locations: LocationUtility.getPairOfOriginAndDestinationAirportsUS(),
      flightTripType: FlightTripType.ONEWAY,
      tripTileType: 'Business'
    });
    FlightUtility.runSearchFlow(flightBookingParams);
    const newAirports = LocationUtility.getPairOfOriginAndDestinationAirportsUS();
    FlightUtility.runSearchFlowFormSearchResult(newAirports[0], newAirports[1]);
  });
});
