From 5b8d69bc7dea4a2d0f1da37a2e7db8a6017faff6 Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Tue, 16 May 2023 13:36:00 -0400 Subject: [PATCH] backport of commit b78f4bffcccdd4f09a21857c8f998ed2cfbac7f3 (#20604) Co-authored-by: Jordan Reimer --- 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 000000000000..c3e7e2bbe7db --- /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 930007be944f..bcbd77bd831a 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 b69b3c514709..7f0cc5518443 100644 --- a/ui/tests/acceptance/mfa-method-test.js +++ b/ui/tests/acceptance/mfa-method-test.js @@ -289,4 +289,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' + ); + }); });