package cz.moneta.test.dsl.auto.smartauto;

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

import static cz.moneta.test.dsl.auto.smartauto.shared.CommonElements.LOADER_DIV;

public interface SmartAutoFlow<A extends WebFlow<A>> extends WebFlow<A> {

    default void beforePageLoad(WebEndpoint endpoint) {
        endpoint.waitForElementsToLoad(90, Until.GONE, LOADER_DIV);
        // wait for case when second Loader appear for additional data loading
        endpoint.waitForElementsToLoad(90, Until.GONE, LOADER_DIV);
    }

}
