package cz.moneta.test.regression.internal.fortelight;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.annotations.Environment;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;

@TestScenario(name = "Import dealers to Intermediary application")
public class IntermediaryTest {

    @TestCase(name = "Import dealers", environments = {Environment.TST1, Environment.DEV})
    public void uploadBranchPhoto(Harness harness) {
        String adminBo = harness.withForteLight()
                .openForteLightHomePage()
                .clickIntermediaryMenu()
                .getAdminBoId();

        String doc_path = "regression/forte/dealer.xlsx";

        harness.withForteLight()
                .openForteLightHomePage()
                .clickIntermediaryMenu()
                .selectRoleMenu(adminBo)
                .clickImportDealerMenu()
                .checkPageTitle("Nahrát soubor")
                .uploadDocument(doc_path)
                .clickUploadButton()
                .checkPageTitle("Kontrola nových prodejců")
                .clickRemoveDealer()
                .clickYes();
    }
}