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;

@Disabled("Not currently maintained")
@TestScenario(name = "Check Saving account page")
public class SavingAccountTest {
    @TestCase(name = "Check Saving account form", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "NWP-T471")
    public void tcSavingAccountForm(Harness harness) {
        MonetaPortalTasks tasks = harness.tasks().monetaPortal();
        harness.withMonetaPortal()
                .openHomePage()
                .acceptCookies()
                .openSavingsMenu()
                .openSavingAccountPage()
                .clickSavingAccountNaviblocksSection()
                .clickNaviblocksSavingAccountCreateNewClientsOnline()
                .then(tasks.formTasks().fillOnboardingForm("Petr","Testovič","petr.pollak@moneta.cz","777777777"));
    }

    @TestCase(name = "Check IB from Saving account page", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "NWP-T472")
    public void tcOpenIBPage(Harness harness) {
        MonetaPortalTasks tasks = harness.tasks().monetaPortal();
        harness.withMonetaPortal()
                .openHomePage()
                .acceptCookies()
                .openSavingsMenu()
                .openSavingAccountPage()
                .clickSavingAccountNaviblocksSection()
                .openNaviblocksIB()
                .checkIBPage();
    }

    @TestCase(name = "Check W2C for Saving account page", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "NWP-T473")
    public void tcSavingAccountW2C(Harness harness) {
        MonetaPortalTasks tasks = harness.tasks().monetaPortal();
        harness.withMonetaPortal()
                .openHomePage()
                .acceptCookies()
                .openSavingsMenu()
                .openSavingAccountPage()
                .clickSavingAccountNaviblocksSection()
                .clickNaviblocksW2C()
                .then(tasks.commonTasks().fillW2C("777777777"));
    }
}