package cz.moneta.test.dsl.monetaapiportal;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.monetaapiportal.pages.LoginPage;
import cz.moneta.test.harness.endpoints.monetaapiportal.MonetaApiPortalEndpoint;
import cz.moneta.test.harness.support.web.Builders;

public class MonetaApiPortal {

    private final Harness harness;

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

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