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

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.task.ufo.cb.CommercialTasks;
import cz.moneta.test.harness.annotations.JiraTestCase;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;

@TestScenario(name = "Verify Loading of Screens")
public class VerifyLoadingOfScreens {

    @TestCase(name = "Verify Loading of Screens")
    @JiraTestCase(id = "SC-T2218")
    public void verifyLoadingOfScreens(Harness harness) {

        //these proposals are asigned on clients which are asigned to GEBTHA6 (jenkins user) need to change for local testing
        String proposalId = harness.getConfig("commercial.cb.proposal-id");

        CommercialTasks commercialTasks = harness.tasks().ufo().cb();
        harness.withUfo()
                .openLoginPage()
                .then(commercialTasks.loginAsCbBanker())
                .selectProposal(proposalId)
                .clickProcessButton()
                .clickSaveSignPost()
                .clickProposalPart("Obchod - zákl. parametry")
                .clickSignPost()
                .clickRelations()
                .then(commercialTasks.checkLoadOfScreens())
                .clickPreviousPage();
    }
}
