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' + ); + }); });