11import { expect , test } from "@playwright/test" ;
2+ import { MI_ENDPOINT } from "tests/constants/api-constants" ;
23import {
34 createHeaderWithNoCorrelationId ,
45 createInvalidRequestHeaders ,
@@ -11,29 +12,30 @@ import {
1112 isGetMIResponse ,
1213} from "../../helpers/generate-fetch-test-data" ;
1314import { miValidRequest } from "./testCases/create-mi" ;
14- import { MI_ENDPOINT } from "tests/constants/api-constants" ;
1515
1616let baseUrl : string ;
1717let insertedId : string ;
1818let insertedTimestamp : string ;
1919
20- test . beforeAll ( async ( { request } ) => {
21- baseUrl = await getRestApiGatewayBaseUrl ( ) ;
22- const headers = createValidRequestHeaders ( ) ;
23- const body = miValidRequest ( ) ;
20+ test . beforeAll ( async ( { request } ) => {
21+ baseUrl = await getRestApiGatewayBaseUrl ( ) ;
22+ const headers = createValidRequestHeaders ( ) ;
23+ const body = miValidRequest ( ) ;
2424
25- const response = await request . post ( `${ baseUrl } /${ MI_ENDPOINT } ` , {
26- headers,
27- data : body ,
28- } ) ;
25+ const response = await request . post ( `${ baseUrl } /${ MI_ENDPOINT } ` , {
26+ headers,
27+ data : body ,
28+ } ) ;
2929
30- const miResponseBody = await response . json ( ) ;
31- insertedId = miResponseBody . data . id ;
32- insertedTimestamp = miResponseBody . data . attributes . timestamp ;
30+ const miResponseBody = await response . json ( ) ;
31+ insertedId = miResponseBody . data . id ;
32+ insertedTimestamp = miResponseBody . data . attributes . timestamp ;
3333} ) ;
3434
3535test . describe ( "API Gateway Tests To Get MI data" , ( ) => {
36- test ( "GET /mi should return 200 and MI data for specified id" , async ( { request } ) => {
36+ test ( "GET /mi should return 200 and MI data for specified id" , async ( {
37+ request,
38+ } ) => {
3739 const headers = createValidRequestHeaders ( ) ;
3840 const { responseBody, statusCode } = await getMI (
3941 insertedId ,
0 commit comments