Skip to content

Commit ecd7435

Browse files
committed
Merge branch 'DFPL-2864' of https://github.com/hmcts/fpl-ccd-configuration into DFPL-2864
2 parents bb2a3ac + 4bc885a commit ecd7435

File tree

30 files changed

+665
-67
lines changed

30 files changed

+665
-67
lines changed

Jenkinsfile_CNP

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,30 @@ def deployWADmns() {
175175
env.ENABLE_WA = false
176176
}
177177
}
178-
179-
def archiveApiTestResult() {
178+
def archiveTestResult(reportDir, reportFiles, reportName) {
180179
publishHTML([
181-
allowMissing : true,
182-
alwaysLinkToLastBuild: true,
183-
keepAll : true,
184-
reportDir : "test-results/functional",
185-
reportFiles : 'index.html',
186-
reportName : 'API Test Report'
180+
allowMissing : true,
181+
alwaysLinkToLastBuild: true,
182+
keepAll : true,
183+
reportDir : reportDir,
184+
reportFiles : reportFiles,
185+
reportName : reportName
187186
])
188-
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'test-results/functional/**/*'
187+
steps.archiveArtifacts allowEmptyArchive: true, artifacts: "${reportDir}/**/*"
188+
}
189+
def setupUITestEnvVariablesForPreview() {
190+
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
191+
env.CASE_SERVICE_URL = "https://fpl-case-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
192+
env.FE_BASE_URL = "https://xui-fpl-case-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
193+
env.MOCKED_PAYMENTS = false
194+
env.TEST_RETRIES = 1
195+
}
196+
def installYarnDependenciesIfNeeded(yarnBuilder) {
197+
if (!fileExists('node_modules')){
198+
yarnBuilder.yarn('yarn-update')
199+
yarnBuilder.yarn('install-dependencies')
200+
}
201+
189202
}
190203

191204
// Vars for Kubernetes
@@ -249,32 +262,19 @@ withPipeline(type, product, component) {
249262
}
250263

251264
before('fullFunctionalTest:preview'){
252-
yarnBuilder.yarn('yarn-update')
253-
yarnBuilder.yarn('install-dependencies')
254-
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
255-
env.CASE_SERVICE_URL = "https://fpl-case-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
256-
env.FE_BASE_URL = "https://xui-fpl-case-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
257-
env.MOCKED_PAYMENTS = false
258-
env.TEST_RETRIES = 1
259-
265+
installYarnDependenciesIfNeeded(yarnBuilder)
266+
setupUITestEnvVariablesForPreview()
260267
}
261268
afterAlways('fullFunctionalTest:preview') {
262-
archiveApiTestResult()
269+
archiveTestResult("test-results/functional", "index.html", "API Test Report")
263270
stage('UIFunctionalTests') {
264271
try {
265272
yarnBuilder.yarn('test:functional-nightly-preview')
266273
} catch (Error) {
267274
unstable(message: "${STAGE_NAME} is unstable: " + Error.toString())
268275
} finally {
269-
publishHTML([
270-
allowMissing : true,
271-
alwaysLinkToLastBuild: true,
272-
keepAll : true,
273-
reportDir : "test-results/functional",
274-
reportFiles : 'index.html',
275-
reportName : 'UI Functional Test Report'
276-
])
277-
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/test-results/functional/**/*'
276+
archiveTestResult("test-results/functional", "index.html", "UI Functional Test Report")
277+
278278
}
279279
}
280280
}
@@ -294,15 +294,13 @@ withPipeline(type, product, component) {
294294
uploadCoreCaseDataDefinitions('preview', '0')
295295

296296
deployWADmns()
297-
298-
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
299-
env.CASE_SERVICE_URL = "https://fpl-case-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
300-
env.URL = "https://xui-fpl-case-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
301-
env.MOCKED_PAYMENTS = false
302-
env.TEST_RETRIES = 3
297+
installYarnDependenciesIfNeeded(yarnBuilder)
298+
setupUITestEnvVariablesForPreview()
303299
}
304300

305301
afterAlways('smoketest:preview') {
302+
yarnBuilder.yarn('test:smoke')
303+
archiveTestResult("test-results/functional", "index.html", "Smoke Test Report")
306304
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'output/**/*'
307305
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'test-results/smokeTest/**/*'
308306
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'test-results/smoke/**/*'
@@ -336,16 +334,14 @@ withPipeline(type, product, component) {
336334
}
337335

338336
before('functionalTest:preview') {
339-
yarnBuilder.yarn('yarn-update')
340-
yarnBuilder.yarn('install-dependencies')
337+
installYarnDependenciesIfNeeded(yarnBuilder)
341338
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
342339
env.CASE_SERVICE_URL = "https://fpl-case-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
343340
env.TEST_RETRIES = 3
344341
}
345342

346343
before('functionalTest:aat') {
347-
yarnBuilder.yarn('yarn-update')
348-
yarnBuilder.yarn('install-dependencies')
344+
installYarnDependenciesIfNeeded(yarnBuilder)
349345
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
350346
env.CASE_SERVICE_URL = "https://fpl-case-service-staging.aat.platform.hmcts.net"
351347
env.TEST_RETRIES = 3
@@ -356,11 +352,11 @@ withPipeline(type, product, component) {
356352
}
357353

358354
afterAlways('functionalTest:preview') {
359-
archiveApiTestResult()
355+
archiveTestResult("test-results/functional", "index.html", "API Test Report")
360356
}
361357

362358
afterAlways('functionalTest:aat') {
363-
archiveApiTestResult()
359+
archiveTestResult("test-results/functional", "index.html", "API Test Report")
364360
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/serenity/**/*'
365361
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/tests/**/*'
366362
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'test-results/functional/**/*'

ccd-definition/AuthorisationCaseField/CareSupervision/barrister.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,13 @@
13331333
"UserRole": "[BARRISTER]",
13341334
"CRUD": "CRUD"
13351335
},
1336+
{
1337+
"LiveFrom": "01/01/2017",
1338+
"CaseTypeID": "CARE_SUPERVISION_EPO",
1339+
"CaseFieldID": "latestRoleSent",
1340+
"UserRole": "[BARRISTER]",
1341+
"CRUD": "CRU"
1342+
},
13361343
{
13371344
"LiveFrom": "01/01/2017",
13381345
"CaseTypeID": "CARE_SUPERVISION_EPO",

ccd-definition/AuthorisationCaseField/CareSupervision/eps-managing.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,13 @@
25262526
"UserRole": "[EPSMANAGING]",
25272527
"CRUD": "CRUD"
25282528
},
2529+
{
2530+
"LiveFrom": "01/01/2017",
2531+
"CaseTypeID": "CARE_SUPERVISION_EPO",
2532+
"CaseFieldID": "latestRoleSent",
2533+
"UserRole": "[EPSMANAGING]",
2534+
"CRUD": "CRU"
2535+
},
25292536
{
25302537
"LiveFrom": "01/01/2017",
25312538
"CaseTypeID": "CARE_SUPERVISION_EPO",

ccd-definition/AuthorisationCaseField/CareSupervision/la-barrister.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,13 @@
19171917
"UserRole": "[LABARRISTER]",
19181918
"CRUD": "CRUD"
19191919
},
1920+
{
1921+
"LiveFrom": "01/01/2017",
1922+
"CaseTypeID": "CARE_SUPERVISION_EPO",
1923+
"CaseFieldID": "latestRoleSent",
1924+
"UserRole": "[LABARRISTER]",
1925+
"CRUD": "CRU"
1926+
},
19201927
{
19211928
"LiveFrom": "01/01/2017",
19221929
"CaseTypeID": "CARE_SUPERVISION_EPO",

ccd-definition/AuthorisationCaseField/CareSupervision/la-managing.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,6 +2519,13 @@
25192519
"UserRole": "[LAMANAGING]",
25202520
"CRUD": "CRUD"
25212521
},
2522+
{
2523+
"LiveFrom": "01/01/2017",
2524+
"CaseTypeID": "CARE_SUPERVISION_EPO",
2525+
"CaseFieldID": "latestRoleSent",
2526+
"UserRole": "[LAMANAGING]",
2527+
"CRUD": "CRU"
2528+
},
25222529
{
25232530
"LiveFrom": "01/01/2017",
25242531
"CaseTypeID": "CARE_SUPERVISION_EPO",

ccd-definition/AuthorisationCaseField/CareSupervision/la-shared.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,6 +2587,13 @@
25872587
"UserRole": "[LASHARED]",
25882588
"CRUD": "CRUD"
25892589
},
2590+
{
2591+
"LiveFrom": "01/01/2017",
2592+
"CaseTypeID": "CARE_SUPERVISION_EPO",
2593+
"CaseFieldID": "latestRoleSent",
2594+
"UserRole": "[LASHARED]",
2595+
"CRUD": "CRU"
2596+
},
25902597
{
25912598
"LiveFrom": "01/01/2017",
25922599
"CaseTypeID": "CARE_SUPERVISION_EPO",

ccd-definition/AuthorisationCaseField/CareSupervision/la-solicitor.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3640,6 +3640,13 @@
36403640
"UserRole": "[LASOLICITOR]",
36413641
"CRUD": "CRUD"
36423642
},
3643+
{
3644+
"LiveFrom": "01/01/2017",
3645+
"CaseTypeID": "CARE_SUPERVISION_EPO",
3646+
"CaseFieldID": "latestRoleSent",
3647+
"UserRole": "[LASOLICITOR]",
3648+
"CRUD": "CRU"
3649+
},
36433650
{
36443651
"LiveFrom": "01/01/2017",
36453652
"CaseTypeID": "CARE_SUPERVISION_EPO",

ccd-definition/AuthorisationCaseField/CareSupervision/robotics.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,12 @@
4040
"CaseFieldID": "componentLauncher",
4141
"UserRole": "caseworker-publiclaw-rparobot",
4242
"CRUD": "R"
43+
},
44+
{
45+
"LiveFrom": "01/01/2017",
46+
"CaseTypeID": "CARE_SUPERVISION_EPO",
47+
"CaseFieldID": "familyManCaseNumber",
48+
"UserRole": "caseworker-publiclaw-rparobot",
49+
"CRUD": "R"
4350
}
4451
]

ccd-definition/AuthorisationCaseField/CareSupervision/solicitor.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,6 +3074,19 @@
30743074
],
30753075
"CRUD": "CRUD"
30763076
},
3077+
{
3078+
"LiveFrom": "01/01/2017",
3079+
"CaseTypeID": "CARE_SUPERVISION_EPO",
3080+
"CaseFieldID": "latestRoleSent",
3081+
"UserRoles": ["[SOLICITOR]", "[SOLICITORA]", "[SOLICITORB]", "[SOLICITORC]", "[SOLICITORD]",
3082+
"[SOLICITORE]", "[SOLICITORF]", "[SOLICITORG]", "[SOLICITORH]", "[SOLICITORI]", "[SOLICITORJ]",
3083+
"[CHILDSOLICITORA]", "[CHILDSOLICITORB]", "[CHILDSOLICITORC]", "[CHILDSOLICITORD]",
3084+
"[CHILDSOLICITORE]", "[CHILDSOLICITORF]", "[CHILDSOLICITORG]", "[CHILDSOLICITORH]",
3085+
"[CHILDSOLICITORI]", "[CHILDSOLICITORJ]", "[CHILDSOLICITORK]", "[CHILDSOLICITORL]",
3086+
"[CHILDSOLICITORM]", "[CHILDSOLICITORN]", "[CHILDSOLICITORO]"
3087+
],
3088+
"CRUD": "CRU"
3089+
},
30773090
{
30783091
"LiveFrom": "01/01/2017",
30793092
"CaseTypeID": "CARE_SUPERVISION_EPO",

ccd-definition/CaseEventToFields/CareSupervision/uploadAdditionalApplications.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,19 @@
221221
"PageDisplayOrder": 5,
222222
"PageColumnNumber": 1,
223223
"ShowSummaryChangeOption": "Y"
224+
},
225+
{
226+
"LiveFrom": "01/01/2017",
227+
"CaseTypeID": "CARE_SUPERVISION_EPO",
228+
"CaseEventID": "uploadAdditionalApplications",
229+
"CaseFieldID": "latestRoleSent",
230+
"PageFieldDisplayOrder": 3,
231+
"PageColumnNumber": 1,
232+
"PageDisplayOrder": 6,
233+
"DisplayContext": "MANDATORY",
234+
"PageID": 5,
235+
"ShowSummaryChangeOption": "N",
236+
"Publish": "Y",
237+
"FieldShowCondition": "c2Type=\"DO_NOT_SHOW\""
224238
}
225239
]

0 commit comments

Comments
 (0)