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.ufo.banka.tasks.accountenums.CurrentAccountsEnum;
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 = "Teller must be able to crate a new employee with BU Akonto")
public class CreateNewEmployeeWithBUAkonto {

    @TestCase(name = "Bank teller is able to login and create a new employee with BU Akonto", environments = {TST1, PPE, EDU})
    @JiraTestCase(id = "POB-T18677")
    public void tcBankTellerIsAbleCreateNewEmployeeWithBuAkonto(Harness harness, @Key(Keys.ufo.banka.banker) Credentials banker) {
        BankaTasks tasks = harness.tasks().ufo().banka();
        harness.withUfo()
                .openLoginPage()
                .then(tasks.login().withCredentialsAndTurnOffSignpad(banker))
                .then(tasks.newClient().create(harness.data().newFVNonClientEmployee(), banker.getUsername()))
                .then(tasks.newProduct().createNewCurrentAccountWithSelectProduct(CurrentAccountsEnum.AKONTO_PRODUCT));
    }
}
