package cz.moneta.test.regression.channels.digital.ib.oldib.account.standingorder;

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 org.junit.jupiter.api.Disabled;

@TestScenario(name = "Verify Create Standing Orders")
public class StandingOrderTest {

    @Disabled("Due to rewriting all IB regression tests")
    @TestCase(name = "Go to account page and create standing order")
    @JiraTestCase(id = "IB-T8259")
    void userWithCurrentAccount_shouldCreateStandingOrder(Harness harness, @Key("ib.client") Credentials credentials) {
        harness.withIB()
                .openLoginPage()
                .then(harness.tasks().ib().loginWithDefaultMobileKeyAnd(credentials))
                .clickAccountsAndTransactions()
                .clickStandingOrders()
                .clickNewStandingOrder()
                .clickAccountSelect()
                .fillPartnerAccountBank("0600")
                .fillPartnerAccount("0215793693")
                .fillOrderName("Testovací jméno")
                .fillAmount("1")
                .fillVariableSymbol("124")
                .fillConstSymbol("85")
                .fillSpecificSymbol("158")
                .fillMessage("testovací TP")
                .clickContinue()
                .clickSign()
                .typeSmsCode("12341234")
                .clickSend()
                .clickListStandingOrderButton();
    }
}