package cz.moneta.test.regression.backoffice.ufooperations.old;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.credentials.Keys;
import cz.moneta.test.dsl.util.task.ufo.operations.OperationsTasks;
import cz.moneta.test.harness.annotations.JiraTestCase;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;
import cz.moneta.test.harness.support.auth.Credentials;
import cz.moneta.test.harness.support.auth.Key;
import org.junit.jupiter.api.Disabled;

import static cz.moneta.test.harness.annotations.Environment.EDU;
import static cz.moneta.test.harness.annotations.Environment.PPE;
import static cz.moneta.test.harness.annotations.Environment.TST1;

@Disabled
@TestScenario(name = "Client detail tab panel")
public class ClientDetailTabPanel {

    @TestCase(name = "Client detail tab panel", environments = {EDU, TST1, PPE})
    @JiraTestCase(id = "BOC-T3938")
    public void clientDetailTabPanel(Harness harness, @Key(Keys.ufo.banka.banker) Credentials credentials) {
        OperationsTasks operationsTasksTasks = harness.tasks().ufo().operations();
        String rcOfExistingClient = harness.getConfig("ufo.operations.rc-of-existing-client");

        harness.withUfo()
                .openLoginPage()
                .then(operationsTasksTasks.login().withCredentials(credentials))
                .fillSearchInput(rcOfExistingClient)
                .clickRcRadio()
                .clickSearchClient()
                .onClientDetailsPage()
                .menuClickClientSale()
                .checkExpressLabelPresence()
                .menuClickClientContactInformations()
                .checkAddressTablePresence()
                .menuClickClientOffers()
                .checkActiveOffersCheckboxPresence()
                .menuClickClientRequirements()
                .checkFirstRequirementDescriptionPresence()
                .menuClickClientTasks()
                .checkTasksTablePresence()
                .menuClickClientApplications()
                .checkApplicationsRadioPresence()
                .menuClickClientNotices()
                .checkNoticesTitlePresence();
    }
}