Skip to content

Commit 5edf3c4

Browse files
build: add accessibility script to jenkins
1 parent a320a89 commit 5edf3c4

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

Jenkinsfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,31 @@ spec:
266266
}
267267
}
268268
}
269+
stage('Accessibility testing') {
270+
when {
271+
branch 'uds-1892'
272+
}
273+
steps {
274+
container('playwright') {
275+
def acessibilityTestResults = sh(
276+
script: 'yarn test:accessibility',
277+
returnStatus: true
278+
)
279+
if (acessibilityTestResults != 0) {
280+
slackSend(
281+
channel: '#prd-uds',
282+
color: 'warning',
283+
message: "@uds-developers Action might be needed: ${env.RUN_DISPLAY_URL}"
284+
)
285+
} else {
286+
slackSend(
287+
channel: '#prd-uds',
288+
color: 'warning',
289+
message: "@uds-developers Accessibility Testing, Please Ignore: ${env.RUN_DISPLAY_URL}"
290+
)
291+
}
292+
}
293+
}
294+
}
269295
}
270296
}

packages/unity-react-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"create": "plop",
3232
"dev": "yarn storybook & yarn testui",
3333
"lint": "eslint --fix 'src/**/*.{js,jsx}' --ignore-path ../../.eslintignore",
34-
"test": "vitest --watch=false && npx playwright test",
35-
"test:accessibility": "playwright test tests/accessibility.spec.js --config playwright.config.js",
34+
"test": "vitest --watch=false",
35+
"test:accessibility": "playwright test",
3636
"testui": "vitest --ui",
3737
"start:dev": "webpack-dashboard -- webpack serve -c webpack/webpack.dev.js",
3838
"build": "vite build -c vite.config.js && yarn loop && yarn postbuild && tsc",

0 commit comments

Comments
 (0)