MFA Create Enforcement Bug (#20603)

* fixes issue creating mfa enforcement from method enforcement tab toolbar action

* adds changelog entry
This commit is contained in:
Jordan Reimer 2023-05-16 10:38:53 -06:00 committed by GitHub
parent 89e5b566ac
commit 43fae50512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

3
changelog/20603.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: fixes issue creating mfa login enforcement from method enforcements tab
```

View File

@ -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>

View File

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