import { Then, When } from '@cucumber/cucumber'; import { AmendmentOverview } from '../../pages/amendment/amendmentOverview.page'; import * as glue from './glue'; When(/^I open (\d+) row of the amendment overview$/, async (rowNum) => { const amendmentOverviewPage = new AmendmentOverview(); await amendmentOverviewPage.getListRow(rowNum).clickElement(); }); When(/^I click on (\d+) row view button of the amendment overview$/, async (rowNum) => { const amendmentOverviewPage = new AmendmentOverview(); await amendmentOverviewPage.getListRowViewButton(rowNum).clickElement(); }); Then(/^I expect (\d+) row of the amendment overview to match reference "([^"]+)?"$/, async (rowNum, refFile) => { const amendmentOverviewPage = new AmendmentOverview(); await amendmentOverviewPage.getListRow(rowNum).compareElementImage(refFile); }); Then(/^I expect (\d+) row detail of the amendment overview to match reference "([^"]+)?"$/, async (rowNum, refFile) => { const amendmentOverviewPage = new AmendmentOverview(); await amendmentOverviewPage.getListRowDetail(rowNum).compareElementImage(refFile); }); Then( /^I expect following parties to see following row (details|beneficiary actions) of the amendment overview for scenario (sc1|sc2|sc4|sc5|sc6|sc8|sc10|sc11)$/, glue.checkAmendmentOverviewRowDetailsOrActions );