#49 feat: desplegable en seccion de provenance con leyenda de colores y titulo sin historia
This commit is contained in:
@@ -44,7 +44,7 @@ function visChart (wrapper) {
|
||||
}
|
||||
|
||||
function checkbox (wrapper, label) {
|
||||
return wrapper.findAllComponents({ name: 'VCheckbox' }).find(cb => cb.props('label') === label)
|
||||
return wrapper.findAllComponents({ name: 'VCheckbox' }).find(cb => cb.text().trim() === label)
|
||||
}
|
||||
|
||||
async function setKinds (wrapper, kinds) {
|
||||
@@ -75,10 +75,20 @@ describe('ProvenanceGraph', () => {
|
||||
it('muestra un checkbox por cada nivel con productos y proveedores activos', () => {
|
||||
const wrapper = mountGraph()
|
||||
|
||||
const labels = wrapper.findAllComponents({ name: 'VCheckbox' }).map(cb => cb.props('label'))
|
||||
const labels = wrapper.findAllComponents({ name: 'VCheckbox' }).map(cb => cb.text().trim())
|
||||
expect(labels).toEqual(['Productos', 'Proveedores', 'Organizaciones', 'Municipios', 'Departamentos', 'País'])
|
||||
})
|
||||
|
||||
it('dibuja un círculo de color junto a cada checkbox como leyenda', () => {
|
||||
const wrapper = mountGraph()
|
||||
|
||||
const dots = wrapper.findAll('.legend-dot')
|
||||
expect(dots).toHaveLength(6)
|
||||
expect(dots[0].element.style.backgroundColor).toBe('rgb(38, 166, 154)')
|
||||
expect(dots[1].element.style.backgroundColor).toBe('rgb(66, 165, 245)')
|
||||
expect(dots[2].element.style.backgroundColor).toBe('rgb(255, 183, 77)')
|
||||
})
|
||||
|
||||
it('al activar municipios agrega nodos de municipio y la arista proveedor→municipio', async () => {
|
||||
const wrapper = mountGraph()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user