Skip to content

Commit 5078eae

Browse files
moved out function for readability and updated reression tix
1 parent 49f7054 commit 5078eae

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

.github/workflows/run_regression_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }}
7474
run: |
7575
if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
76-
REGRESSION_TEST_REPO_TAG="aea-5081-latest-header" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name
76+
REGRESSION_TEST_REPO_TAG="v3.6.1" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name
7777
REGRESSION_TEST_WORKFLOW_TAG="v3.5.10" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG
7878
7979
if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then

packages/cpt-ui/src/components/EpsRoleSelectionPage.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ export default function RoleSelectionPage({
110110
}
111111
}
112112

113+
const handleCardKeyDown = (e: React.KeyboardEvent, roleCardProps: RolesWithAccessProps) => {
114+
if (e.key === "Enter" || e.key === " ") {
115+
e.preventDefault()
116+
handleSetSelectedRole(e, roleCardProps)
117+
}
118+
}
119+
120+
const handleCardClick = (e: React.MouseEvent, roleCardProps: RolesWithAccessProps) => {
121+
e.preventDefault()
122+
handleSetSelectedRole(e, roleCardProps)
123+
}
124+
113125
useEffect(() => {
114126
// Transform roles data for display
115127
setRoleCardPropsWithAccess((!auth.hasNoAccess)
@@ -262,16 +274,8 @@ export default function RoleSelectionPage({
262274
data-testid="eps-card"
263275
className="nhsuk-card nhsuk-card--primary nhsuk-u-margin-bottom-4"
264276
tabIndex={0}
265-
onKeyDown={(e) => {
266-
if (e.key === "Enter" || e.key === " ") {
267-
e.preventDefault()
268-
handleSetSelectedRole(e, roleCardProps)
269-
}
270-
}}
271-
onClick={(e) => {
272-
e.preventDefault()
273-
handleSetSelectedRole(e, roleCardProps)
274-
}}
277+
onKeyDown={(e) => handleCardKeyDown(e, roleCardProps)}
278+
onClick={(e) => handleCardClick(e, roleCardProps)}
275279
style={{cursor: "pointer"}}
276280
>
277281
<Card.Content>

0 commit comments

Comments
 (0)