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 KSN74Page extends KSNPageFlow<KSN74Page>, KSNUtils<KSN74Page> {

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

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

}
