fix: sider
This commit is contained in:
parent
ee7eaf9c70
commit
8961a267f6
@ -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');
|
||||||
@ -39,7 +39,7 @@ context('Organizational Chart', () => {
|
|||||||
cy.get(`path[data-parent="${employee_records.message[0]}"]`)
|
cy.get(`path[data-parent="${employee_records.message[0]}"]`)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.invoke('attr', 'data-child')
|
.invoke('attr', 'data-child')
|
||||||
.should('equal', employee_records.message[2]);
|
.should('equal', employee_records.message[2]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
@ -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')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user