本文整理汇总了TypeScript中test/http-mocks/claim-store.resolveRetrieveClaimByExternalId函数的典型用法代码示例。如果您正苦于以下问题:TypeScript resolveRetrieveClaimByExternalId函数的具体用法?TypeScript resolveRetrieveClaimByExternalId怎么用?TypeScript resolveRetrieveClaimByExternalId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resolveRetrieveClaimByExternalId函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should return 500 and render error page when cannot save DQ draft', async () => {
claimStoreServiceMock.resolveRetrieveClaimByExternalId(claim)
draftStoreServiceMock.resolveFind('directionsQuestionnaire')
draftStoreServiceMock.resolveFind('response')
draftStoreServiceMock.rejectSave()
await request(app)
.post(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.send(validFormDataAccept)
.expect(res => expect(res).to.be.serverError.withText('Error'))
})
示例2: it
it(`should render page asking '${header}' when partial admission was selected`, async () => {
claimStoreServiceMock.resolveRetrieveClaimByExternalId()
draftStoreServiceMock.resolveFind('response:partial-admission', {
response: {
type: ResponseType.PART_ADMISSION
}
})
await request(app)
.get(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.expect(res => expect(res).to.be.successful.withText(header))
})
示例3: it
it('should return 500 and render error page when form is valid and cannot delete draft response', async () => {
draftStoreServiceMock.resolveFind(draftType)
draftStoreServiceMock.resolveFind('mediation')
claimStoreServiceMock.resolveRetrieveClaimByExternalId(claimStoreServiceMock.samplePartialAdmissionWithPaymentBySetDateResponseObj)
claimStoreServiceMock.resolveClaimantResponse()
draftStoreServiceMock.rejectDelete()
await request(app)
.post(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.send(settlementRequest)
.expect(res => expect(res).to.be.serverError.withText('Error'))
})
示例4: it
it('should render page without pre-selected dates', async () => {
claimStoreServiceMock.resolveRetrieveClaimByExternalId(claim)
draftStoreServiceMock.resolveFind('response')
draftStoreServiceMock.resolveFind('directionsQuestionnaire')
await request(app)
.get(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.expect(res => expect(res).to.be.successful.withText(
'Select the dates you can’t go to a hearing',
'No dates added yet'
))
})
示例5: it
it('should render page and show a tag marking incomplete tasks', async () => {
draftStoreServiceMock.resolveFind('response', { response: {} })
draftStoreServiceMock.resolveFind('mediation')
claimStoreServiceMock.resolveRetrieveClaimByExternalId()
await request(app)
.get(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.expect(res => {
expect(res).to.be.successful.withText('Respond to a money claim')
expect(res.text.match(/INCOMPLETE/g)).length(1)
})
})
示例6: it
it('should render page when everything is fine', async () => {
claimStoreServiceMock.resolveRetrieveClaimByExternalId(claimWithDQ)
draftStoreServiceMock.resolveFind('directionsQuestionnaire')
draftStoreServiceMock.resolveFind('response')
await request(app)
.get(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.expect(res => expect(res).to.be.successful.withText(
'Using an expert',
'It’s rare for a judge to allow you to use an expert in a small claim. Most small claims don’t need an expert.'
))
})
示例7: it
it('should redirect to dependants page when all is fine and form is valid', async () => {
claimStoreServiceMock.resolveRetrieveClaimByExternalId()
draftStoreServiceMock.resolveFind('response:full-admission')
draftStoreServiceMock.resolveSave()
await request(app)
.post(severeDisabilityPage)
.set('Cookie', `${cookieName}=ABC`)
.send(validFormData)
.expect(res => expect(res).to.be.redirect
.toLocation(Paths.residencePage
.evaluateUri({ externalId: claimStoreServiceMock.sampleClaimObj.externalId })))
})
示例8: it
it('should redirect to task list when everything is fine', async () => {
draftStoreServiceMock.resolveFind('response:full-admission')
draftStoreServiceMock.resolveSave()
claimStoreServiceMock.resolveRetrieveClaimByExternalId()
await request(app)
.post(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.send({ companyDefendantResponseViewed: true })
.expect(res => expect(res).to.be.redirect
.toLocation(Paths.taskListPage
.evaluateUri({ externalId: claimStoreServiceMock.sampleClaimObj.externalId })))
})
示例9: it
it('should redirect to how mediation works page when everything is fine for claimant', async () => {
idamServiceMock.resolveRetrieveUserFor(claimStoreServiceMock.sampleClaimObj.submitterId, 'citizen')
claimStoreServiceMock.resolveRetrieveClaimByExternalId()
checkCountyCourtJudgmentRequestedGuard(app, method, pagePath)
draftStoreServiceMock.resolveFind('mediation')
draftStoreServiceMock.resolveFind('response')
await request(app)
.post(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.expect(res => expect(res).to.be.redirect
.toLocation(MediationPaths.howMediationWorksPage.evaluateUri({ externalId: claimStoreServiceMock.sampleClaimObj.externalId })))
})
示例10: it
it('should return 500 and render error page when form is valid and cannot delete draft response', async () => {
draftStoreServiceMock.resolveFind(draftType)
draftStoreServiceMock.resolveFind('mediation')
claimStoreServiceMock.resolveRetrieveClaimByExternalId()
claimStoreServiceMock.resolveSaveResponse()
draftStoreServiceMock.rejectDelete()
await request(app)
.post(pagePath)
.set('Cookie', `${cookieName}=ABC`)
.send({ signed: 'true', type: SignatureType.BASIC })
.expect(res => expect(res).to.be.serverError.withText('Error'))
})