package cz.moneta.test.dsl.ib;

import cz.moneta.test.harness.endpoints.WebEndpoint;
import cz.moneta.test.harness.support.web.Until;
import cz.moneta.test.harness.support.web.WebFlow;

public interface IbPageFlow<A extends WebFlow<A>> extends WebFlow<A> {
    String BUSY_LOADER = "//div[@class='busyLoader']";
    String MONETA_LOGO_SPINER = "//img[@alt='MONETA Logo Spinner']";

    default void beforePageLoad(WebEndpoint endpoint) {
        endpoint.waitForElementsToLoad(300, Until.GONE, BUSY_LOADER);
        endpoint.waitForElementsToLoad(300, Until.GONE, MONETA_LOGO_SPINER);
    }
}
