-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Jordan Reimer <[email protected]>
- Loading branch information
1 parent
36709b9
commit 030a41b
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
ui: fixes issue navigating back a level using the breadcrumb from secret metadata view | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
ui/tests/acceptance/secrets/backend/kv/breadcrumbs-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { create } from 'ember-cli-page-object'; | ||
import { module, test } from 'qunit'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import { click, currentURL, fillIn, visit } from '@ember/test-helpers'; | ||
import authPage from 'vault/tests/pages/auth'; | ||
import consoleClass from 'vault/tests/pages/components/console/ui-panel'; | ||
|
||
const consolePanel = create(consoleClass); | ||
|
||
module('Acceptance | kv | breadcrumbs', function (hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('it should route back to parent path from metadata tab', async function (assert) { | ||
await authPage.login(); | ||
await consolePanel.runCommands(['delete sys/mounts/kv', 'write sys/mounts/kv type=kv-v2']); | ||
await visit('/vault/secrets/kv/list'); | ||
await click('[data-test-secret-create]'); | ||
await fillIn('[data-test-secret-path]', 'foo/bar'); | ||
await click('[data-test-secret-save]'); | ||
await click('[data-test-secret-metadata-tab]'); | ||
await click('[data-test-secret-breadcrumb="foo"]'); | ||
assert.strictEqual( | ||
currentURL(), | ||
'/vault/secrets/kv/list/foo/', | ||
'Routes back to list view on breadcrumb click' | ||
); | ||
await consolePanel.runCommands(['delete sys/mounts/kv']); | ||
}); | ||
}); |