mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-04 20:06:27 +02:00
* license: update headers to IBM Corp. * `make proto` * update offset because source file changed Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright IBM Corp. 2016, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { render } from '@ember/test-helpers';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
import sinon from 'sinon';
|
|
|
|
export default (context) => {
|
|
context.version = context.owner.lookup('service:version');
|
|
context.api = context.owner.lookup('service:api');
|
|
context.cluster = { id: '1' };
|
|
context.directLinkData = null;
|
|
context.loginSettings = null;
|
|
context.namespaceQueryParam = '';
|
|
context.oidcProviderQueryParam = '';
|
|
// mocking as an object with the `perform()` method because loginAndTransition is a concurrency task
|
|
context.loginAndTransition = { perform: sinon.spy() };
|
|
context.onNamespaceUpdate = sinon.spy();
|
|
context.visibleAuthMounts = null;
|
|
|
|
context.renderComponent = () => {
|
|
return render(hbs`<Auth::Page
|
|
@cluster={{this.cluster}}
|
|
@directLinkData={{this.directLinkData}}
|
|
@loginSettings={{this.loginSettings}}
|
|
@namespaceQueryParam={{this.namespaceQueryParam}}
|
|
@oidcProviderQueryParam={{this.oidcProviderQueryParam}}
|
|
@loginAndTransition={{this.loginAndTransition}}
|
|
@onNamespaceUpdate={{this.onNamespaceUpdate}}
|
|
@visibleAuthMounts={{this.visibleAuthMounts}}
|
|
/>`);
|
|
};
|
|
};
|