package cz.moneta.test.regression.channels.branch.archive;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.ufo.banka.tasks.BankaTasks;
import cz.moneta.test.dsl.util.credentials.Keys;
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 = "Check Calculator Functionality")
public class CheckCalculatorFunctionality {

    @TestCase(name = "Check Calculator Functionality", environments = {TST1, PPE, EDU})
    @JiraTestCase(id = "POB-T10626")
    public void tc_check_calculator_functionality(Harness harness, @Key(Keys.ufo.banka.banker) Credentials credentials) {
        BankaTasks bankaTasks = harness.tasks().ufo().banka();
        String name = "Jan Palach";
        String clientType = "Standard";
        String amount = "50000";
        String numberOfPayments = "50";
        String insurance = "Bez pojištění";

        harness.withUfo()
                .openLoginPage()
                .then(bankaTasks.login().withCredentialsAndTurnOffSignpad(credentials))
                .clickCalculators()
                .chooseExpresCalculator()
                .fillName(name)
                .selectClientType(clientType)
                .clickProduct()
                .fillAmount(amount)
                .selectNumberOfPayments(numberOfPayments)
                .selectInsurance(insurance)
                .clickCalculate()
                .checkLoanFeeCalculated();
    }
}

