Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFA Create Enforcement Bug #20603

Merged
merged 2 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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'
);
});
});
Loading