package cz.moneta.test.sanity.transactional.cards.wso2;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.annotations.Environment;
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.sanity.transactional.SmokeData;
import org.junit.jupiter.api.BeforeAll;

@TestScenario(name = "CardActivation")
public class CardActivation {
    private String card;

    @BeforeAll
    public void getInfo(Harness harness) {
        card = SmokeData.getInstance(harness).getCreditData().getCard();
    }

    @TestCase(environments = {Environment.TST3, Environment.FVE, Environment.PPE})
    @JiraTestCase(id = "FVP-T1963")
    public void MWFI79_DO_CARD_SERVICING_ACTIVATION(Harness harness) {
        //this test should use only already activated card
        harness.tasks().wso2().cards().activateCard(card)
                .andAssertStatus(400)
                .andAssertFieldValue("tifResponseStatus.errorDesc",
                        "MWFI79: Karta je jiz aktivovana");
    }
}
