Latest updates from IceHrmPro
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
const IceCypressTest = require('../../commmon/ice-cypress-test');
|
||||
const config = require('../../support/config');
|
||||
|
||||
const test = new IceCypressTest(
|
||||
'g=admin&n=company_structure&m=admin_Admin',
|
||||
'CompanyStructure',
|
||||
);
|
||||
|
||||
context('Admin Company Structure Module - Company Structure Tab', () => {
|
||||
|
||||
it('admin can view list', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.loadTable(cy, 9);
|
||||
});
|
||||
|
||||
it('admin can edit element', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.editElement(cy, [['#address', 'Address 1']]);
|
||||
test.clickSave(cy);
|
||||
test.editElementValidate(cy, [['#address', 'Address 1']]);
|
||||
});
|
||||
|
||||
it('manager can view list', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.loadTable(cy, 9);
|
||||
});
|
||||
|
||||
it('manager can not edit element', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.canNotEditElement(cy);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
const IceCypressTest = require('../../commmon/ice-cypress-test');
|
||||
|
||||
const test = new IceCypressTest(
|
||||
'g=admin&n=employees&m=admin_Employees',
|
||||
'EmployeeSkill',
|
||||
true,
|
||||
);
|
||||
|
||||
context('Admin Employee Module - Skills Tab', () => {
|
||||
|
||||
it('admin can view list', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.switchTab(cy);
|
||||
test.loadTable(cy, 2);
|
||||
});
|
||||
|
||||
it('admin can edit element', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.switchTab(cy);
|
||||
test.editElement(cy, [['#details', 'Employee skill']]);
|
||||
test.select2Click('skill_id', 'Networking');
|
||||
test.clickSave(cy);
|
||||
test.editElementValidate(cy, [['#details', 'Employee skill']]);
|
||||
});
|
||||
});
|
||||
53
test/frontend/cypress/integration/admin/employee.spec.js
Normal file
53
test/frontend/cypress/integration/admin/employee.spec.js
Normal file
@@ -0,0 +1,53 @@
|
||||
const IceCypressTest = require('../../commmon/ice-cypress-test');
|
||||
const config = require('../../support/config');
|
||||
|
||||
const test = new IceCypressTest(
|
||||
'g=admin&n=employees&m=admin_Employees',
|
||||
'Employee',
|
||||
true,
|
||||
);
|
||||
|
||||
context('Admin Employee Module - Employee Tab', () => {
|
||||
|
||||
it('admin can view list', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.loadTable(cy);
|
||||
});
|
||||
|
||||
it('admin can view element', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.viewElement(cy);
|
||||
test.viewElementValidate(cy, [['#name', 'IceHrm Employee']]);
|
||||
});
|
||||
|
||||
it('admin can edit element', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.editElement(cy, [['#middle_name', 'Middle Name']]);
|
||||
test.clickSave(cy);
|
||||
test.editElementValidate(cy, [['#middle_name', 'Middle Name']]);
|
||||
});
|
||||
|
||||
it('manager can view list', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.loadTable(cy);
|
||||
});
|
||||
|
||||
it('manager can view element', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.viewElement(cy);
|
||||
test.viewElementValidate(cy, [['#name', 'IceHrm Employee']]);
|
||||
});
|
||||
|
||||
it('manager can edit element', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.editElement(cy, [['#middle_name', 'Middle Name 1']]);
|
||||
test.clickSave(cy);
|
||||
test.editElementValidate(cy, [['#middle_name', 'Middle Name 1']]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
const IceCypressTest = require('../../commmon/ice-cypress-test');
|
||||
const config = require('../../support/config');
|
||||
|
||||
const test = new IceCypressTest(
|
||||
'g=admin&n=teams&m=admin_Employees',
|
||||
'TeamMembers',
|
||||
false,
|
||||
);
|
||||
|
||||
context('Admin Teams Module - Team Members Tab', () => {
|
||||
it('admin can view list', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.switchTab(cy);
|
||||
test.loadTable(cy, 2);
|
||||
});
|
||||
|
||||
it('admin can edit element', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.switchTab(cy);
|
||||
cy.get('#TeamMembers table tbody').find('tr').first().find('.center div img[data-original-title=\'Edit\']')
|
||||
.click();
|
||||
test.select2Click('team', 'beta');
|
||||
test.clickSave(cy);
|
||||
});
|
||||
|
||||
it('manager can view list', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.switchTab(cy);
|
||||
test.loadTable(cy, 2);
|
||||
});
|
||||
|
||||
it('manager can edit element', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.switchTab(cy);
|
||||
cy.get('#TeamMembers table tbody').find('tr').first().find('.center div img[data-original-title=\'Edit\']')
|
||||
.click();
|
||||
test.select2Click('team', 'beta');
|
||||
test.clickSave(cy);
|
||||
});
|
||||
});
|
||||
40
test/frontend/cypress/integration/admin/teams.spec.js
Normal file
40
test/frontend/cypress/integration/admin/teams.spec.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const IceCypressTest = require('../../commmon/ice-cypress-test');
|
||||
const config = require('../../support/config');
|
||||
|
||||
const test = new IceCypressTest(
|
||||
'g=admin&n=teams&m=admin_Employees',
|
||||
'Teams',
|
||||
false,
|
||||
);
|
||||
|
||||
context('Admin Teams Module - Teams Tab', () => {
|
||||
it('admin can view list', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.loadTable(cy, 2);
|
||||
});
|
||||
|
||||
it('admin can edit element', () => {
|
||||
cy.login('admin', 'admin');
|
||||
test.loadModule(cy);
|
||||
test.editElement(cy, [['#description', 'creative designing team']]);
|
||||
test.select2Click('department', 'Head Office');
|
||||
test.clickSave(cy);
|
||||
test.editElementValidate(cy, [['#description', 'creative designing team']]);
|
||||
});
|
||||
|
||||
it('manager can view list', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.loadTable(cy, 2);
|
||||
});
|
||||
|
||||
it('manager can edit element', () => {
|
||||
cy.login('manager', config.DEFAULT_USER_PASS);
|
||||
test.loadModule(cy);
|
||||
test.editElement(cy, [['#description', 'creative designing team']]);
|
||||
test.select2Click('department', 'Head Office');
|
||||
test.clickSave(cy);
|
||||
test.editElementValidate(cy, [['#description', 'creative designing team']]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user