import { LoginPage } from '@admin-lib/index';
import { stagingUsers } from '@fixtures/staging-users';
import { HomePage } from '@rebranded_home_page-lib/home-page';
import { PersonalHomeScreen } from '../../lib/personal_homescreen';
import { RentalCarInterceptApis } from '@rentalCar-lib/api-intercept';
import { ProfileInterceptApis } from '@profile-lib/api-intercept';
const newUserCredentials = Cypress.env('newUser').NEW_USER_PASSWORD;
describe('Personal Travel: Personal-only accounts', () => {
  beforeEach(() => {
    LoginPage.visitTALoginPage();
    LoginPage.loginWithCredentials(
      stagingUsers.personal_only_user.email,
      newUserCredentials
    );
    RentalCarInterceptApis.interceptRentalCarApis();
    ProfileInterceptApis.interceptProfileApis();
  });

  it(
    'C4678768: Book a rental car for personal only account',
    { tags: ['@tier2'] },
    () => {
      HomePage.expandSearchForm();
      PersonalHomeScreen.bookPersonalCar();
    }
  );
});
