From 43fae505124877526646ae2fd46339293a7294ec Mon Sep 17 00:00:00 2001 From: Jordan Reimer Date: Tue, 16 May 2023 10:38:53 -0600 Subject: [PATCH] MFA Create Enforcement Bug (#20603) * fixes issue creating mfa enforcement from method enforcement tab toolbar action * adds changelog entry --- changelog/20603.txt | 3 +++ .../cluster/access/mfa/methods/method/index.hbs | 2 +- ui/tests/acceptance/mfa-method-test.js | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 changelog/20603.txt diff --git a/changelog/20603.txt b/changelog/20603.txt new file mode 100644 index 000000000..c3e7e2bbe --- /dev/null +++ b/changelog/20603.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: fixes issue creating mfa login enforcement from method enforcements tab +``` \ No newline at end of file diff --git a/ui/app/templates/vault/cluster/access/mfa/methods/method/index.hbs b/ui/app/templates/vault/cluster/access/mfa/methods/method/index.hbs index 930007be9..bcbd77bd8 100644 --- a/ui/app/templates/vault/cluster/access/mfa/methods/method/index.hbs +++ b/ui/app/templates/vault/cluster/access/mfa/methods/method/index.hbs @@ -78,7 +78,7 @@ {{else if (eq this.tab "enforcements")}} - + New enforcement diff --git a/ui/tests/acceptance/mfa-method-test.js b/ui/tests/acceptance/mfa-method-test.js index 95f135b3d..400b69b25 100644 --- a/ui/tests/acceptance/mfa-method-test.js +++ b/ui/tests/acceptance/mfa-method-test.js @@ -294,4 +294,16 @@ module('Acceptance | mfa-method', function (hooks) { .dom('[data-test-row-value="Max validation attempts"]') .hasText('10', 'Max validation attempts field is updated'); }); + + test('it should navigate to enforcements create route from method enforcement tab', async function (assert) { + await visit('/vault/access/mfa/methods'); + await click('[data-test-mfa-method-list-item]'); + await click('[data-test-tab="enforcements"]'); + await click('[data-test-enforcement-create]'); + assert.strictEqual( + currentRouteName(), + 'vault.cluster.access.mfa.enforcements.create', + 'Navigates to enforcements create route from toolbar action' + ); + }); });