package cz.moneta.test.regression.risk.ufoops;

import cz.moneta.test.dsl.Harness;
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 cz.moneta.test.harness.support.auth.Credentials;
import cz.moneta.test.harness.support.auth.Key;

import static cz.moneta.test.dsl.util.credentials.Keys.ufo.banka.banker;

@TestScenario(name = "UFO OPS Risk approval screen test")
public class UfoOpsApprovalScreenTest {

    @TestCase(name = "Open Risk approval screens - client and application evaluation for an existing client/application", environments = {Environment.TST1})
    @JiraTestCase(id = "RISK-T2073")
    public void ufoOpsClientEvaluationScreenTest(Harness harness, @Key(banker) Credentials credentials) {
        harness
                .withUfo()
                .openLoginPage()
                .typeUserNameAndPasswordAndClickLogin(credentials.getUsername(), credentials.getPassword())
                .onApplicationSelectPage()
                .selectFirstOmIfPresent()
                .selectUfoOperationsAndContinueWithoutOmSelect()
                .clickSearchApRisk()
                .fillBirthNumber("6605127287")
                .clickSearch()
                .clickAP("230224N07B")
                .clickApprovalDataButton()
                .clickClientEvaluationLink()
                .clickApplicationEvaluationLink()
                .clickEssExposureDetailLink()
                .clickEssMemberExposureDetailLink();
    }
}