vault/ui/tests/helpers/mfa/mfa-helpers.js
claire bontempo c881782a52
UI: Add auth tests (#30033)
* rename page test to login form

* add username/password tests to auth page test

* add github and generalize tests

* finish standard auth types for page test

* add tests for onNamespaceInput

* fix accessibility violation

* add oidc provider qp test

* move helper into test

* move destructured arg

* address oidc auth method flakiness...maybe?

* cleanup unused fake window methods

* add comment why...

* fix diff

* fix header

* finish mfa acceptance tests move mfa selectors to folder
2025-03-28 12:45:10 -07:00

27 lines
552 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
export const constraintId = '7028db82-7de3-01d7-26b5-84b147c80966';
export const setupTotpMfaResponse = (mountPath) => ({
auth: {
mfa_requirement: {
mfa_request_id: '0edf0945-da02-1300-9a0a-cb052cd94eb4',
mfa_constraints: {
[mountPath]: {
any: [
{
type: 'totp',
id: constraintId,
uses_passcode: true,
},
],
},
},
},
num_uses: 0,
},
});