vault/ui/tests/helpers/auth/auth-form-selectors.ts
claire bontempo e80d0ac68c
UI: Auth test cleanup to prep for auth service refactor (#30949)
* 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
2025-06-12 09:46:45 -07:00

18 lines
628 B
TypeScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
export const AUTH_FORM = {
description: '[data-test-description]',
form: '[data-test-auth-form]',
selectMethod: '[data-test-select="auth type"]',
tabBtn: (method: string) => `[data-test-auth-tab="${method}"] button`, // method is all lowercased
tabs: '[data-test-auth-tab]',
advancedSettings: '[data-test-auth-form-options-toggle] button',
authForm: (type: string) => `[data-test-auth-form="${type}"]`,
helpText: '[data-test-auth-helptext]',
logo: '[data-test-auth-logo]',
managedNsRoot: '[data-test-managed-namespace-root]',
};