Files
nomad/ui/tests/pages/exec.js
Phil Renaud c9e4351ee5 [ui] Icon migration from {{x-icon}} to Helios (#25353)
* First batch of x-icon to hds::icons

* Bunch more icons and a note for jobrow

* Fixes for tests that depended on specific action names

* Icon-bumped-down specified to solo-icons in table cells

* Class-basing the icon bump and deferring icon svg load in env

* Exec window sidebar icons were looking a little off
2025-03-14 13:22:18 -04:00

58 lines
1.3 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import {
clickable,
collection,
create,
hasClass,
isPresent,
text,
triggerable,
visitable,
} from 'ember-cli-page-object';
export default create({
visitJob: visitable('/exec/:job'),
visitTaskGroup: visitable('/exec/:job/:task_group'),
visitTask: visitable('/exec/:job/:task_group/:task_name'),
header: {
region: { scope: '[data-test-region]' },
namespace: { scope: '[data-test-namespace]' },
job: text('[data-test-job]'),
},
taskGroups: collection('[data-test-task-group]', {
click: clickable('[data-test-task-group-name]'),
name: text('[data-test-task-group-name]'),
isLoading: hasClass('is-loading', '[data-test-task-group-name]'),
chevron: {
scope: '.toggle-button .hds-icon',
isDown: hasClass('hds-icon-chevron-down'),
isRight: hasClass('hds-icon-chevron-right'),
},
tasks: collection('[data-test-task]', {
name: text(),
isActive: isPresent('.active-identifier'),
}),
}),
terminal: {
scope: '.xterm-helper-textarea',
pressEnter: triggerable('keydown', '', {
eventProperties: { keyCode: 13 },
}),
},
jobDead: {
scope: '[data-test-exec-job-dead]',
message: text('[data-test-exec-job-dead-message]'),
},
});