qe-fe-automation
Version:
FE test automation framework using cypress
48 lines (44 loc) • 1.52 kB
text/typescript
import { LoginPage } from '@admin-lib/index';
import { FlightCheckout, FlightInterceptApis, FlightTripType } from '@flight-lib/index';
import {
FlightUtility,
LoyaltyInfo,
LoyaltyCustomerType,
LoyaltyName,
LoyaltyPricingModel,
FlightBookingUtility
} from '@flight-modal/index';
import { Provider_Type, User_Type } from '@support-onboard/index';
import { LocationUtility, Utility } from '@utility-lib/index';
describe('Affiliate: Loyalty Drop Modal', () => {
beforeEach(() => {
const loyaltyInfo: LoyaltyInfo = {
name: LoyaltyName.LHG,
values: {
pricingModel: LoyaltyPricingModel.PAID,
loyaltyCustomerType: LoyaltyCustomerType.AFFILIATE
}
};
LoginPage.createNewCompanyAndLoginWithUserByType({
providers: [Provider_Type.SABRE_FLIGHT],
users: [User_Type.TRAVELER],
loyaltyInfo: loyaltyInfo
});
FlightInterceptApis.interceptFlightsApis();
});
it(
'C4073279: should open one time drop modal when user is trying to navigate out from checkout',
{ tags: ['@tier1'] },
() => {
const flightParams = FlightBookingUtility.initFlightBookingParams({
flightTripType: FlightTripType.ONEWAY,
locations: LocationUtility.getPairOfOriginAndDestinationAirportsUS()
});
FlightUtility.searchFlowToCheckout(flightParams);
Utility.selectNavItem('TRIPS');
FlightCheckout.confirmDropSecureModal();
Utility.selectNavItem('TRIPS');
FlightCheckout.isSecuredModalRemoved();
}
);
});