open-nomad/ui/tests/pages/servers/monitor.js
Buck Doyle 7e4c746c82
Move breadcrumbs objects into shared layout object (#9576)
Various page objects had breadcrumbs and breadcrumbFor within them, this
moves those to the existing Layout page object that contains shared page objects.
2020-12-10 11:51:22 -06:00

23 lines
750 B
JavaScript

import { create, clickable, isPresent, text, visitable } from 'ember-cli-page-object';
import { run } from '@ember/runloop';
import { selectOpen, selectOpenChoose } from '../../utils/ember-power-select-extensions';
export default create({
visit: visitable('/servers/:name/monitor'),
logsArePresent: isPresent('[data-test-log-box]'),
error: {
isShown: isPresent('[data-test-error]'),
title: text('[data-test-error-title]'),
message: text('[data-test-error-message]'),
seekHelp: clickable('[data-test-error-message] a'),
},
async selectLogLevel(level) {
const contentId = await selectOpen('[data-test-level-switcher]');
run.later(run, run.cancelTimers, 500);
await selectOpenChoose(contentId, level);
},
});