qe-fe-automation
Version:
FE test automation framework using cypress
38 lines (32 loc) • 1.16 kB
text/typescript
import { LoginPage } from '@admin-lib/index';
import {
HotelInterceptApis,
Hotels,
HotelCheckout,
HotelSearchResults
} from '@hotel-lib/index';
import { LocationUtility } from '@utility-lib/index';
const newUserCredentials = Cypress.env('newUser').NEW_USER_PASSWORD;
describe('Hotel: Delegate booking', () => {
beforeEach(() => {
LoginPage.loginAsCompanyDelegate(newUserCredentials);
HotelInterceptApis.interceptHotelApis();
});
it('C49928: should be able to book hotel as delegate', { tags: ['@tier1'] }, () => {
Hotels.visitHotelSearch();
Hotels.selectOneTraveller();
Hotels.setCheckInCheckOutDate();
Hotels.selectHotelLocation(LocationUtility.getCityUS());
Hotels.searchHotel();
HotelSearchResults.selectHotel(0);
HotelSearchResults.selectRoomOption();
HotelCheckout.waitToBeLoaded();
HotelCheckout.setTripInfo();
HotelCheckout.acceptHotelBookingPolicy();
HotelCheckout.setPhoneNumber();
HotelCheckout.checkIfProofOfVaccineRequired();
HotelCheckout.acceptAcknowledgement();
HotelCheckout.bookNow();
HotelCheckout.expectHotelBookedSuccessfully('Hotel confirmed!');
});
});