fix: sider

This commit is contained in:
Rucha Mahabal 2021-07-15 19:32:15 +05:30
parent a1d379d5d4
commit 525d4d4776
3 changed files with 7 additions and 8 deletions

View File

@ -29,7 +29,7 @@ context('Organizational Chart', () => {
// check children of first node
cy.get('@employee_records').then(employee_records => {
// children of 1st root visible
cy.get(`[data-parent="${employee_records.message[0]}"]`).as('child-node')
cy.get(`[data-parent="${employee_records.message[0]}"]`).as('child-node');
cy.get('@child-node')
.should('have.length', 1)
.should('be.visible');
@ -39,7 +39,7 @@ context('Organizational Chart', () => {
cy.get(`path[data-parent="${employee_records.message[0]}"]`)
.should('be.visible')
.invoke('attr', 'data-child')
.should('equal', employee_records.message[2]);
.should('equal', employee_records.message[2]);
});
});

View File

@ -43,7 +43,7 @@ context('Organizational Chart Mobile', () => {
// children of active root node
cy.get('.hierarchy-mobile').find('.level').first().find('ul.node-children').children()
.should('have.length', 2)
.should('have.length', 2);
cy.get(`[data-parent="${employee_records.message[1]}"]`).first().as('child-node');
cy.get('@child-node').should('be.visible');
@ -56,7 +56,7 @@ context('Organizational Chart Mobile', () => {
cy.get(`path[data-parent="${employee_records.message[1]}"]`).as('connectors');
cy.get('@connectors')
.should('have.length', 2)
.should('be.visible')
.should('be.visible');
cy.get('@connectors')
.first()
@ -104,7 +104,7 @@ context('Organizational Chart Mobile', () => {
cy.get('@sibling_group')
.should('have.attr', 'data-parent', 'undefined')
.should('have.class', 'node-group')
.and('have.class', 'collapsed')
.and('have.class', 'collapsed');
cy.get('@sibling_group').get('.avatar-group').children().as('siblings');
cy.get('@siblings').should('have.length', 1);
@ -137,7 +137,7 @@ context('Organizational Chart Mobile', () => {
it('expands sibling group', () => {
cy.get('@employee_records').then(employee_records => {
// sibling group visible for parent
cy.get(`#${employee_records.message[6]}`).click()
cy.get(`#${employee_records.message[6]}`).click();
cy.get(`#${employee_records.message[3]}`)
.next()

View File

@ -1,10 +1,9 @@
import frappe
from frappe import _
from frappe.utils import getdate
@frappe.whitelist()
def create_employee_records():
company = create_company()
create_company()
create_missing_designation()
emp1 = create_employee('Test Employee 1', 'CEO')