import ContourSpinner from '../../../../elements/contourSpinner'; import { DOCUMENT_TYPE } from '../../../../enum/documentType'; import { SECTION } from '../../../../enum/navigationSection'; import ActionButton from '../../../../pages/actionButton/actionButton.page'; import { loginAndOpenDPNumberAtCurrentDC } from '../../../dp/glue'; import { navigateFromDCToP2PSection } from '../../../navigation/glue'; import { clickButtonAtPendingMessage, openP2PThreadFromListing } from '../../glue'; export async function loginAndReviewMessageAtCurrentDCDP( party: string, role: string, buttonType: string, subject: string, dpNumber: number ) { await loginAndOpenDPNumberAtCurrentDC(party, role, dpNumber); await navigateFromDCToP2PSection(SECTION.P2P_MESSAGE_LISTING, DOCUMENT_TYPE.DP); await openP2PThreadFromListing(subject); await clickButtonAtPendingMessage(buttonType); const actionButton = new ActionButton(); await actionButton.getConfirmButton().clickElement(); await new ContourSpinner().waitForLoadingToComplete(); }