mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
* adds constants util for wizards and updates service to use WizardId type * updates wizards to use WIZARD_ID_MAP values * updates wizard tests to use the service for dismissal * updates playwright setup to add all wizard ids as dismissed in localStorage * removes wizard dismissal step from existing playwright tests * fixes issues accessing owner in beforeEach hooks of namespaces acceptance tests Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
29 lines
682 B
TypeScript
29 lines
682 B
TypeScript
/**
|
|
* Copyright IBM Corp. 2016, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { service } from '@ember/service';
|
|
import { action } from '@ember/object';
|
|
import Component from '@glimmer/component';
|
|
import { WIZARD_ID_MAP } from 'vault/utils/constants/wizard';
|
|
|
|
import type WizardService from 'vault/services/wizard';
|
|
|
|
interface Args {
|
|
isIntroModal: boolean;
|
|
onRefresh: CallableFunction;
|
|
}
|
|
|
|
export default class WizardMethodsWizardComponent extends Component<Args> {
|
|
@service declare readonly wizard: WizardService;
|
|
|
|
wizardId = WIZARD_ID_MAP.authMethods;
|
|
|
|
@action
|
|
async onDismiss() {
|
|
this.wizard.dismiss(this.wizardId);
|
|
await this.args.onRefresh();
|
|
}
|
|
}
|