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 = "Sts table")
public class StsTable {

    @TestCase(name = "Sts table", environments = {EDU, TST1, PPE})
    @JiraTestCase(id = "BOC-T3948")
    public void sts(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");

        String contractState = "Stav smlouvy:";

        harness.withUfo()
                .openLoginPage()
                .then(operationsTasksTasks.login().withCredentials(credentials))
                .fillSearchInput(rcOfExistingClient)
                .clickSearchClient()
                .onClientDetailsPage()
                .clickTreeCreditCard()
                .assertContractState(contractState)
                .clickAccountList()
                .assertAccountProduct("98-BÚ-FO- KONTO GENIUS /R/")
                .clickAdcList()
                .assertAdcProductList("Logovací jméno:")
                .clickCreditCardList()
                .assertContractState(contractState);
    }
}