package cz.moneta.test.dataprepare.risk.creditcard;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.ufo.banka.pages.cards.credit.CardBrand;
import cz.moneta.test.dsl.ufo.banka.pages.cards.credit.ProductType;
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 = "Test for Risk Retail - Data preparation")
public class CreditCardCreditAccount extends DefaultCreditCard {

    @TestCase(name = "New client with Credit Account")
    public void newClientWithCreditAccount(Harness harness, @Key(banker) Credentials credentials) {
        ProductType productType = ProductType.CREDIT_ACCOUNT;
        CardBrand cardBrand = CardBrand.VISA_CLASSIC;

        bankaTasks.newProduct().createClientWithIb(harness, credentials, applicant)
                .then(bankaTasks.newProduct().createSBA())
                .then(bankaTasks.cardsOnboarding().creditCards().createAndActivateCreditCard(applicant, LOAN_AMOUNT, productType, cardBrand));
    }
}