From e1caa046bd3f388bb837451615b9a00ccd601b58 Mon Sep 17 00:00:00 2001 From: Iqpal Mannan Date: Thu, 21 Nov 2024 15:13:48 +0000 Subject: [PATCH] NDR enabled results in NDR on report page --- .../v2/DeputyManagement/DeputyManagementTrait.php | 6 +++--- .../tests/Behat/features-v2/acl/login/login.feature | 10 +--------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/api/app/tests/Behat/bootstrap/v2/DeputyManagement/DeputyManagementTrait.php b/api/app/tests/Behat/bootstrap/v2/DeputyManagement/DeputyManagementTrait.php index 7cd6b7fe43..9cf434011e 100644 --- a/api/app/tests/Behat/bootstrap/v2/DeputyManagement/DeputyManagementTrait.php +++ b/api/app/tests/Behat/bootstrap/v2/DeputyManagement/DeputyManagementTrait.php @@ -191,12 +191,12 @@ public function iShouldNotBeAbleToAccessClientDetailsLink() } /** - * @Then /^I "(enable|disable)" the NDR for this user$/ + * @Then /^I enable the NDR for this user$/ */ - public function iShouldBeAbleToToggleNdrEnabled($isEnabled) + public function iShouldBeAbleToToggleNdrEnabled() { $this->iVisitAdminEditUserPageForInteractingWithUser(); - 'enable' === $isEnabled ? $this->checkOption('admin_ndrEnabled') : $this->uncheckOption('admin_ndrEnabled'); + $this->checkOption('admin_ndrEnabled'); } } diff --git a/api/app/tests/Behat/features-v2/acl/login/login.feature b/api/app/tests/Behat/features-v2/acl/login/login.feature index 2b8b6f87e4..76a3dead11 100644 --- a/api/app/tests/Behat/features-v2/acl/login/login.feature +++ b/api/app/tests/Behat/features-v2/acl/login/login.feature @@ -131,17 +131,9 @@ Feature: Users logging into the service Scenario: A user logs into the service with their primary account and toggles with the NDR checkbox attached to non-primary account Given a super admin user accesses the admin app When a Multi-client Lay Deputy exists and I select the non-primary user - And I "enable" the NDR for this user + And I enable the NDR for this user And I update the details of the deputy available to me Then a Lay Deputy tries to login with their "primary" email address When they choose their "non-primary" Client Then they should be on the "non-primary" Client's dashboard And I should see the NDR report on the reports page - Given a super admin user accesses the admin app - When a Multi-client Lay Deputy exists and I select the non-primary user - When I "disable" the NDR for this user - And I update the details of the deputy available to me - Then a Lay Deputy tries to login with their "primary" email address - When they choose their "non-primary" Client - Then they should be on the "non-primary" Client's dashboard - Then I should not see the NDR report on the reports page