mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
fixes issue transitioning to overview from destination route via breadcrumb (#24663)
This commit is contained in:
parent
610c8a4d38
commit
1c04c8ab62
2 changed files with 37 additions and 0 deletions
|
|
@ -73,6 +73,7 @@
|
|||
@currentPage={{@associations.meta.currentPage}}
|
||||
@currentPageSize={{@associations.meta.pageSize}}
|
||||
@route="secrets.destinations.destination.secrets"
|
||||
@model={{@destination}}
|
||||
@showSizeSelector={{false}}
|
||||
@totalItems={{@associations.meta.filteredTotal}}
|
||||
@queryFunction={{this.paginationQueryParams}}
|
||||
|
|
|
|||
36
ui/tests/acceptance/sync/secrets/destination-test.js
Normal file
36
ui/tests/acceptance/sync/secrets/destination-test.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
import { module, test } from 'qunit';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
import { setupMirage } from 'ember-cli-mirage/test-support';
|
||||
import syncScenario from 'vault/mirage/scenarios/sync';
|
||||
import syncHandlers from 'vault/mirage/handlers/sync';
|
||||
import authPage from 'vault/tests/pages/auth';
|
||||
import { click, visit, currentURL } from '@ember/test-helpers';
|
||||
import { PAGE } from 'vault/tests/helpers/sync/sync-selectors';
|
||||
|
||||
const { breadcrumbAtIdx } = PAGE;
|
||||
|
||||
module('Acceptance | sync | destination', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
setupMirage(hooks);
|
||||
|
||||
hooks.beforeEach(async function () {
|
||||
syncScenario(this.server);
|
||||
syncHandlers(this.server);
|
||||
return authPage.login();
|
||||
});
|
||||
|
||||
test('it should transition to overview route via breadcrumb', async function (assert) {
|
||||
await visit('vault/sync/secrets/destinations/aws-sm/destination-aws/secrets');
|
||||
await click(breadcrumbAtIdx(0));
|
||||
assert.strictEqual(
|
||||
currentURL(),
|
||||
'/vault/sync/secrets/overview',
|
||||
'Transitions to overview on breadcrumb click'
|
||||
);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue