07831ab455
This closes #10146. Because of cibernox/ember-power-select#1203, which documents the current impossibility of attaching test selectors to a PowerSelect invocation, this uses test selectors on parent containers instead, occasionally adding wrappers when needed. I chose to leave the existing test selectors in the hopes that we can return to using them eventually, but I could easily remove them if it seems like extra noise now. Presumably for the same reason, @class no longer works, so this adjusts the scoping of global search CSS to preserve the style of the search control. I also included an update to the latest version of ember-test-selectors, since we were far behind and I tried that before finding the aforelinked issue. Finally, this replaces ember-cli-uglify with ember-cli-terser to address production build failures as described at ember-cli/ember-cli#9290.
23 lines
757 B
JavaScript
23 lines
757 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-parent]');
|
|
run.later(run, run.cancelTimers, 500);
|
|
await selectOpenChoose(contentId, level);
|
|
},
|
|
});
|