package cz.moneta.test.regression.backoffice.ufooperations.old;

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.Disabled;

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

@Disabled
@TestScenario(name = "Business Support")
public class DataboxesBasicTest {

    private static final String WELCOME = "Vítejte v aplikaci DataBoxes";
    private static final String SEARCH = "VYHLEDAT";

    @TestCase(name = "Databoxes", environments = {PPE, TST1})
    @JiraTestCase(id = "BOC-T3966")
    public void Databoxes(Harness harness, @Key(Keys.ufo.databoxes.user) Credentials credentials) {
        OperationsTasks operationsTasksTasks = harness.tasks().ufo().operations();

        harness.withUfo()
                .openLoginPage()
                .then(operationsTasksTasks.login().withCredentialsSelectDataboxes(credentials))
                .assertWelcomeLabel(WELCOME)
                .clickCasesButton()
                .assertCasesSearchButton(SEARCH)
                .clickNewMessageButton()
                .assertNewMessageContinueButton("POKRAČOVAT")
                .clickNewMessageCancelButton()
                .clickRequestedDocuments()
                .assertRequestedDocumentsSearchButton(SEARCH)
                .clickSentMessagesButton()
                .assertSentMessagesSearchButton(SEARCH);
    }
}