fix: sider

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

View File

@ -29,7 +29,7 @@ context('Organizational Chart', () => {
// check children of first node // check children of first node
cy.get('@employee_records').then(employee_records => { cy.get('@employee_records').then(employee_records => {
// children of 1st root visible // 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') cy.get('@child-node')
.should('have.length', 1) .should('have.length', 1)
.should('be.visible'); .should('be.visible');

View File

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

View File

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