mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 08:55:43 +03:00
* 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
39 lines
789 B
JavaScript
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);
|
|
}
|