Files
vault/ui/mirage/factories/mfa-okta-method.js
lane-wetmore 4b05b590f5 UI: MFA methods now display namespace_path instead of namespace_id (#29588)
* update mfa methods to use namespace_path instead of namespace_id

* add test for empty namespace path and add namespace path to factories

* add changelog entry

* fix name

* hide namespace label when path is empty and test updates
2025-02-13 21:16:34 +00:00

24 lines
575 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { Factory } from 'miragejs';
export default Factory.extend({
base_url: 'okta.com',
mount_accessor: '',
name: '', // returned but cannot be set at this time
namespace_path: 'admin/',
org_name: 'dev-foobar',
type: 'okta',
username_template: '', // returned but cannot be set at this time
afterCreate(record) {
if (record.name) {
console.warn('Endpoint ignored these unrecognized parameters: [name]'); // eslint-disable-line
record.name = '';
}
},
});