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.data.client.NonClient;
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 create new building savings")
public class CreateNewCustomerWithBuildingSavings {

    @Disabled("Rozsáhlý vývoj stavebního spoření na UFO Bance")
    @TestCase(name = "Teller must be able to create new building savings", environments = {TST1, PPE, EDU})
    @JiraTestCase(id = "POB-T10630")
    public void create_new_building_savings(Harness harness, @Key("ufo-banka-banker") Credentials credentials) {
        NonClient clientTestData = harness.data().newNonClient();
        BankaTasks bankaTasks = harness.tasks().ufo().banka();

        harness.withUfo()
                .openLoginPage()
                .then(bankaTasks.login().withCredentialsAndTurnOffSignpad(credentials))
                .then(bankaTasks.newClient().create(clientTestData, credentials.getUsername()))
                .then(bankaTasks.newProduct().createNewBuildingSavings("Smlouva je u MMB"));
    }
}