package cz.moneta.test.regression.channels.digital.web;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.task.monetaportal.MortgageTasks;
import cz.moneta.test.harness.annotations.Environment;
import cz.moneta.test.harness.annotations.JiraTestCase;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;

@TestScenario(name = "Check Hypoloan page")
public class HypoLoanTest {

    @TestCase(name = "Kalkulačky - Hypotéka", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "NWP-T860")
    public void tcHypoLoanCalculator(Harness harness) {
        MortgageTasks tasks = harness.tasks().monetaPortal().mortgageTasks();
        harness.withMonetaPortal()
                .openHomePage()
                .acceptCookies()
                .openProductsDropDown()
                .clickMortgage()
                .then(tasks.fillAndStoreFindMaxCalculator())
                .then(tasks.checkTransferredResult())
                .then(tasks.fillAndStoreMortgageCalculator())
                .then(tasks.storeFinansoPreFilledData())
                .then(tasks.checkTransferredDataToFinanso());
    }

}