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

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.task.monetaportal.MonetaPortalTasks;
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;
import org.junit.jupiter.api.Disabled;

import static cz.moneta.test.dsl.monetaportal.enums.SearchBranchName.BRUMLOVKA;

@Disabled("Not currently maintained")
@TestScenario(name = "Check Homepage EN")
public class HomePageENTest {
    @TestCase(name = "Check Current account form", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "NWP-T474")
    public void tcHomePageEnExchangeRates(Harness harness) {
        harness.withMonetaPortal()
                .openHomePage()
                .acceptCookies()
                .clickENPage()
                .checkHomePageExchangeRatesTable()
                .clickExchangeRatesTableMore()
                .checkExchangeRatesTable();
    }

    @TestCase(name = "Check W2B for EN Homepage", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "NWP-T475")
    public void tcHomePageEnW2B(Harness harness) {
        MonetaPortalTasks tasks = harness.tasks().monetaPortal();
        harness.withMonetaPortal()
                .openHomePage()
                .acceptCookies()
                .clickENPage()
                .clickHomePageW2B()
                .fillW2BSearchBranch(BRUMLOVKA.getValue())
                .clickW2BSearchResultBranches(BRUMLOVKA)
                .clickW2BArrangeAppointment()
                .then(tasks.commonTasks().fillW2B(1,5,"Petr Testovič", "777777777", "petr.pollak@moneta.cz"));
    }

    @TestCase(name = "Check W2C for EN Homepage", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "NWP-T476")
    public void tcHomePageEnW2C(Harness harness) {
        MonetaPortalTasks tasks = harness.tasks().monetaPortal();
        harness.withMonetaPortal()
                .openHomePage()
                .acceptCookies()
                .clickENPage()
                .clickHomePageW2C()
                .then(tasks.commonTasks().fillW2C("777777777"));
    }
}