package cz.moneta.test.dsl.kasanova.components;

import cz.moneta.test.dsl.kasanova.KSNPageFlow;
import cz.moneta.test.dsl.kasanova.KSNUtils;
import cz.moneta.test.dsl.kasanova.components.enums.KSNNumberGenerator;
import cz.moneta.test.harness.endpoints.WebEndpoint;
import cz.moneta.test.harness.endpoints.kasanova.KasanovaEndpoint;
import cz.moneta.test.harness.support.web.CustomAction;

public interface KSN75Page extends KSNPageFlow<KSN75Page>, KSNUtils<KSN75Page> {

    default void loadPage(WebEndpoint endpoint) {
        KSNPageFlow.loadLocalPage(endpoint, DEBET_AMOUNT_INPUT2);
    }

    @CustomAction
    default KSN75Page fillSymbols() {
        KasanovaEndpoint endpoint = getEndpoint(KasanovaEndpoint.class);
        endpoint.type(() -> VARIABLE_SYMBOL_INPUT, KSNNumberGenerator.getRandomNumberValue(), false);
        endpoint.type(() -> SPECIFIC_SYMBOL_INPUT, KSNNumberGenerator.getRandomNumberValue(), false);
        return null;
    }

}
