package cz.moneta.test.regression.backoffice.callcenter.jenkinstests.ccretail.cczakladbanka;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.credentials.Keys;
import cz.moneta.test.dsl.util.task.ufo.operations.OperationsTasks;
import cz.moneta.test.harness.annotations.JiraTestCase;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;
import cz.moneta.test.harness.support.auth.Credentials;
import cz.moneta.test.harness.support.auth.Key;
import org.junit.jupiter.api.BeforeAll;

import static cz.moneta.test.harness.annotations.Environment.PPE;
import static cz.moneta.test.harness.annotations.Environment.TST1;

@TestScenario(name = "Sending SMS Message")
public class SendingSmsMessage {
    private OperationsTasks operationsTasks;

    @BeforeAll
    public void getSetup(Harness harness) {
        operationsTasks = harness.tasks().ufo().operations();
    }

    @TestCase(name = "Sending SMS Message - Anonym Client", environments = {PPE, TST1})
    @JiraTestCase(id = "CC-T2118")
    public void sendingSmsMessageAnonymClient(Harness harness, @Key(Keys.ufo.banka.banker) Credentials credentials) {

        harness.withUfo()
                .openLoginPage()
                .then(operationsTasks.login().withCredentials(credentials))
                .clickMeetingsAndSms()
                .clickSendingSms()
                .selectTypeSms(1)
                .typeIntoTelephoneClientTextBox("720867267")
                .clickCentralMmbCheckBox()
                .clickSendButton()
                .clickMeetingsAndSms()
                .clickSendingSms()
                .selectTypeSms(1)
                .typeIntoTelephoneClientTextBox("720867267")
                .selectOmFromComboBox(86002420)
                .clickMondayCheckBox()
                .clickWednesdayCheckBox()
                .typeIntoTelephoneOmTextBox("720867267")
                .clickSendButton();
    }
}
