qe-fe-automation
Version:
FE test automation framework using cypress
44 lines (40 loc) • 1.47 kB
text/typescript
import { HotelInterceptApis, HotelItinerary, Hotels } from '@hotel-lib/index';
import { Rewards } from '../lib/rewards';
import { Utility } from '@utility-lib/utility';
import { LoginPage } from '@admin-lib/login';
import { stagingUsers } from '@fixtures/staging-users';
const newUserCredentials = Cypress.env('newUser').NEW_USER_PASSWORD;
describe('Rewards: CFR - Bookings', () => {
beforeEach(() => {
LoginPage.visitTALoginPage();
LoginPage.loginWithCredentials(
stagingUsers.cfr_delegate_user.email,
newUserCredentials
);
HotelInterceptApis.interceptHotelApis();
});
it(
'C6755293: CFR + DR - Booking for Others Impersonation flow',
{ tags: ['@tier2'] },
() => {
Rewards.loginAsRewardsDelegatedUser(
'user_dafddc0e64@132b31d60f06-navanrewards.staging.tripactions.xyz'
);
Rewards.verifyBookForOthersModal();
Rewards.closeBookForOthersModal();
Utility.selectVertical('hotel');
Hotels.selectHotelLocation('Seattle, WA, United States');
Hotels.setCheckInCheckOutDate();
Hotels.searchHotel();
Rewards.verifyRewardsBadgeShown();
Rewards.selectRewardsHotel(0);
Rewards.selectRewardsRoomOption();
Rewards.checkoutRewardsRoom();
Rewards.verifyBookerRewardsCardShown();
Rewards.clickBookNow();
Rewards.waitForBookingConfirmationModal();
Rewards.validateUpsellModal();
HotelItinerary.cancelHotel();
}
);
});