@@ -17,6 +17,7 @@ properties([
17
17
18
18
def product = " et"
19
19
def component = " frontend"
20
+ def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder (this )
20
21
def inTestTrue = [
21
22
' et-${env}' : [
22
23
secret(' true' , ' IN_TEST' )
@@ -31,26 +32,34 @@ def inTestFalse = [
31
32
32
33
33
34
def secrets = [
34
- ' et-${env}' : [
35
- secret(' et-citizen-4-username' , ' TEST_CASE_USERNAME' ),
36
- secret(' et-claimant-password' , ' TEST_CASE_PASSWORD' ),
37
- secret(' idam-account-url' , ' IDAM_ACCOUNT_URL' ),
38
- secret(' api-key' , ' API_KEY' ),
39
- ],
40
- ' et-cos-${env}' : [
41
- secret(' et-caseworker-5-username' , ' ET_CASEWORKER_USER_NAME' ),
42
- secret(' et-caseworker-5-password' , ' ET_CASEWORKER_PASSWORD' ),
43
- secret(' et-legalrep-user-name' , ' ET_LEGALREP_USER_NAME' ),
44
- secret(' et-legalrep-password' , ' ET_LEGALREP_PASSWORD' ),
45
- secret(' et-wa-legal-ops-user-name' , ' ET_LEGAL_OPS_USER_NAME' ),
46
- secret(' et-wa-legal-ops-password' , ' ET_LEGAL_OPS_PASSWORD' ),
47
- secret(' et-ctsc-admin-user-name' , ' ET_CTSC_ADMIN_USER_NAME' ),
48
- secret(' et-ctsc-admin-password' , ' ET_CTSC_ADMIN_PASSWORD' ),
49
- secret(' et-hearing-judge-user-name-scotland' , ' ET_HEARING_JUDGE_USER_NAME_SCOT' ),
50
- secret(' et-hearing-judge-user-name-eng' , ' ET_HEARING_JUDGE_USER_NAME_ENG' ),
51
- secret(' et-hearing-admin-user-name-eng' , ' ET_HEARING_ADMIN_USER_NAME_ENG' ),
52
- secret(' et-hearing-admin-user-name-scot' , ' ET_HEARING_ADMIN_USER_NAME_SCOT' ),
53
- ]
35
+ ' et-${env}' : [
36
+ secret(' et-citizen-4-username' , ' TEST_CASE_USERNAME' ),
37
+ secret(' et-claimant-password' , ' TEST_CASE_PASSWORD' ),
38
+ secret(' idam-account-url' , ' IDAM_ACCOUNT_URL' ),
39
+ secret(' api-key' , ' API_KEY' ),
40
+ ],
41
+ ' et-cos-${env}' : [
42
+ secret(' et-caseworker-5-username' , ' ET_CASEWORKER_USER_NAME' ),
43
+ secret(' et-caseworker-5-password' , ' ET_CASEWORKER_PASSWORD' ),
44
+ secret(' et-legalrep-user-name' , ' ET_LEGALREP_USER_NAME' ),
45
+ secret(' et-legalrep-password' , ' ET_LEGALREP_PASSWORD' ),
46
+ secret(' et-wa-legal-ops-user-name' , ' ET_LEGAL_OPS_USER_NAME' ),
47
+ secret(' et-wa-legal-ops-password' , ' ET_LEGAL_OPS_PASSWORD' ),
48
+ secret(' et-ctsc-admin-user-name' , ' ET_CTSC_ADMIN_USER_NAME' ),
49
+ secret(' et-ctsc-admin-password' , ' ET_CTSC_ADMIN_PASSWORD' ),
50
+ secret(' et-hearing-judge-user-name-scotland' , ' ET_HEARING_JUDGE_USER_NAME_SCOT' ),
51
+ secret(' et-hearing-judge-user-name-eng' , ' ET_HEARING_JUDGE_USER_NAME_ENG' ),
52
+ secret(' et-hearing-admin-user-name-eng' , ' ET_HEARING_ADMIN_USER_NAME_ENG' ),
53
+ secret(' et-hearing-admin-user-name-scot' , ' ET_HEARING_ADMIN_USER_NAME_SCOT' ),
54
+ secret(' et-citizen-user-name' , ' ET_CITIZEN_USER_NAME' ),
55
+ secret(' et-citizen-password' , ' ET_CITIZEN_PASSWORD' ),
56
+ secret(' et-ccd-api-user-name' ,' ET_CCD_API_USER_NAME' ),
57
+ secret(' et-ccd-api-password' ,' ET_CCD_API_PASSWORD' )
58
+
59
+ ],
60
+ ' s2s-${env}' : [
61
+ secret(' microservicekey-ccd-gw' , ' MICROSERVICE_CCD_GW' )
62
+ ]
54
63
]
55
64
56
65
static LinkedHashMap<String , Object > secret (String secretName , String envVar ) {
@@ -63,61 +72,81 @@ static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
63
72
}
64
73
65
74
withNightlyPipeline(" nodejs" , product, component) {
75
+ // triggers {
76
+ // cron(env.BRANCH_NAME == 'master' ? 'H 8 * * 1-5' : '')
77
+ // }
66
78
loadVaultSecrets(secrets)
67
79
enableFullFunctionalTest(int timeout= 300 )
68
- enableCrossBrowserTest()
80
+ // enableCrossBrowserTest()
69
81
// enableFortifyScan()
70
82
// enableSecurityScan()
71
83
72
84
env. TEST_URL = params. ET_SYA_URL_TO_TEST
73
85
env. IDAM_URL = params. IDAM_URL
74
- env. TESTMANAGE_CASE_URL = params. CCD_CALLBACK_URL
86
+ env. TESTMANAGE_CASE_URL = params. CCD_CALLBACK_URL
75
87
env. ET_CASE_API_URL = params. ET_CASE_API_URL
76
88
env. RUNNING_ENV = params. ENVIRONMENT
77
89
78
- before(' crossBrowserTest' ) {
79
- sh """
80
- yarn playwright install
81
- """
90
+ before(' fullFunctionalTest' ) {
91
+ yarnBuilder. yarn(' yarn-update' )
92
+ yarnBuilder. yarn(' install-dependencies' )
82
93
}
83
94
84
- afterAlways(' crossBrowserTest' ) {
85
- steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' functional-output/**/*'
86
- sh """
87
- yarn playwright install
88
- """
89
- }
90
95
91
96
afterAlways(' fullFunctionalTest' ) {
92
- steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' functional-output/**/*'
93
-
94
- publishHTML target : [
95
- allowMissing : true ,
96
- alwaysLinkToLastBuild : true ,
97
- keepAll : true ,
98
- reportDir : " functional-output/e2e/reports" ,
99
- reportFiles : " ET-XUI-E2E.html" ,
100
- reportName : " ET E2E tests result"
101
- ]
102
- }
103
-
104
- afterAlways(' smoketest:aat' ) {
105
- loadVaultSecrets(inTestTrue)
106
- stage(' Accessibility' ) {
107
- yarnBuilder. yarn(' tests:a11y' )
108
- publishHTML([
109
- allowMissing : true ,
110
- alwaysLinkToLastBuild : true ,
111
- keepAll : true ,
112
- reportDir : " functional-output/accessibility-report" ,
113
- reportFiles : ' a11y.html' ,
114
- reportName : ' Accessibility results'
115
- ])
97
+ stage(' Functional UI tests chromium' ) {
98
+ try {
99
+ yarnBuilder. yarn(' test:functional-chromium' )
100
+ } catch (Error ) {
101
+ unstable(message : " ${ STAGE_NAME} is unstable: " + Error . toString())
102
+ } finally {
103
+ publishHTML([
104
+ allowMissing : true ,
105
+ alwaysLinkToLastBuild : true ,
106
+ keepAll : true ,
107
+ reportDir : ' playwright-report' ,
108
+ reportFiles : ' index.html' ,
109
+ reportName : ' UITestChromiumReport'
110
+ ])
111
+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' playwright-report/**'
112
+ }
113
+ }
114
+ stage(' Functional UI tests firefox' ) {
115
+ try {
116
+ yarnBuilder. yarn(' test:functional-firefox' )
117
+ } catch (Error ) {
118
+ unstable(message : " ${ STAGE_NAME} is unstable: " + Error . toString())
119
+ } finally {
120
+ publishHTML([
121
+ allowMissing : true ,
122
+ alwaysLinkToLastBuild : true ,
123
+ keepAll : true ,
124
+ reportDir : ' playwright-report' ,
125
+ reportFiles : ' index.html' ,
126
+ reportName : ' UITestFirefoxReport'
127
+ ])
128
+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' playwright-report/**'
129
+ }
130
+ }
131
+ stage(' Functional UI tests webkit ' ) {
132
+ try {
133
+ yarnBuilder. yarn(' test:functional-webkit' )
134
+ } catch (Error ) {
135
+ unstable(message : " ${ STAGE_NAME} is unstable: " + Error . toString())
136
+ } finally {
137
+ publishHTML([
138
+ allowMissing : true ,
139
+ alwaysLinkToLastBuild : true ,
140
+ keepAll : true ,
141
+ reportDir : ' playwright-report' ,
142
+ reportFiles : ' index.html' ,
143
+ reportName : ' UITestWebkitReport'
144
+ ])
145
+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' playwright-report/**'
146
+ }
116
147
}
117
- loadVaultSecrets(inTestFalse)
118
- sh """
119
- yarn playwright install
120
- """
121
148
}
122
-
123
149
}
150
+
151
+
152
+
0 commit comments