martinmicunda/employee-scheduling-ui

View on GitHub
src/app/routes/layout-auth/login/login.spec.js

Summary

Maintainability
F
6 days
Test Coverage

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

            describe('email', () => {
                it('should have `Email Address` placeholder defined', () => {
                    element = render();
                    const email = angular.element(element[0].querySelector('input[name="email"][type="email"]'));

Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 1 other location - About 2 days to fix
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 107..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 467.

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

        describe('Link', () => {
            it('should contain Forgot your password? label', () => {
                element = render();
                const nav = angular.element(element[0].querySelector('.link a'));

Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 1 other location - About 6 hrs to fix
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 144..158

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

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

    describe('Route', () => {
        let url = '/',
            state = 'auth.login',
            currentState,
            $state, $injector;
Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 4 other locations - About 6 hrs to fix
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 16..36
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 16..36
src/app/routes/layout-app/account/password/password.spec.js on lines 15..35
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 16..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 158.

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

        it('should contain copyright text', () => {
            element = render();
            let copyrightYear = new Date().getFullYear();
            let copyrightText = angular.element(element[0].querySelector('section p.text-muted'));

Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 2 other locations - About 5 hrs to fix
src/app/components/footer/footer.spec.js on lines 43..50
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 175..182

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

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-auth/login/login.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-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

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

        it('should contain copyright link', () => {
            element = render();
            let copyrightLink = angular.element(element[0].querySelector('section p.text-muted a'));

            expect(copyrightLink.attr('href')).toEqual('http://www.martinmicunda.com');
Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 2 other locations - About 3 hrs to fix
src/app/components/footer/footer.spec.js on lines 35..41
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 167..173

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

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

                expect(element.isolateScope().vm.login).toHaveBeenCalledWith(element.isolateScope().loginForm.$valid, element.isolateScope().loginForm);
Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 1 other location - About 1 hr to fix
src/app/routes/layout-auth/forgot-password/forgot-password.spec.js on lines 91..91

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

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

        beforeEach(inject((_$rootScope_, _$state_, _AuthenticationService_, _FormService_) => {
            $rootScope = _$rootScope_;
            $state = _$state_;
            AuthenticationService = _AuthenticationService_;
            FormService = _FormService_;
Severity: Minor
Found in src/app/routes/layout-auth/login/login.spec.js and 1 other location - About 40 mins to fix
src/app/core/config/config.spec.js on lines 60..65

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

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

        it('should have isSubmitting property', () => {
            login = new Login($rootScope, $state, AuthenticationService, FormService);

            expect(login.isSubmitting).toEqual(null);
        });
Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 3 other locations - About 35 mins to fix
src/app/routes/layout-app/employees/edit/edit.spec.js on lines 114..118
src/app/routes/layout-app/employees/edit/edit.spec.js on lines 120..124
src/app/routes/layout-auth/login/login.spec.js on lines 212..216

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

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

        it('should have result property', () => {
            login = new Login($rootScope, $state, AuthenticationService, FormService);

            expect(login.result).toEqual(null);
        });
Severity: Major
Found in src/app/routes/layout-auth/login/login.spec.js and 3 other locations - About 35 mins to fix
src/app/routes/layout-app/employees/edit/edit.spec.js on lines 114..118
src/app/routes/layout-app/employees/edit/edit.spec.js on lines 120..124
src/app/routes/layout-auth/login/login.spec.js on lines 206..210

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

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

There are no issues that match your filters.

Category
Status