package cz.moneta.test.dsl.newib;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.newib.authentification.LoginPage;
import cz.moneta.test.harness.endpoints.ib.NewIbEndpoint;
import cz.moneta.test.harness.support.web.Builders;

public class NewIb {

    private final Harness harness;
    private NewIbEndpoint newIbEndpoint;

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

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