web/app/project/project.component.spec.ts

Summary

Maintainability
C
1 day
Test Coverage

File project.component.spec.ts has 257 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import 'rxjs/add/operator/switchMap';

import {Location} from '@angular/common';
import {DebugElement} from '@angular/core';
import {async, ComponentFixture, fakeAsync, flush, TestBed, tick} from '@angular/core/testing';
Severity: Minor
Found in web/app/project/project.component.spec.ts - About 2 hrs to fix

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

        dataService = {
          getProject:
              jasmine.createSpy().and.returnValue(projectSubject.asObservable()),
          rebuild: jasmine.createSpy().and.returnValue(
              rebuildSummarySubject.asObservable())
    Severity: Major
    Found in web/app/project/project.component.spec.ts and 2 other locations - About 1 hr to fix
    web/app/build/build.component.spec.ts on lines 45..50
    web/app/dashboard/add-project-dialog/add-project-dialog.component.spec.ts on lines 43..48

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

    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 build number', () => {
              expect(getElementText(rowEls[0], '.mat-column-number span'))
                  .toBe('2');
              expect(getElementText(rowEls[1], '.mat-column-number span'))
                  .toBe('1');
    Severity: Major
    Found in web/app/project/project.component.spec.ts and 1 other location - About 1 hr to fix
    web/app/project/project.component.spec.ts on lines 211..218

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

    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 status icon', () => {
              expect(
                  getElementText(rowEls[0], '.mat-column-number .fci-status-icon'))
                  .toBe('check_circle');
              expect(
    Severity: Major
    Found in web/app/project/project.component.spec.ts and 1 other location - About 1 hr to fix
    web/app/project/project.component.spec.ts on lines 220..225

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

    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 show last successful build number', () => {
              expect(getElementText(headerEls[2])).toBe('LAST SUCCESSFUL BUILD');
              expect(getElementText(contentsEls[2])).toBe('2');
            });
    Severity: Major
    Found in web/app/project/project.component.spec.ts and 3 other locations - About 1 hr to fix
    web/app/project/project.component.spec.ts on lines 294..297
    web/app/project/project.component.spec.ts on lines 299..302
    web/app/project/project.component.spec.ts on lines 309..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 59.

    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 show lane', () => {
              expect(getElementText(headerEls[1])).toBe('LANE');
              expect(getElementText(contentsEls[1])).toBe('ios test');
            });
    Severity: Major
    Found in web/app/project/project.component.spec.ts and 3 other locations - About 1 hr to fix
    web/app/project/project.component.spec.ts on lines 294..297
    web/app/project/project.component.spec.ts on lines 304..307
    web/app/project/project.component.spec.ts on lines 309..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 59.

    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 show Repo name', () => {
              expect(getElementText(headerEls[0])).toBe('REPO');
              expect(getElementText(contentsEls[0])).toBe('fastlane/TacoRocat');
            });
    Severity: Major
    Found in web/app/project/project.component.spec.ts and 3 other locations - About 1 hr to fix
    web/app/project/project.component.spec.ts on lines 299..302
    web/app/project/project.component.spec.ts on lines 304..307
    web/app/project/project.component.spec.ts on lines 309..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 59.

    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 show last failed build number', () => {
              expect(getElementText(headerEls[3])).toBe('LAST FAILED BUILD');
              expect(getElementText(contentsEls[3])).toBe('1');
            });
    Severity: Major
    Found in web/app/project/project.component.spec.ts and 3 other locations - About 1 hr to fix
    web/app/project/project.component.spec.ts on lines 294..297
    web/app/project/project.component.spec.ts on lines 299..302
    web/app/project/project.component.spec.ts on lines 304..307

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

    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