From 98417841e54da8d90ed275d5e31a5f393466a9d3 Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Wed, 6 Nov 2024 14:15:51 +0600 Subject: [PATCH] test: check for signature scope in tests --- packages/client/src/tests/forms.json | 2 +- packages/client/src/tests/util.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/tests/forms.json b/packages/client/src/tests/forms.json index 07a7aefd20..8b2502378d 100644 --- a/packages/client/src/tests/forms.json +++ b/packages/client/src/tests/forms.json @@ -12393,7 +12393,7 @@ "conditionals": [ { "action": "hide", - "expression": "values.role!==\"LOCAL_REGISTRAR\" && values.role!==\"NATIONAL_REGISTRAR\"" + "expression": "!values.scopes?.includes('profile.electronic-signature')" } ], "fields": [ diff --git a/packages/client/src/tests/util.tsx b/packages/client/src/tests/util.tsx index d5fac51daf..15c8bc355f 100644 --- a/packages/client/src/tests/util.tsx +++ b/packages/client/src/tests/util.tsx @@ -1641,6 +1641,7 @@ export const mockDataWithRegistarRoleSelected = { phoneNumber: '01662132132', registrationOffice: '895cc945-94a9-4195-9a29-22e9310f3385', role: 'LOCAL_REGISTRAR', + scopes: [SCOPES.PROFILE_ELECTRONIC_SIGNATURE], userDetails: '', username: '', signature: {