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

import cz.moneta.test.dsl.Harness;
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.annotations.JiraTestCase;
import org.junit.jupiter.api.Disabled;

@TestScenario(name = "Verify transaction history of current accounts")
public class AccountTransactionsTest {

    @Disabled("Due to rewriting all IB regression tests")
    @TestCase(name = "Go to current account and list transaction history")
    @JiraTestCase(id="IB-T8244")
    void userWithCurrentAccount_shouldSeeTransactionsHistory(Harness harness, @Key("ib.client") Credentials credentials) {
        harness.withIB()
                .openLoginPage()
                .then(harness.tasks().ib().loginWithDefaultMobileKeyAnd(credentials))
                .clickAccountsAndTransactions()
                .checkUserHasACurrentAccount()
                .clickTransactions()
                .checkUserHasSomeTransactions();
    }

    @Disabled("Due to rewriting all IB regression tests")
    @TestCase(name = "Go to current account and filter transaction history")
    @JiraTestCase(id="IB-T8245")
    void userWithCurrentAccount_shouldSeeFilteredTransactionsHistory(Harness harness, @Key("ib.client") Credentials credentials) {
        harness.withIB()
                .openLoginPage()
                .then(harness.tasks().ib().loginWithDefaultMobileKeyAnd(credentials))
                .clickAccountsAndTransactions()
                .checkUserHasACurrentAccount()
                .clickTransactions()
                .clickFilterTransactions()
                .checkUserHasSomeTransactions();
    }
}