package cz.moneta.test.regression.commercial.salesforce.web;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.salesforce.tasks.SalesForceTasks;
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;

@TestScenario(name = "View summary of notes on client account page.")
public class NotesSummaryTest {

    @TestCase(name = "Login to SalesForce, search account and view notes summary.", environments = {Environment.TST1})
    @JiraTestCase(id = "SC-T776")
    public void viewNotesSummary(Harness harness) {
        String account = harness.getConfig("salesforce.test.account");
        SalesForceTasks tasks = harness.tasks().salesForce();

        harness.withSalesForce()
                .openLoginPage()
                .then(tasks.loginAsBanker())
                .then(tasks.openAccountDetail(account))
                .then(tasks.openNoteSummaryDetail(account))
                .logoutUser();
    }

}
