package cz.moneta.test.dsl.exevido;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.exevido.pages.LoginPage;
import cz.moneta.test.harness.endpoints.exevido.ExevidoEndpoint;
import cz.moneta.test.harness.support.web.Builders;

/**
 * For class schema and specifics of Exevido DSL, see: https://confluence.moneta.cz/x/KgEDaQ
 */
public class Exevido {

    private final Harness harness;
    private ExevidoEndpoint exevidoEndpoint;

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

    public LoginPage openLoginPage() {
        exevidoEndpoint = harness.getEndpoint(ExevidoEndpoint.class);
        exevidoEndpoint.openApplication();
        return Builders.newWebFlowBuilder(LoginPage.class, exevidoEndpoint, harness);
    }
}