Skip to content

Commit

Permalink
backport of commit b78f4bf (#20604)
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
  • Loading branch information
1 parent b739a54 commit 5b8d69b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/20603.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: fixes issue creating mfa login enforcement from method enforcements tab
```
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
{{else if (eq this.tab "enforcements")}}
<Toolbar>
<ToolbarActions>
<ToolbarLink @type="add" @params={{array "vault.cluster.access.mfa.enforcements.create"}}>
<ToolbarLink @route="vault.cluster.access.mfa.enforcements.create" @type="add" data-test-enforcement-create>
New enforcement
</ToolbarLink>
</ToolbarActions>
Expand Down
12 changes: 12 additions & 0 deletions ui/tests/acceptance/mfa-method-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
});
});

0 comments on commit 5b8d69b

Please sign in to comment.