package cz.moneta.test.regression.transactional.payments.cash.kasanova;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.annotations.Defect;
import cz.moneta.test.harness.annotations.NonConcurrentTestScenario;
import cz.moneta.test.harness.annotations.TestCase;
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.kasanova;

@NonConcurrentTestScenario(name = "Kasanova login test")
public class KSNLogin {

    @Defect("Util TA-416 is solved")
    @TestCase(name = "Login into Kasanova by using password")
    void userWithPasswordAccessOnly_shouldLoginDirectly(Harness harness, @Key(kasanova.banker) Credentials banker) {
        harness.withKasanova()
                .openLoginPage()
                .typeUsername(banker.getUsername())
                .typePassword(banker.getPassword())
                .clickLogin()
                .logOut();
    }

}
