Rucha Mahabal
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
6 deletions
-
cypress/integration/test_organizational_chart_desktop.js
-
cypress/integration/test_organizational_chart_mobile.js
-
erpnext/public/js/hierarchy_chart/hierarchy_chart_desktop.js
|
@ -24,7 +24,7 @@ context('Organizational Chart', () => { |
|
|
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input'); |
|
|
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input'); |
|
|
cy.get('@input') |
|
|
cy.get('@input') |
|
|
.clear({ force: true }) |
|
|
.clear({ force: true }) |
|
|
.type('Test Org Chart{enter}', { force: true }) |
|
|
.type('Test Org Chart{downarrow}{enter}', { force: true }) |
|
|
.blur({ force: true }); |
|
|
.blur({ force: true }); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
@ -25,7 +25,7 @@ context('Organizational Chart Mobile', () => { |
|
|
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input'); |
|
|
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input'); |
|
|
cy.get('@input') |
|
|
cy.get('@input') |
|
|
.clear({ force: true }) |
|
|
.clear({ force: true }) |
|
|
.type('Test Org Chart{enter}', { force: true }) |
|
|
.type('Test Org Chart{downarrow}{enter}', { force: true }) |
|
|
.blur({ force: true }); |
|
|
.blur({ force: true }); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
@ -334,10 +334,12 @@ erpnext.HierarchyChart = class { |
|
|
|
|
|
|
|
|
if (child_nodes) { |
|
|
if (child_nodes) { |
|
|
$.each(child_nodes, (_i, data) => { |
|
|
$.each(child_nodes, (_i, data) => { |
|
|
|
|
|
if (!$(`[id="${data.id}"]`).length) { |
|
|
this.add_node(node, data); |
|
|
this.add_node(node, data); |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.add_connector(node.id, data.id); |
|
|
this.add_connector(node.id, data.id); |
|
|
}, 250); |
|
|
}, 250); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|