UNPKG

prodap-chatbot-domain

Version:

Classes utilizadas na resposta de todas as Intents do Assistente Virtual

49 lines 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.horizontalMenu = void 0; const index_1 = require("../../../../index"); const horizontalMenu = () => { const result = new index_1.Dialog('HorizontalMenu'); const titlePasto = { text: 'Pasto', color: '#000', }; const iconPasto = { height: 20, width: 20, color: '#fff', base64: 'base64...', }; const indicadores = [ { title: { text: 'Vistoria de Lotes', color: '#000' }, name: 'vistoria_lotes', backgroundColor: '#fff', url: 'intencao_vistoria_lotes', }, { title: { text: 'Itens Produtivos', color: '#000' }, name: 'itens_produtivos', backgroundColor: '#fff', url: 'intencao_itens_produtivos', }, { title: { text: 'Desabastecimento de Cocho', color: '#000' }, name: 'desabastecimento_cocho', backgroundColor: '#fff', url: 'intencao_desabastecimento_cocho', }, ]; result.add(new index_1.HorizontalMenu(titlePasto, 'pasto', iconPasto, '#cfs', ...indicadores)); expect(result.messages.length).toBe(1); const component = result.messages[0]; expect(component.indicators.length).toBe(3); const chartItem = component.indicators[0]; expect(chartItem).toHaveProperty('title'); expect(chartItem).toHaveProperty('name'); expect(chartItem).toHaveProperty('backgroundColor'); expect(chartItem).toHaveProperty('url'); console.log(component.indicators); }; exports.horizontalMenu = horizontalMenu; //# sourceMappingURL=HorizontalMenu.js.map