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 domestic payment order")
public class TemplateDomesticPaymentOrder {

    @Disabled
    @TestCase(name = "Go to templates page and create template domestic payment order", environments = {TST1, PPE})
    @JiraTestCase(id = "IB-T8252")
    void userWithCurrentAccount_shouldCreateTemplateDomesticPaymentOrder(Harness harness, @Key("ib.client") Credentials credentials) {
        harness.withIB()
                .openLoginPage()
                .then(harness.tasks().ib().loginWithDefaultMobileKeyAnd(credentials))
                .clickAccountsAndTransactions()
                .clickTemplatesSetting()
                .clickNewTemplate()
                .fillTemplateName(harness.generate(GeneratorType.ICO))
                .clickDomesticAccountSelect()
                .fillDomesticPartnerAccount("0216068709")
                .fillDomesticPartnerBank("0600")
                .fillDomesticAmount("1")
                .fillTemplateDomesticVs("158")
                .fillTemplateDomesticCs("85")
                .fillTemplateDomesticSs("46")
                .fillDomesticRecipientMsg("test Domácí příkaz k úhradě")
                .clickCategorySelect()
                .fillRecipientNote("Recipient note")
                .clickNextButton()
                .typeSmsCode("12341234")
                .clickSendButton()
                .clickTemplateOverview();
    }
}