Skip to content

Commit

Permalink
Merge branch 'staging' into PCHR-3997-allow-own-leave-approver
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpavlov committed Jul 30, 2018
2 parents ce5c991 + f2a12db commit e1bee09
Show file tree
Hide file tree
Showing 100 changed files with 11,949 additions and 9,401 deletions.
2 changes: 1 addition & 1 deletion contactaccessrights/js/dist/access-rights.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions contactsummary/js/dist/contact-summary.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ define([
var $httpBackend, $rootScope, $q, contractServiceMock, controller, ctrlConstructor,
jobRoleServiceMock, pubSub;

beforeEach(module('contactsummary', 'contactsummary.mocks'));
beforeEach(module('contactsummary', 'contactsummary.mocks', 'contact-summary.templates'));

beforeEach(module(function ($provide) {
$provide.factory('contractService', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ define([
'use strict';

describe('FormGeneralController', function () {
var $controller, $provide, $rootScope, $scope;
var $controller, $httpBackend, $provide, $rootScope, $scope;

beforeEach(function () {
module('job-contract', 'common.mocks', function (_$provide_) {
module('job-contract', 'job-contract.templates', 'common.mocks', function (_$provide_) {
$provide = _$provide_;
});
inject(['HR_settingsMock', function (hrSettingsMock) {
$provide.value('HR_settings', hrSettingsMock);
}]);
});

beforeEach(inject(function (_$controller_, _$rootScope_) {
beforeEach(inject(function (_$controller_, _$httpBackend_, _$rootScope_) {
$controller = _$controller_;
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
}));

describe('Min and max allowed dates', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define([
'use strict';

describe('FormHourController', function () {
var $controller, $rootScope, $scope;
var $controller, $httpBackend, $rootScope, $scope;
var entityData = {
'hour': {
'id': '1',
Expand All @@ -23,13 +23,14 @@ define([
}
};

beforeEach(module('job-contract'));
beforeEach(function () {
inject(function (_$controller_, _$rootScope_) {
$controller = _$controller_;
$rootScope = _$rootScope_;
});
});
beforeEach(module('job-contract', 'job-contract.templates'));
beforeEach(inject(function (_$controller_, _$httpBackend_, _$rootScope_) {
$controller = _$controller_;
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
}));

describe('init', function () {
describe('when no existing data is passed to the form', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ define([
'use strict';

describe('FormLeaveController', function () {
var ctrl, $controller, $rootScope, $scope, utilsService;
var ctrl, $controller, $httpBackend, $rootScope, $scope, utilsService;

beforeEach(module('job-contract'));
beforeEach(module('job-contract', 'job-contract.templates'));

beforeEach(inject(function (_$controller_, _$rootScope_, _utilsService_, $q) {
beforeEach(inject(function (_$controller_, _$httpBackend_, _$rootScope_, _utilsService_, $q) {
$controller = _$controller_;
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;
utilsService = _utilsService_;

Expand All @@ -23,6 +24,7 @@ define([
return deferred.promise;
});

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
initController();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ define([
'use strict';

describe('FormPensionController', function () {
var $controller, $rootScope, $scope, $q, contactService, response, params;
var $controller, $httpBackend, $rootScope, $scope, $q, contactService, response, params;

beforeEach(module('job-contract'));
beforeEach(module('job-contract', 'job-contract.templates'));

beforeEach(function () {
inject(function (_$controller_, _$rootScope_, _$q_, _contactService_) {
inject(function (_$controller_, _$httpBackend_, _$rootScope_, _$q_, _contactService_) {
$controller = _$controller_;
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;
contactService = _contactService_;
$q = _$q_;
params = {
contact_type: 'Organization',
contact_sub_type: 'Life_Insurance_Provider'
};

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
contactServiceSpy();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ define([
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
$httpBackend.whenGET(/action=get&entity=HRJobDetails/).respond(MockContract.contract);
$httpBackend.whenGET(/views.*/).respond({});
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ define([

beforeEach(module('job-contract'));
beforeEach(inject(function (_contractHealthService_, _$httpBackend_,
_$rootScope_) {
_$rootScope_) {
contractHealthService = _contractHealthService_;
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;
}));

beforeEach(function () {
$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
$httpBackend.whenGET(/action=get&entity=HRJobHealth/).respond(ContractMock.contractRevision);
$httpBackend.whenGET(/action=getoptions&entity=HRJobHealth/).respond(InsuranceMock);
$httpBackend.whenGET(/views.*/).respond({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ define([
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
$httpBackend.whenGET(/action=get&entity=HRJobHour/).respond(MockContract.contractHour);
$httpBackend.whenGET(/views.*/).respond({});
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ define([
* Mocks back-end API calls
*/
function mockBackendCalls () {
$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
$httpBackend.whenGET(/action=get&entity=HRJobLeave/).respond(MockContract.contractLeaves);
$httpBackend.whenGET(/action=getfields&entity=HRJobLeave/).respond({ values: [] });
$httpBackend.whenGET(/views.*/).respond({});
Expand Down
4 changes: 2 additions & 2 deletions hrjobcontract/js/test/services/contract-pay.service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ define([
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(MockContract.contractPayment);
$httpBackend.whenGET(/action=get&entity=HRJobPay/).respond({});
$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
$httpBackend.whenGET(/action=get&entity=HRJobPay/).respond(MockContract.contractPayment);
$httpBackend.whenGET(/views.*/).respond({});
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ define([
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;

$httpBackend.whenGET(/action=get&entity=HRJobContract/).respond(200);
$httpBackend.whenGET(/action=get&entity=HRJobPension/).respond(MockContract.contractPension);
$httpBackend.whenGET(/views.*/).respond({});
}));
Expand Down
Loading

0 comments on commit e1bee09

Please sign in to comment.