package cz.moneta.test.dsl.payment_engine.tasks;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.payment_engine.home.PaymentEngineHomePage;
import cz.moneta.test.harness.support.auth.Credentials;

public class LoginTasks {
    private final Harness harness;

    public LoginTasks(Harness harness) {
        this.harness = harness;
    }

    public PaymentEngineHomePage logInPae(Harness harness, Credentials credentials) {
        return harness.withPaymentEngine()
                .openLoginPage()
                .login(credentials.getUsername(), credentials.getPassword())
                .waitForOk()
                .clickOkButton();
    }
}
