mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-23 15:41:07 +02:00
* update test helpers, export DELAY_IN_MS, make window event a helper * simplify auth method map helpers, move page tests into separate files * use new buttons * finish separating page tests * move test helpers back to relevant files * remove redundant oidc test * move misplaced linked block AUTH_FORM selector * i definitely already addressed these.. * comment meant remove "trailing" forward slash...lol * cleanup stubs
34 lines
1023 B
JavaScript
34 lines
1023 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* 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.cluster = { id: '1' };
|
|
context.directLinkData = null;
|
|
context.loginSettings = null;
|
|
context.namespaceQueryParam = '';
|
|
context.oidcProviderQueryParam = '';
|
|
context.onAuthSuccess = sinon.spy();
|
|
context.onNamespaceUpdate = sinon.spy();
|
|
context.visibleAuthMounts = false;
|
|
|
|
context.renderComponent = () => {
|
|
return render(hbs`<Auth::Page
|
|
@cluster={{this.cluster}}
|
|
@directLinkData={{this.directLinkData}}
|
|
@loginSettings={{this.loginSettings}}
|
|
@namespaceQueryParam={{this.namespaceQueryParam}}
|
|
@oidcProviderQueryParam={{this.oidcProviderQueryParam}}
|
|
@onAuthSuccess={{this.onAuthSuccess}}
|
|
@onNamespaceUpdate={{this.onNamespaceUpdate}}
|
|
@visibleAuthMounts={{this.visibleAuthMounts}}
|
|
/>`);
|
|
};
|
|
};
|