import { ContourAlert } from '../../../elements/contourAlert'; import { DP_ACTION } from '../../../enum/dp/dpAction'; import ActionButton from '../../../pages/actionButton/actionButton.page'; import { loginAndOpenDPNumberAtCurrentDC } from './'; export async function loginAndReviewPendingDPNumberAtCurrentDC( party: string, role: string, action: string, dpNumber: number ) { await loginAndOpenDPNumberAtCurrentDC(party, role, dpNumber); const actionButtonPage = new ActionButton(); if (action == DP_ACTION.VERIFY) { await actionButtonPage.getVerifyButton().clickElement(true, true); await new ContourAlert().clickButtonByLabelTxt('Confirm'); } else if (action == DP_ACTION.DECLINE) { await actionButtonPage.getDeclineButton().clickElement(true, true); await new ContourAlert().clickButtonByLabelTxt('Confirm'); } else if (action == DP_ACTION.APPROVE) { await actionButtonPage.getApproveButton().clickElement(true, true); await new ContourAlert().clickButtonByLabelTxt('Confirm'); } }