describe("constructor", () => { it("should create a popup screen", () => { const gotoTimeView = new GotoTimeView(options); expect(gotoTimeView).to.be.an.instanceof(GotoTimeView); expect(gotoTimeView).to.have.property("metricsProvider").which.is.an.instanceOf(MetricsProvider); expect(gotoTimeView).to.have.property("screen").which.is.an("object"); expect(gotoTimeView).to.have.property("parent").which.is.an.instanceOf(blessed.box); expect(gotoTimeView).to.have.property("node").which.is.an.instanceOf(blessed.node); expect(gotoTimeView).to.have.property("form").which.is.an.instanceOf(blessed.form); expect(gotoTimeView).to.have.property("timeRangeLabel").which.is.an.instanceOf(blessed.text); expect(gotoTimeView).to.have.property("textBox").which.is.an.instanceOf(blessed.textbox); expect(gotoTimeView).to.have.property("errorText").which.is.an.instanceOf(blessed.text); expect(gotoTimeView).to.have.property("acceptButton").which.is.an.instanceOf(blessed.button); expect(gotoTimeView).to.have.property("cancelButton").which.is.an.instanceOf(blessed.button); }); });
/** * @constructor * @extends {Node} */ var Loading = function() { this._node = blessed.text({ bottom: 3, right: 1, height: 1, content: '|', bg: 'blue' }); app.ui.console.append(this._node); }
_render(printValue = '', postfix = '') { const chartStrings = this._renderChart(); const emptyPrefix = `${String(' ').repeat(this.title.length)}`; let content = []; for (let i = 0; i < chartStrings.length; i++) { if (i === 0) { content.push(`${this.title}${chartStrings[i]} {bold}${printValue}{/bold}${postfix}`); } else { content.push(`${emptyPrefix}${chartStrings[i]}`); } } content = content.join(EOL); if (this._chart) { this._chart.setContent(content); this.screen.render(); } else { this._chart = blessed.text({ parent: this.screen, tags: true, content, ...this.props }); } }
this.screen.render(); } else { this._chart = blessed.text({ parent: this.screen, tags: true,