fixes issue transitioning to overview from destination route via breadcrumb (#24663)

This commit is contained in:
Jordan Reimer 2024-01-03 11:07:43 -07:00 committed by GitHub
parent 610c8a4d38
commit 1c04c8ab62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

View file

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

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