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

import cz.moneta.dataprepare.CustomerDataPrepare;
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;

@TestScenario(name = "Teller must be able to crate a new customer with SU")
public class CreateNewCustomerWithSU extends CustomerDataPrepare {

    @Disabled
    @TestCase(name = "Bank teller is able to login and create a new customer with SU", environments = {TST1, PPE, EDU})
    @JiraTestCase(id = "POB-T19492")
    public void tc_bank_teller_is_able_create_new_customer_with_SU(Harness harness, @Key(Keys.ufo.banka.banker) Credentials banker) {
        BankaTasks withBanka = harness.tasks().ufo().banka();
        harness.withUfo()
                .openLoginPage()
                .then(withBanka.login().withCredentialsAndTurnOffSignpad(banker))
                .then(withBanka.search().findByCif(newCustomerCif))
                .then(withBanka.newProduct().createNewSavingsAccount("Spořící účet"));
    }
}

