UNPKG

qe-fe-automation

Version:
84 lines (76 loc) 2.94 kB
import { LoginPage } from '@admin-lib/index'; import { User_Type } from '@support-onboard/index'; import { buildBlackCarTripForEmployee, buildCarTripForEmployee, buildFlightTripForEmployee, buildHotelTripForEmployee, buildMultipleVerticalsTripForEmployee, buildRailTripForEmployee } from '@fixtures/navan_pro/reed_mackay_booking/trip_data'; import { checkSuccessfulCallToImportEndpoint } from '@support-navan-pro/lib'; describe('Navan Pro: Reed Mackay import endpoint', () => { beforeEach(() => { LoginPage.createNewCompanyAndLoginWithUserByType({ users: [User_Type.ADMIN] }); }); it.skip( 'C3851095: Is able to successfully ingest a flight trip when the payload contains only one flight', { tags: ['@tier4'] }, () => { cy.task('getDataFromCache', 'userResponse').then(({ uuid, email }: any) => { const tripData = buildFlightTripForEmployee({ email, uuid }); checkSuccessfulCallToImportEndpoint(tripData); }); } ); it.skip( 'C3863920: Is able to successfully ingest a rail booking when the payload contains only one rail', { tags: ['@tier4'] }, () => { cy.task('getDataFromCache', 'userResponse').then(({ uuid, email }: any) => { const tripData = buildRailTripForEmployee({ email, uuid }); checkSuccessfulCallToImportEndpoint(tripData); }); } ); it.skip( 'C3863921: Is able to successfully ingest a hotel trip when the payload contains only one hotel', { tags: ['@tier4'] }, () => { cy.task('getDataFromCache', 'userResponse').then(({ uuid, email }: any) => { const tripData = buildHotelTripForEmployee({ email, uuid }); checkSuccessfulCallToImportEndpoint(tripData); }); } ); it.skip( 'C3863922: Is able to successfully ingest a car trip when the payload contains only one car', { tags: ['@tier4'] }, () => { cy.task('getDataFromCache', 'userResponse').then(({ uuid, email }: any) => { const tripData = buildCarTripForEmployee({ email, uuid }); checkSuccessfulCallToImportEndpoint(tripData); }); } ); it.skip( 'C3863923: Is able to successfully ingest a black car trip when the payload contains only one black car', { tags: ['@tier4'] }, () => { cy.task('getDataFromCache', 'userResponse').then(({ uuid, email }: any) => { const tripData = buildBlackCarTripForEmployee({ email, uuid }); checkSuccessfulCallToImportEndpoint(tripData); }); } ); it.skip( 'C3864367: Is able to successfully ingest a trip with multiple verticals when the payload contains multiple verticals that are valid', { tags: ['@tier4'] }, () => { cy.task('getDataFromCache', 'userResponse').then(({ uuid, email }: any) => { const tripData = buildMultipleVerticalsTripForEmployee({ email, uuid }); checkSuccessfulCallToImportEndpoint(tripData); }); } ); });