package cz.moneta.test.smoke.itp.ieufotomcat;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.ufo.operations.ufoOperations.taskslist.TypesOfViewFilter;
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 static cz.moneta.test.harness.annotations.Environment.*;

@TestScenario(name = "Find first task in UFO Operations on Tomcat.")
public class FindTaskUfoTomcatOps {

    @TestCase(name = "Find Ufo Operations on Tomcat Task.", environments = {TST1, PPE, TST3, EDU, FVE})
    void findUfoOperationsTomcatTasks(Harness harness, @Key("ufo-banka-banker") Credentials credentials) {
        harness.withUfo()
                .openLoginPage()
                .then(harness.tasks().ufo().operations().login().withCredentials(credentials))
                .clickTasks()
                .selectTypeOfView(TypesOfViewFilter.TASK_SEARCH)
                .clickFind()
                .clickToFirstTask()
                .checkTaskIdPresence();
    }
}
