I have been trying to verify the GET status using the following code. Unfortunately, I am getting an error "apiRequestContext.get: connect ECONNREFUSED ::1:8080". Any insight would be much appreciated.
Code:
import { expect, test } from '@playwright/test';
test('Get health status', async ({ request }) => {
const response = await request.get('http://localhost:8080/myapp/actuator/health')
expect(response.status()).toBe(200)
})
Error: apiRequestContext.get: connect ECONNREFUSED ::1:8080
await request.get('http://localhost:8080/myapp/actuator/health', verify=False)