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

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.credentials.Keys;
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 static cz.moneta.test.harness.annotations.Environment.EDU;
import static cz.moneta.test.harness.annotations.Environment.FVE;
import static cz.moneta.test.harness.annotations.Environment.PPE;
import static cz.moneta.test.harness.annotations.Environment.TST1;
import static cz.moneta.test.harness.annotations.Environment.TST3;

@TestScenario(name = "Test login to UFO Operations application.")
public class LoginToUfoOPS {
    @TestCase(name = "Test login to UFO OPS", environments = {TST1, TST3, PPE, EDU, FVE})
    @JiraTestCase(id = "TEA-T24")
    public void checkLoginToUfoOPS(Harness harness, @Key(Keys.ufo.banka.banker) Credentials credentials) {

        harness.withUfo()
                .openLoginPage()
                .then(harness.tasks().ufo().operations().login().withCredentials(credentials))
                .checkSearchInputInMainPage();
    }
}
