package cz.moneta.test.regression.commercial.auto.smartauto.df;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.credentials.Keys.smart;
import cz.moneta.test.dsl.util.task.auto.smartauto.df.SmartAutoDfTasks;
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;

@TestScenario(name = "Dashboard")
public class DashboardTest {

    @JiraTestCase(id = "LAMD-T1045")
    @TestCase(name = "Go to DF module and check Dashboard page elements")
    public void tcCheckDfDashboard(Harness harness, @Key(smart.auto.general) Credentials credentials) {
        SmartAutoDfTasks smartAutoDfTasks = harness.tasks().auto().smartAutoDf();

        harness.withSmartAuto()
                .openLoginPage()
                .then(smartAutoDfTasks.login().loginWithCredentials(credentials))
                .checkDashboardTexts()
                .checkDashboardTitles();
    }
}