import { HotelInterceptApis, Hotels } from '@hotel-lib/index';
import { stagingUsers } from '@fixtures/staging-users';

const { adminEmail } = stagingUsers.admin_events_page;
const adminCredentials = Cypress.env('eventPage').EVENT_USER_PASSWORD;

describe('Hotel: Policy modal is visible', () => {
  it(
    'C9578831: My hotel policy modal is visible on Home and Search page ',
    { tags: ['@tier3'] },
    () => {
      HotelInterceptApis.interceptHotelApis();
      const costPolicyOptionText =
        'Book below the maximum price shown at the top of your search';
      cy.loginWithAuthToken({
        email: adminEmail,
        password: adminCredentials,
        isSA: true
      });
      Hotels.visitHotelSearch();
      Hotels.verifyHotelPolicyModalIsVisible(costPolicyOptionText);
    }
  );
});
