qe-fe-automation
Version:
FE test automation framework using cypress
31 lines (27 loc) • 1.29 kB
text/typescript
import { FlightTripType } from '@flight-lib/search';
import { LocationUtility } from '@utility-lib/location';
import { BookingUtility } from '@chat-lib/booking-model';
import { Directions, FlightBookingData } from '@chat-lib/booking';
import { ChatBox } from '@chat-lib/index';
import { FlightBookingParams, FlightBookingUtility } from '@flight-modal/index';
describe('Chat: Flight booking', () => {
it.skip('C7447617: Ava IQ ask about near trip', { tags: ['@tier2'] }, () => {
const flightBookingParams: FlightBookingParams =
FlightBookingUtility.initFlightBookingParams({
locations: LocationUtility.getPairOfOriginAndDestinationAirportsUSWithShortName(),
flightTripType: FlightTripType.ONEWAY,
tripTileType: 'Business'
});
const flightBookingData: FlightBookingData = {
flightBookingParams: flightBookingParams,
departingFrom: Directions.FROM,
arrivingAt: Directions.TO,
isChangeFlight: false
};
const daysToMove = { daysToMove: 0, daysAfterMovedDays: 0 };
BookingUtility.createFlightBookingAndClearSession(flightBookingData, daysToMove, 1);
ChatBox.needHelpByChat();
ChatBox.waitUntilChatLoaderDisappears();
ChatBox.expectMsgReceivedFromAva('I see you have an upcoming flight in');
});
});