"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const c8Run_8_7_1 = require("../../fixtures/c8Run-8.7");
const apiHelpers_1 = require("../../utils/apiHelpers");
const sleep_1 = require("../../utils/sleep");
const _setup_1 = require("../../test-setup.js");
if (process.env.RUN_AS_DOCKER_COMPOSE != 'true') {
    c8Run_8_7_1.test.beforeAll(async () => {
        await (0, apiHelpers_1.authC8runAPI)('demo', 'demo');
        await (0, sleep_1.sleep)(5000);
    });
    c8Run_8_7_1.test.describe.parallel('API tests', () => {
        c8Run_8_7_1.test.afterEach(async ({ page }, testInfo) => {
            await (0, _setup_1.captureScreenshot)(page, testInfo);
            await (0, _setup_1.captureFailureVideo)(page, testInfo);
        });
        c8Run_8_7_1.test.use({ storageState: 'utils/.auth' });
        (0, c8Run_8_7_1.test)('Get connectors status', async ({ request }) => {
            const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL + '/actuator/health');
            await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
        });
        (0, c8Run_8_7_1.test)('Get a inbound connectors list', async ({ request }) => {
            const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL + '/inbound');
            await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
        });
    });
}
