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 = "CRT_NOTE_ACCOUNT_ACTION")
public class CardNotes {
    private SmokeData smokeData;
    private String card;

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

    @TestCase(environments = {Environment.TST3, Environment.FVE, Environment.PPE})
    @JiraTestCase(id = "FVP-T1954")
    public void MWFBK6_ACCOUNT_ACTION_CREATE_NOTE(Harness harness) {
        harness.tasks().wso2().restRequest()
                .prepareEmptyRequestFromUfo(smokeData.getPath("MWFBK6"))
                .addField("AkcniKod", "ADDR")
                .addField("LogoKarty", "5601042")
                .addField("CisloKarty", card)
                .addField("Temp_Note1", "sample temp note")
                .postExtended()
                .andAssertStatus(200);
    }
}
