package cz.moneta.test.regression.data.api.smoke;

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 org.junit.jupiter.api.Disabled;

import cz.moneta.test.harness.annotations.Environment;

@TestScenario(name = "Smoke tests for api squad")
public class ApiSquadSmokeTests {

    @TestCase(name = "API Squad - Smoke test - calling live check API for CA GW", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "AO-T430")
    public void tc_cagw_lbcheck(Harness harness) {

        harness.withCaGw()
                .prepareRequest()
                .withPath("/api/lbcheck")
                .withHeader("accept", "application/json")
                .get()
                .andAssertStatus(200);
    }

    @TestCase(name = "API Squad - Smoke test - calling Federated login page", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "AO-T431")
    public void tc_call_federated_login_page(Harness harness) {

        harness.withOauth2Web()
                .onOauth2WebFederatedLogin()
                .callFederatedLogin();
    }

    @TestCase(name = "API Squad - Smoke test - calling CA Api portal login page", environments = {Environment.TST1, Environment.PPE})
    @JiraTestCase(id = "AO-T432")
    public void tc_call_api_portal_login_page(Harness harness) {

        harness.withMonetaApiPortal()
                .openLoginPage();
    }
}