import { User_Type } from '@support-onboard/data_model/user_type';
import { HelpCenter } from '@helpcenter-lib/helpcenter';
import {
  ChatApiIntercept,
  ChatBooking,
  ChatBox,
  TravelType,
  CSat,
  Banner
} from '@chat-lib/index';
import { Hotels } from '@hotel-lib/search';
import { LocationUtility } from '@utility-lib/location';

describe('Chat: Car booking', () => {
  it.skip('C9088103: Use chat to book car', { tags: ['@tier2'] }, () => {
    const daysToMove = { daysToMove: 8, daysAfterMovedDays: 2 };
    ChatApiIntercept.interceptChatApis();
    Hotels.prepareCompanyAndUserCreation(User_Type.ADMIN);
    HelpCenter.visitPage();
    ChatBox.openChatWithAva();
    ChatBox.selectBookTravelFlow(TravelType.CAR);
    ChatBooking.bookCar(
      LocationUtility.getGeneralRentalCarLocation(),
      LocationUtility.getGeneralRentalCarLocation(),
      daysToMove
    );
    CSat.submitCSatScore(5);
    CSat.expectCSatScoreSubmitted(5);
    CSat.skipAndConnetWithAgent();
    Banner.expectBannerContainsText('An agent will be with you shortly.');
  });
});
