package cz.moneta.test.dsl.util.task.auto.smartauto.newcalculation;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.auto.smartauto.NewCalculationPage;

import java.util.function.Function;

public class IrregularPaymentTasks {

    private final Harness harness;

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

    public Function<NewCalculationPage, NewCalculationPage> addIrregularPayment(Long payment) {
        return start -> start
            .scrollToTop()
            .clickIrregularEditButton()
            .clickIrregularIcon()
            .typeIrregularPayment(payment)
            .clickIrregularConfirm()
            .clickIrregularSubmit()
            .checkIfIrregular();
    }
}
