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

import cz.moneta.test.dsl.Harness;
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.*;

@TestScenario(name = "Test login to UFO CB application.")
public class LoginToUfoCB {

    @TestCase(name = "Check login to UFO CB", environments = {TST1, TST3, PPE, FVE})
    @JiraTestCase(id = "TEA-T23")
    public void checkLoginUfoCB(Harness harness, @Key("ufocb-ctenar") Credentials credentials) {
        harness.withUfo()
                .openLoginPage()
                .typeUserNameAndPasswordAndClickLogin(credentials.getUsername(), credentials.getPassword())
                .onUfoCbPage();
    }
}
