package cz.moneta.test.regression.commercial.cb.archive;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.task.ufo.cb.CommercialTasks;
import cz.moneta.test.harness.annotations.Environment;
import cz.moneta.test.harness.annotations.JiraTestCase;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;
import org.junit.jupiter.api.Disabled;

import static cz.moneta.test.dsl.util.task.ufo.cb.CommercialTasks.JIRA_COMMENT_STORE_KEY;

@Disabled
@TestScenario(name = "Test checks client details")
public class CheckClientDetailPage {

    @TestCase(name = "Check if client card details are ok", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "SC-T364")
    public void checkClientCard(Harness harness) {
        String ico = harness.getConfig("commercial.cb.ico");
        CommercialTasks tasks = harness.tasks().ufo().cb();
        harness.store(JIRA_COMMENT_STORE_KEY, String.format("ICO: %s <br>", ico));
        harness.withUfo()
                .openLoginPage()
                .then(tasks.loginAsCbBanker())
                .then(tasks.searchClient(ico))
                .clickClientCard()
                .checkElementClientCard()
                .clickCardIsChecked();
    }
}
