本文整理汇总了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'))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:12,代码来源:hearing-location.ts
示例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))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:12,代码来源:already-paid.ts
示例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'))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:check-and-send.ts
示例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'
))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:hearing-dates.ts
示例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)
})
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:task-list.ts
示例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.'
))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:expert.ts
示例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 })))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:severe-disability.ts
示例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 })))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:send-company-financial-details.ts
示例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 })))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:free-mediation.ts
示例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'))
})
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:13,代码来源:check-and-send.ts
注:本文中的test/http-mocks/claim-store.resolveRetrieveClaimByExternalId函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论