UNPKG

prodap-chatbot-domain

Version:

Classes utilizadas na resposta de todas as Intents do Assistente Virtual

89 lines 2.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.barLineChart = void 0; const index_1 = require("../../../../index"); const DataTypes_1 = require("../../../types/DataTypes"); const barLineChart = () => { const result = new index_1.Dialog('BarLineChart'); const props0 = { chartProps: { title: 'any_title', subtitle: 'any_subtitle', chartText: 'any_chartText', legendTitle: 'any_legendTitle', showLegend: true, dataType: DataTypes_1.default.NUMBER, }, }; const props1 = { ...props0, titleAxisX: 'any_titleAxisX', titleAxisY: 'any_titleAxisY', horizontalScroll: false, }; const list = [ { barChart: [ new index_1.BarChart(props1) .addData({ label: 'any_label_0', value: 33, hasCollect: true, }, { label: 'any_label_1', value: 6, hasCollect: true, }, { label: 'any_label_2', value: 33, hasCollect: true, }) .addRule({ valMin: 0, valMax: 39, label: 'any_label_0', color: 'red', }, { valMin: 40, valMax: 54, label: 'any_label_1', color: 'orange', }, { valMin: 55, valMax: 100, label: 'Iany_label_2', color: 'green', }), ], lineChart: [ new index_1.LineChart(props1).addData([ { label: 'any_label_0', value: 33, hasCollect: true, }, { label: 'any_label_1', value: 6, hasCollect: true, }, { label: 'any_label_2', value: 33, hasCollect: true, }, ]), ], }, ]; const props2 = { ...props0.chartProps, list, }; result.add(new index_1.BarLineChart(props2)); expect(result.messages.length).toBe(1); const chat = result.messages[0]; expect(chat.list.length).toBe(1); }; exports.barLineChart = barLineChart; //# sourceMappingURL=BarLineChart.js.map