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 loads all client trades and proposals")
public class LoadAllTradesAndProposals {

    @TestCase(name = "Check flow and loads in trade and proposals", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "SC-T376")
    public void checkFlowInTradeAndProposals(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))
                .clickAllTrades()
                .checkElementListOfTrades()
                .clickBack();
    }
}
