本文整理汇总了TypeScript中test/http-mocks/fees.resolveCalculateIssueFee函数的典型用法代码示例。如果您正苦于以下问题:TypeScript resolveCalculateIssueFee函数的具体用法?TypeScript resolveCalculateIssueFee怎么用?TypeScript resolveCalculateIssueFee使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resolveCalculateIssueFee函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('Should validate check-and-send Page hyperlink with correct location and span', async () => {
draftStoreServiceMock.resolveFind('claim',{ claimant: { ...draftStoreServiceMock.sampleClaimDraftObj.claimant, partyDetails: individualDetails } , defendant: { ...draftStoreServiceMock.sampleClaimDraftObj.defendant, partyDetails: defendantIndividualDetails } })
feesServiceMock.resolveCalculateIssueFee()
await request(app)
.get(ClaimPaths.checkAndSendPage.uri)
.set('Cookie', `${cookieName}=ABC`)
.expect(res => expect(res).to.be.successful.withText('Check your answers'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/claimant-individual-details" class="bold">Change <span class="visuallyhidden">full name</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/claimant-individual-details" class="bold">Change <span class="visuallyhidden">address</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/claimant-dob" class="bold">Change <span class="visuallyhidden">date of birth</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/claimant-mobile" class="bold">Change <span class="visuallyhidden">contact number (optional)</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/defendant-individual-details" class="bold">Change <span class="visuallyhidden">full name</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/defendant-individual-details" class="bold">Change <span class="visuallyhidden">address</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/defendant-email" class="bold">Change <span class="visuallyhidden">email</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/amount" class="bold">Change <span class="visuallyhidden">claim amount breakdown</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/interest" class="bold">Change <span class="visuallyhidden">claim interest</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/interest-rate" class="bold">Change <span class="visuallyhidden">how do you want to claim interest?</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/interest-date" class="bold">Change <span class="visuallyhidden">when are you claiming interest from?</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/reason" class="bold">Change <span class="visuallyhidden">why you believe youâre owed the money:</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/timeline" class="bold">Change <span class="visuallyhidden">timeline of what happened</span></a>'))
.expect(res => expect(res).to.be.successful.withText('<a href="/claim/evidence" class="bold">Change <span class="visuallyhidden">your evidence (optional)</span></a>'))
.expect(res => expect(res).to.be.successful.withText('Statement of truth','I believe that the facts stated in this claim are true.'))
.expect(res => expect(res).to.be.successful.withText('input id="signedtrue" type="checkbox" name="signed" value="true"'))
.expect(res => expect(res).to.be.successful.withText('input type="submit" class="button"'))
})
示例2: it
it('should return 500 and render error page when cannot calculate hearing fee', async () => {
draftStoreServiceMock.resolveFind('claim')
feesServiceMock.resolveCalculateIssueFee()
feesServiceMock.rejectCalculateHearingFee()
await request(app)
.get(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.expect(res => expect(res).to.be.serverError.withText('Error'))
})
示例3: next
completionDate: '2019-11-11',
paymentLength: '12 months'
},
ccjType: CountyCourtJudgmentType.DETERMINATION
},
settlementReachedAt: '2017-08-10T15:27:32.917',
claimantResponse: {
type: ClaimantResponseType.ACCEPTATION,
amountPaid: 0
},
reDeterminationRequestedAt: '2018-12-01T12:34:56.789'
}).persist()
claimStoreMock.mockCalculateInterestRate(0).persist()
claimStoreMock.resolveRetrieveUserRoles('cmc-new-features-consent-given').persist()
feesMock.resolveCalculateIssueFee().persist()
feesMock.resolveCalculateHearingFee().persist()
feesMock.resolveGetIssueFeeRangeGroup().persist()
feesMock.resolveGetHearingFeeRangeGroup().persist()
courtFinderMock.resolveFind().persist()
const justForwardRequestHandler = {
requestHandler: (req: express.Request, res: express.Response, next: express.NextFunction): void => {
next()
}
}
mock('first-contact/guards/claimReferenceMatchesGuard', {
ClaimReferenceMatchesGuard: {
requestHandler: (req: express.Request, res: express.Response, next: express.NextFunction): void => {
res.locals.claim = new Claim().deserialize(claimStoreMock.sampleClaimObj)