package cz.moneta.test.dsl.ufo.banka.tasks.insurance;

import cz.moneta.test.dsl.ufo.banka.pages.insurance.FLO011_S001_EditExpresInsurancePage;
import cz.moneta.test.dsl.ufo.banka.pages.main.HPO011_S001_ExpresDetailPage;

import java.util.function.Function;

public class InsurancePpiPlusTasks {

    public Function<FLO011_S001_EditExpresInsurancePage, HPO011_S001_ExpresDetailPage> createAndCancelInsurancePlus() {
        return start -> start.clickChangeExpresInsurance("Pojištění schopnosti splácet")
                .clickNoInvalidButton()
                .clickConfirmInvalid()
                .clickConfirmInsuranceChange()
                .clickContinue()
                .onAppendixSignedPage()
                .clickAppendixConfigButton()
                .clickInsChangeVictoryButtonPlus()
                .clickCancelServiceCredit()
                .clickCancelEditInsurancePlus()
                .clickChangeCancelExpresInsurance("Bez pojištění")
                .clickConfirmInsuranceCancel()
                .clickAppendixConfigButton()
                .clickInsuranceCancelVictoryButton();
    }
}