Files
nomad/ui/tests/helpers/helios.js
Phil Renaud 89cceebb91 [ui] Multi-line variable values and helios upgrades generally (#19544)
* Multi-line variable values and helios upgrades generally

* Variables page titles and actions restyle

* Hacky fix to keyboard shortcut otherwise bumping space on shift

* Related entities heliosified

* Namespace and path fields heliosed

* Paths table heliosified

* Variable view table

* Fixups after design discussion

* Monospaced editing

* De-commented template placeholder

* Acceptance tests updated for helios components across variables

* Tests helios'd in variable-form-test

* PR suggestions
2024-01-03 15:54:22 -05:00

39 lines
789 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
// @ts-check
import {
click,
// fillIn,
// triggerKeyEvent,
// triggerEvent,
} from '@ember/test-helpers';
/**
* @param {string} scope
* @param {*} options
*/
export async function clickToggle(scope, options) {
let selector = '.hds-dropdown-toggle-button';
if (scope) {
selector = `${scope} ${selector}`;
}
return click(selector, options);
}
/**
* @param {string} scope
* @param {string} option the name of the option to click
* @param {*} options
*/
export async function clickOption(scope, option, options) {
let selector = `.hds-dropdown-list-item label input[name="${option}"]`;
if (scope) {
selector = `${scope} ${selector}`;
}
return click(selector, options);
}