"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const test_1 = require("@playwright/test");
const _setup_1 = require("../../test-setup.js");
const _8_7_1 = require("../../fixtures/8.7");
const sleep_1 = require("../../utils/sleep");
_8_7_1.test.describe.configure({ mode: 'parallel' });
_8_7_1.test.describe('Login Tests', () => {
    _8_7_1.test.beforeEach(async ({ page }, testInfo) => {
        await page.goto('/');
        await (0, sleep_1.sleep)((testInfo.workerIndex + 1) * 1000);
    });
    _8_7_1.test.afterEach(async ({ page }, testInfo) => {
        await (0, _setup_1.captureScreenshot)(page, testInfo);
        await (0, _setup_1.captureFailureVideo)(page, testInfo);
    });
    (0, _8_7_1.test)('Basic Login', async ({ loginPage, homePage }) => {
        await loginPage.fillUsername(process.env.C8_USERNAME);
        await (0, test_1.expect)(loginPage.usernameInput).toHaveValue(process.env.C8_USERNAME);
        await (0, test_1.expect)(loginPage.loginMessage).toBeVisible();
        await loginPage.clickContinueButton();
        await loginPage.fillPassword(process.env.C8_PASSWORD);
        await (0, test_1.expect)(loginPage.passwordHeading).toBeVisible();
        await loginPage.clickLoginButton();
        await (0, test_1.expect)(homePage.consoleBanner).toBeVisible({ timeout: 90000 });
    });
});
