package cz.moneta.test.regression.backoffice.exevido.web.inheritance;

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

@TestScenario(name = "Check Data Box Availability")
public class CheckDataBoxAvailability {

    @TestCase(name = "Check Data Box Availability")
    @JiraTestCase(id = "BOC-T8943")
    public void checkDataBoxAvailability(Harness harness, @Key(Keys.exevido.inheritance) Credentials credentials) {
        harness.withExevido()
                .openLoginPage()
                .then(harness.tasks().exevidoTasks().login().withCredentialsToMmb(credentials))
                .checkNofiticationText("Přihlášení k MMB")
                .thenSame(harness.tasks().exevidoTasks().selectDataBox().selectDataBoxMmbType(DataBoxType.GEMM))
                .checkNofiticationText("Přihlášení k GEMM")
                .thenSame(harness.tasks().exevidoTasks().selectDataBox().selectDataBoxMmbType(DataBoxType.MA))
                .checkNofiticationText("Přihlášení k MA")
                .thenSame(harness.tasks().exevidoTasks().selectDataBox().selectDataBoxMmbType(DataBoxType.ML))
                .checkNofiticationText("Přihlášení k ML")
                .thenSame(harness.tasks().exevidoTasks().selectDataBox().selectDataBoxMmbType(DataBoxType.NAMC))
                .checkNofiticationText("Přihlášení k NAMC")
                .thenSame(harness.tasks().exevidoTasks().selectDataBox().selectDataBoxMssAll())
                .checkNofiticationText("Výběr všech dostupných DS byl úspěšný.");
    }
}