martinmicunda/employee-scheduling-ui

View on GitHub

Showing 438 of 458 total issues

Identical blocks of code found in 10 locations. Consider refactoring.
Open

            it('should have `jp-ng-bs-animated-button` component defined with attributes `is-submitting`, `result` and `options`', () => {
                element = render();
                const saveButton = angular.element(element[0].querySelector('button.btn-success'));

                expect(saveButton[0]).toBeDefined();
Severity: Major
Found in src/app/components/modal-message/modal-message.spec.js and 9 other locations - About 5 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 123..131
src/app/components/modal-location/modal-location.spec.js on lines 130..138
src/app/components/modal-partner/modal-partner.spec.js on lines 152..160
src/app/components/modal-position/modal-position.spec.js on lines 120..128
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 349..357
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 206..214
src/app/routes/layout-app/account/password/password.spec.js on lines 231..239
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 95..103
src/app/routes/layout-auth/login/login.spec.js on lines 92..100

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 137.

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

Identical blocks of code found in 10 locations. Consider refactoring.
Open

            it('should have `jp-ng-bs-animated-button` component defined with attributes `is-submitting`, `result` and `options`', () => {
                element = render();
                const saveButton = angular.element(element[0].querySelector('button.btn-success'));

                expect(saveButton[0]).toBeDefined();
Severity: Major
Found in src/app/components/modal-position/modal-position.spec.js and 9 other locations - About 5 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 123..131
src/app/components/modal-location/modal-location.spec.js on lines 130..138
src/app/components/modal-message/modal-message.spec.js on lines 120..128
src/app/components/modal-partner/modal-partner.spec.js on lines 152..160
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 349..357
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 206..214
src/app/routes/layout-app/account/password/password.spec.js on lines 231..239
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 95..103
src/app/routes/layout-auth/login/login.spec.js on lines 92..100

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 137.

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

Identical blocks of code found in 10 locations. Consider refactoring.
Open

            it('should have `jp-ng-bs-animated-button` component defined with attributes `is-submitting`, `result` and `options`', () => {
                element = render();
                const saveButton = angular.element(element[0].querySelector('button.btn-success'));

                expect(saveButton[0]).toBeDefined();
Severity: Major
Found in src/app/components/modal-document/modal-document.spec.js and 9 other locations - About 5 hrs to fix
src/app/components/modal-location/modal-location.spec.js on lines 130..138
src/app/components/modal-message/modal-message.spec.js on lines 120..128
src/app/components/modal-partner/modal-partner.spec.js on lines 152..160
src/app/components/modal-position/modal-position.spec.js on lines 120..128
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 349..357
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 206..214
src/app/routes/layout-app/account/password/password.spec.js on lines 231..239
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 95..103
src/app/routes/layout-auth/login/login.spec.js on lines 92..100

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 137.

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

Identical blocks of code found in 10 locations. Consider refactoring.
Open

            it('should have `jp-ng-bs-animated-button` component defined with attributes `is-submitting`, `result` and `options`', () => {
                element = render();
                const saveButton = angular.element(element[0].querySelector('button.btn-success'));

                expect(saveButton[0]).toBeDefined();
Severity: Major
Found in src/app/components/modal-location/modal-location.spec.js and 9 other locations - About 5 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 123..131
src/app/components/modal-message/modal-message.spec.js on lines 120..128
src/app/components/modal-partner/modal-partner.spec.js on lines 152..160
src/app/components/modal-position/modal-position.spec.js on lines 120..128
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 349..357
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 206..214
src/app/routes/layout-app/account/password/password.spec.js on lines 231..239
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 95..103
src/app/routes/layout-auth/login/login.spec.js on lines 92..100

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 137.

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

Identical blocks of code found in 10 locations. Consider refactoring.
Open

        it('should have `jp-ng-bs-animated-button` component defined with attributes `is-submitting`, `result` and `options`', () => {
            element = render();
            const saveButton = angular.element(element[0].querySelector('button.btn-success'));

            expect(saveButton[0]).toBeDefined();
src/app/components/modal-document/modal-document.spec.js on lines 123..131
src/app/components/modal-location/modal-location.spec.js on lines 130..138
src/app/components/modal-message/modal-message.spec.js on lines 120..128
src/app/components/modal-partner/modal-partner.spec.js on lines 152..160
src/app/components/modal-position/modal-position.spec.js on lines 120..128
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 349..357
src/app/routes/layout-app/account/password/password.spec.js on lines 231..239
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 95..103
src/app/routes/layout-auth/login/login.spec.js on lines 92..100

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 137.

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

Identical blocks of code found in 10 locations. Consider refactoring.
Open

        it('should have `jp-ng-bs-animated-button` component defined with attributes `is-submitting`, `result` and `options`', () => {
            element = render();
            const saveButton = angular.element(element[0].querySelector('button.btn-success'));

            expect(saveButton[0]).toBeDefined();
Severity: Major
Found in src/app/routes/layout-app/account/password/password.spec.js and 9 other locations - About 5 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 123..131
src/app/components/modal-location/modal-location.spec.js on lines 130..138
src/app/components/modal-message/modal-message.spec.js on lines 120..128
src/app/components/modal-partner/modal-partner.spec.js on lines 152..160
src/app/components/modal-position/modal-position.spec.js on lines 120..128
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 349..357
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 206..214
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 95..103
src/app/routes/layout-auth/login/login.spec.js on lines 92..100

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 137.

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

Identical blocks of code found in 10 locations. Consider refactoring.
Open

        it('should have `jp-ng-bs-animated-button` component defined with attributes `is-submitting`, `result` and `options`', () => {
            element = render();
            const saveButton = angular.element(element[0].querySelector('button.btn-success'));

            expect(saveButton[0]).toBeDefined();
src/app/components/modal-document/modal-document.spec.js on lines 123..131
src/app/components/modal-location/modal-location.spec.js on lines 130..138
src/app/components/modal-message/modal-message.spec.js on lines 120..128
src/app/components/modal-partner/modal-partner.spec.js on lines 152..160
src/app/components/modal-position/modal-position.spec.js on lines 120..128
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 206..214
src/app/routes/layout-app/account/password/password.spec.js on lines 231..239
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 95..103
src/app/routes/layout-auth/login/login.spec.js on lines 92..100

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 137.

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 4 locations. Consider refactoring.
Open

        beforeEach(inject((_$compile_, _$rootScope_, _ModalModel_, _PositionModel_) => {
            $compile = _$compile_;
            $rootScope = _$rootScope_;
            scope = $rootScope.$new();
            ModalModel = _ModalModel_;
Severity: Major
Found in src/app/components/modal-position/modal-position.spec.js and 3 other locations - About 5 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 20..36
src/app/components/modal-location/modal-location.spec.js on lines 21..37
src/app/components/modal-partner/modal-partner.spec.js on lines 21..37

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 137.

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 4 locations. Consider refactoring.
Open

        beforeEach(inject((_$compile_, _$rootScope_, _ModalModel_, _PartnerModel_) => {
            $compile = _$compile_;
            $rootScope = _$rootScope_;
            scope = $rootScope.$new();
            ModalModel = _ModalModel_;
Severity: Major
Found in src/app/components/modal-partner/modal-partner.spec.js and 3 other locations - About 5 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 20..36
src/app/components/modal-location/modal-location.spec.js on lines 21..37
src/app/components/modal-position/modal-position.spec.js on lines 20..36

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 137.

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 4 locations. Consider refactoring.
Open

        beforeEach(inject((_$compile_, _$rootScope_, _ModalModel_, _DocumentModel_) => {
            $compile = _$compile_;
            $rootScope = _$rootScope_;
            scope = $rootScope.$new();
            ModalModel = _ModalModel_;
Severity: Major
Found in src/app/components/modal-document/modal-document.spec.js and 3 other locations - About 5 hrs to fix
src/app/components/modal-location/modal-location.spec.js on lines 21..37
src/app/components/modal-partner/modal-partner.spec.js on lines 21..37
src/app/components/modal-position/modal-position.spec.js on lines 20..36

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 137.

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 4 locations. Consider refactoring.
Open

        beforeEach(inject((_$compile_, _$rootScope_, _ModalModel_, _LocationModel_) => {
            $compile = _$compile_;
            $rootScope = _$rootScope_;
            scope = $rootScope.$new();
            ModalModel = _ModalModel_;
Severity: Major
Found in src/app/components/modal-location/modal-location.spec.js and 3 other locations - About 5 hrs to fix
src/app/components/modal-document/modal-document.spec.js on lines 20..36
src/app/components/modal-partner/modal-partner.spec.js on lines 21..37
src/app/components/modal-position/modal-position.spec.js on lines 20..36

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 137.

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 8 locations. Consider refactoring.
Open

describe('CurrencyResource', () => {

    let currencyResource, mockData= '$http', route = `currencies`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/currency/currency.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/availability/availability.spec.js on lines 10..25
src/app/core/resources/language/language.spec.js on lines 10..25
src/app/core/resources/location/location.spec.js on lines 10..25
src/app/core/resources/message/message.spec.js on lines 10..25
src/app/core/resources/partner/partner.spec.js on lines 10..25
src/app/core/resources/position/position.spec.js on lines 10..25
src/app/core/resources/setting/setting.spec.js on lines 10..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 134.

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 8 locations. Consider refactoring.
Open

describe('LocationResource', () => {

    let locationResource, mockData= '$http', route = `locations`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/location/location.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/availability/availability.spec.js on lines 10..25
src/app/core/resources/currency/currency.spec.js on lines 10..25
src/app/core/resources/language/language.spec.js on lines 10..25
src/app/core/resources/message/message.spec.js on lines 10..25
src/app/core/resources/partner/partner.spec.js on lines 10..25
src/app/core/resources/position/position.spec.js on lines 10..25
src/app/core/resources/setting/setting.spec.js on lines 10..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 134.

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 8 locations. Consider refactoring.
Open

describe('PositionResource', () => {

    let positionResource, mockData= '$http', route = `positions`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/position/position.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/availability/availability.spec.js on lines 10..25
src/app/core/resources/currency/currency.spec.js on lines 10..25
src/app/core/resources/language/language.spec.js on lines 10..25
src/app/core/resources/location/location.spec.js on lines 10..25
src/app/core/resources/message/message.spec.js on lines 10..25
src/app/core/resources/partner/partner.spec.js on lines 10..25
src/app/core/resources/setting/setting.spec.js on lines 10..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 134.

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 8 locations. Consider refactoring.
Open

describe('SettingResource', () => {

    let settingResource, mockData= '$http', route = `settings`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/setting/setting.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/availability/availability.spec.js on lines 10..25
src/app/core/resources/currency/currency.spec.js on lines 10..25
src/app/core/resources/language/language.spec.js on lines 10..25
src/app/core/resources/location/location.spec.js on lines 10..25
src/app/core/resources/message/message.spec.js on lines 10..25
src/app/core/resources/partner/partner.spec.js on lines 10..25
src/app/core/resources/position/position.spec.js on lines 10..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 134.

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 8 locations. Consider refactoring.
Open

describe('MessageResource', () => {

    let messageResource, mockData= '$http', route = `emails`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/message/message.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/availability/availability.spec.js on lines 10..25
src/app/core/resources/currency/currency.spec.js on lines 10..25
src/app/core/resources/language/language.spec.js on lines 10..25
src/app/core/resources/location/location.spec.js on lines 10..25
src/app/core/resources/partner/partner.spec.js on lines 10..25
src/app/core/resources/position/position.spec.js on lines 10..25
src/app/core/resources/setting/setting.spec.js on lines 10..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 134.

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 8 locations. Consider refactoring.
Open

describe('PartnerResource', () => {

    let partnerResource, mockData= '$http', route = `partners`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/partner/partner.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/availability/availability.spec.js on lines 10..25
src/app/core/resources/currency/currency.spec.js on lines 10..25
src/app/core/resources/language/language.spec.js on lines 10..25
src/app/core/resources/location/location.spec.js on lines 10..25
src/app/core/resources/message/message.spec.js on lines 10..25
src/app/core/resources/position/position.spec.js on lines 10..25
src/app/core/resources/setting/setting.spec.js on lines 10..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 134.

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 8 locations. Consider refactoring.
Open

describe('AvailabilityResource', () => {

    let availabilityResource, mockData= '$http', route = `availabilities`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/availability/availability.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/currency/currency.spec.js on lines 10..25
src/app/core/resources/language/language.spec.js on lines 10..25
src/app/core/resources/location/location.spec.js on lines 10..25
src/app/core/resources/message/message.spec.js on lines 10..25
src/app/core/resources/partner/partner.spec.js on lines 10..25
src/app/core/resources/position/position.spec.js on lines 10..25
src/app/core/resources/setting/setting.spec.js on lines 10..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 134.

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 8 locations. Consider refactoring.
Open

describe('LanguageResource', () => {

    let languageResource, mockData= '$http', route = `languages`;

    beforeEach(() => {
Severity: Major
Found in src/app/core/resources/language/language.spec.js and 7 other locations - About 4 hrs to fix
src/app/core/resources/availability/availability.spec.js on lines 10..25
src/app/core/resources/currency/currency.spec.js on lines 10..25
src/app/core/resources/location/location.spec.js on lines 10..25
src/app/core/resources/message/message.spec.js on lines 10..25
src/app/core/resources/partner/partner.spec.js on lines 10..25
src/app/core/resources/position/position.spec.js on lines 10..25
src/app/core/resources/setting/setting.spec.js on lines 10..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 134.

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 not delete supervisor locations when employee.role is equal ${USER_ROLES.SUPERVISOR}`, () => {
                spyOn(EmployeeModel, 'getItem').and.returnValue(itemMock);
                employeeAuthorizations = new EmployeeAuthorizations(EmployeeModel, LocationModel);
                employeeAuthorizations.employee.role = USER_ROLES.SUPERVISOR;
                employeeAuthorizations.employee.supervisorLocations = ['1'];
src/app/components/employee-authorizations/employee-authorizations.spec.js on lines 237..246

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 131.

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