package cz.moneta.test.regression.channels.digital.ib.oldib.templates;

import cz.moneta.test.dsl.Harness;
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 cz.moneta.test.harness.support.data.GeneratorType;
import org.junit.jupiter.api.Disabled;

import static cz.moneta.test.harness.annotations.Environment.PPE;
import static cz.moneta.test.harness.annotations.Environment.TST1;

@TestScenario(name = "Verify Create Template foreign payment between MMB accounts")
public class TemplateForeignBetweenMMBAccounts {

    @Disabled
    @TestCase(name = "Go to templates page and create template payment between MMB accounts",environments = {TST1, PPE})
    @JiraTestCase(id = "IB-T8249")
    void userWithCurrentAccount_shouldCreateTemplateBetweenMMBAccounts(Harness harness, @Key("ib.client") Credentials credentials) {
        harness.withIB()
                .openLoginPage()
                .then(harness.tasks().ib().loginWithDefaultMobileKeyAnd(credentials))
                .clickAccountsAndTransactions()
                .clickTemplatesSetting()
                .clickNewTemplate()
                .clickTypePayment()
                .fillTemplateName(harness.generate(GeneratorType.ICO))
                .clickAccountSelect()
                .fillPartnerAccount("123")
                .clickCheckButton()
                .fillTemplateAmount("1")
                .clickDetailUrl()
                .fillTemplateVs("183")
                .fillTemplateCs("58")
                .fillTemplateSs("126")
                .clickCurrencySelect()
                .fillRecipientMsg("Testovací zpráva")
                .clickNextButton()
                .typeSmsCode("12341234")
                .clickSendButton()
                .clickTemplateOverview();
    }
}


