2020-10-14 07:54:39 +00:00
|
|
|
import { attribute, collection, clickable, hasClass, isPresent, text } from 'ember-cli-page-object';
|
2020-10-12 05:58:44 +00:00
|
|
|
|
|
|
|
const allocationRect = {
|
|
|
|
select: clickable(),
|
|
|
|
width: attribute('width', '> rect'),
|
|
|
|
height: attribute('height', '> rect'),
|
|
|
|
isActive: hasClass('is-active'),
|
|
|
|
isSelected: hasClass('is-selected'),
|
|
|
|
running: hasClass('running'),
|
|
|
|
failed: hasClass('failed'),
|
|
|
|
pending: hasClass('pending'),
|
|
|
|
};
|
|
|
|
|
|
|
|
export default scope => ({
|
|
|
|
scope,
|
|
|
|
|
|
|
|
label: text('[data-test-label]'),
|
2020-10-14 07:54:39 +00:00
|
|
|
labelIsPresent: isPresent('[data-test-label]'),
|
2020-10-12 05:58:44 +00:00
|
|
|
statusIcon: attribute('class', '[data-test-status-icon] .icon'),
|
|
|
|
statusIconLabel: attribute('aria-label', '[data-test-status-icon]'),
|
|
|
|
|
|
|
|
selectNode: clickable('[data-test-node-background]'),
|
|
|
|
nodeIsInteractive: hasClass('is-interactive', '[data-test-node-background]'),
|
|
|
|
nodeIsSelected: hasClass('is-selected', '[data-test-node-background]'),
|
|
|
|
|
|
|
|
memoryRects: collection('[data-test-memory-rect]', {
|
|
|
|
...allocationRect,
|
|
|
|
id: attribute('data-test-memory-rect'),
|
|
|
|
}),
|
|
|
|
cpuRects: collection('[data-test-cpu-rect]', {
|
|
|
|
...allocationRect,
|
|
|
|
id: attribute('data-test-cpu-rect'),
|
|
|
|
}),
|
|
|
|
|
|
|
|
emptyMessage: text('[data-test-empty-message]'),
|
2020-10-30 20:57:09 +00:00
|
|
|
isEmpty: hasClass('is-empty'),
|
2020-10-12 05:58:44 +00:00
|
|
|
});
|