martinmicunda/employee-scheduling-ui

View on GitHub

Showing 438 of 458 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class CurrencyResourceMock {
    //start-non-standard
    @Run()
    @Inject('$httpBackend')
    //end-non-standard
Severity: Major
Found in src/app/core/resources/currency/currency.mock.js and 1 other location - About 2 hrs to fix
src/app/core/resources/language/language.mock.js on lines 12..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class LanguageResourceMock {
    //start-non-standard
    @Run()
    @Inject('$httpBackend')
    //end-non-standard
Severity: Major
Found in src/app/core/resources/language/language.mock.js and 1 other location - About 2 hrs to fix
src/app/core/resources/currency/currency.mock.js on lines 12..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('should have title defined', () => {
        element = render();
        element.triggerHandler('click');
        component = modalOptions.template;

src/app/directives/modal-really-click/modal-really-click.spec.js on lines 75..84

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        it('should have displayDefaultOptions property set to true for edit modal when location.id exist and location.default is set to false', () => {
            let clonedObject = Object.assign({id: 'id', default: false}, itemMock);
            spyOn(LocationModel, 'getItem').and.returnValue(clonedObject);
            locationModal = new LocationModal(ModalModel, LocationModel, FormService);

Severity: Major
Found in src/app/components/modal-location/modal-location.spec.js and 1 other location - About 2 hrs to fix
src/app/components/modal-location/modal-location.spec.js on lines 314..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        it('should have displayDefaultOptions property set to false for edit modal when location.id exist and location.default is set to true', () => {
            let clonedObject = Object.assign({id: 'id', default: true}, itemMock);
            spyOn(LocationModel, 'getItem').and.returnValue(clonedObject);
            locationModal = new LocationModal(ModalModel, LocationModel, FormService);

Severity: Major
Found in src/app/components/modal-location/modal-location.spec.js and 1 other location - About 2 hrs to fix
src/app/components/modal-location/modal-location.spec.js on lines 306..312

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    it('should have message defined', () => {
        element = render();
        element.triggerHandler('click');
        component = modalOptions.template;

src/app/directives/modal-really-click/modal-really-click.spec.js on lines 64..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

describe('AvailabilityModel', () => {

    let availabilityModel, mockObject = {test: 'test'};

    beforeEach(() => {
Severity: Major
Found in src/app/core/models/availability.spec.js and 6 other locations - About 2 hrs to fix
src/app/core/models/currency.spec.js on lines 10..21
src/app/core/models/language.spec.js on lines 10..21
src/app/core/models/message.spec.js on lines 10..21
src/app/core/models/partner.spec.js on lines 10..21
src/app/core/models/position.spec.js on lines 10..21
src/app/core/models/setting.spec.js on lines 10..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

describe('CurrencyModel', () => {

    let currencyModel, mockObject = {test: 'test'};

    beforeEach(() => {
Severity: Major
Found in src/app/core/models/currency.spec.js and 6 other locations - About 2 hrs to fix
src/app/core/models/availability.spec.js on lines 10..21
src/app/core/models/language.spec.js on lines 10..21
src/app/core/models/message.spec.js on lines 10..21
src/app/core/models/partner.spec.js on lines 10..21
src/app/core/models/position.spec.js on lines 10..21
src/app/core/models/setting.spec.js on lines 10..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        it('should have isAdmin property set to false when user has not admin role', () => {
            spyOn(EmployeeModel, 'getItem').and.returnValue({});
            $rootScope.currentUser = {role: USER_ROLES.MANAGER};

            employeeAdd = new EmployeeAdd($state, $rootScope, EmployeeModel, FormService, fakeModal);
Severity: Major
Found in src/app/routes/layout-app/employees/add/add.spec.js and 1 other location - About 2 hrs to fix
src/app/routes/layout-app/employees/add/add.spec.js on lines 94..101

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        it('should have isAdmin property set to true when user has admin role', () => {
            spyOn(EmployeeModel, 'getItem').and.returnValue({});
            $rootScope.currentUser = {role: USER_ROLES.ADMIN};

            employeeAdd = new EmployeeAdd($state, $rootScope, EmployeeModel, FormService, fakeModal);
Severity: Major
Found in src/app/routes/layout-app/employees/add/add.spec.js and 1 other location - About 2 hrs to fix
src/app/routes/layout-app/employees/add/add.spec.js on lines 103..110

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

describe('PositionModel', () => {

    let positionModel, mockObject = {test: 'test'};

    beforeEach(() => {
Severity: Major
Found in src/app/core/models/position.spec.js and 6 other locations - About 2 hrs to fix
src/app/core/models/availability.spec.js on lines 10..21
src/app/core/models/currency.spec.js on lines 10..21
src/app/core/models/language.spec.js on lines 10..21
src/app/core/models/message.spec.js on lines 10..21
src/app/core/models/partner.spec.js on lines 10..21
src/app/core/models/setting.spec.js on lines 10..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

describe('MessageModel', () => {

    let messageModel, mockObject = {test: 'test'};

    beforeEach(() => {
Severity: Major
Found in src/app/core/models/message.spec.js and 6 other locations - About 2 hrs to fix
src/app/core/models/availability.spec.js on lines 10..21
src/app/core/models/currency.spec.js on lines 10..21
src/app/core/models/language.spec.js on lines 10..21
src/app/core/models/partner.spec.js on lines 10..21
src/app/core/models/position.spec.js on lines 10..21
src/app/core/models/setting.spec.js on lines 10..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

describe('LanguageModel', () => {

    let languageModel, mockObject = {test: 'test'};

    beforeEach(() => {
Severity: Major
Found in src/app/core/models/language.spec.js and 6 other locations - About 2 hrs to fix
src/app/core/models/availability.spec.js on lines 10..21
src/app/core/models/currency.spec.js on lines 10..21
src/app/core/models/message.spec.js on lines 10..21
src/app/core/models/partner.spec.js on lines 10..21
src/app/core/models/position.spec.js on lines 10..21
src/app/core/models/setting.spec.js on lines 10..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

describe('SettingModel', () => {

    let settingModel, mockObject = {test: 'test'};

    beforeEach(() => {
Severity: Major
Found in src/app/core/models/setting.spec.js and 6 other locations - About 2 hrs to fix
src/app/core/models/availability.spec.js on lines 10..21
src/app/core/models/currency.spec.js on lines 10..21
src/app/core/models/language.spec.js on lines 10..21
src/app/core/models/message.spec.js on lines 10..21
src/app/core/models/partner.spec.js on lines 10..21
src/app/core/models/position.spec.js on lines 10..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

describe('PartnerModel', () => {

    let partnerModel, mockObject = {test: 'test'};

    beforeEach(() => {
Severity: Major
Found in src/app/core/models/partner.spec.js and 6 other locations - About 2 hrs to fix
src/app/core/models/availability.spec.js on lines 10..21
src/app/core/models/currency.spec.js on lines 10..21
src/app/core/models/language.spec.js on lines 10..21
src/app/core/models/message.spec.js on lines 10..21
src/app/core/models/position.spec.js on lines 10..21
src/app/core/models/setting.spec.js on lines 10..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        it(`should have employee.role set to ${USER_ROLES.EMPLOYEE} if employee.role is undefined`, () => {
            spyOn(EmployeeModel, 'getItem').and.returnValue(itemMock);
            employeeAccountDetails = new EmployeeAccountDetails(EmployeeModel, PositionModel, SettingModel, Upload, LocationModel);

            expect(employeeAccountDetails.employee.role).toEqual(USER_ROLES.EMPLOYEE);
src/app/components/employee-account-details/employee-account-details.spec.js on lines 553..558

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        it(`should have employee.status set to ${EMPLOYEE_PROFILE_STATUSES.PENDING} if employee.status is undefined`, () => {
            spyOn(EmployeeModel, 'getItem').and.returnValue(itemMock);
            employeeAccountDetails = new EmployeeAccountDetails(EmployeeModel, PositionModel, SettingModel, Upload, LocationModel);

            expect(employeeAccountDetails.employee.status).toEqual(EMPLOYEE_PROFILE_STATUSES.PENDING);
src/app/components/employee-account-details/employee-account-details.spec.js on lines 560..565

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

                it('should have `who has not access` label defined', () => {
                    element = render();
                    const parentElement = angular.element(element[0].querySelector('select[name="selectedEmployeeWithoutAccess"]')).parent();

                    expect(parentElement.find('label').text()).toEqual('who has not access');
Severity: Major
Found in src/app/components/modal-document/modal-document.spec.js and 4 other locations - About 2 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 210..215
src/app/components/modal-document/modal-document.spec.js on lines 238..243
src/app/components/modal-message/modal-message.spec.js on lines 136..141
src/app/components/modal-message/modal-message.spec.js on lines 170..175

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 87.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

                it('should have `Message` label defined', () => {
                    element = render();
                    const parentElement = angular.element(element[0].querySelector('textarea[name="body"]')).parent();

                    expect(parentElement.find('label').text()).toEqual('Message');
Severity: Major
Found in src/app/components/modal-message/modal-message.spec.js and 4 other locations - About 2 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 203..208
src/app/components/modal-document/modal-document.spec.js on lines 210..215
src/app/components/modal-document/modal-document.spec.js on lines 238..243
src/app/components/modal-message/modal-message.spec.js on lines 136..141

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 87.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

                it('should have `who has access` label defined', () => {
                    element = render();
                    const parentElement = angular.element(element[0].querySelector('select[name="selectedEmployeeWithAccess"]')).parent();

                    expect(parentElement.find('label').text()).toEqual('who has access');
Severity: Major
Found in src/app/components/modal-document/modal-document.spec.js and 4 other locations - About 2 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 203..208
src/app/components/modal-document/modal-document.spec.js on lines 210..215
src/app/components/modal-message/modal-message.spec.js on lines 136..141
src/app/components/modal-message/modal-message.spec.js on lines 170..175

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 87.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language