superdesk/superdesk-client-core

View on GitHub
e2e/client/specs/helpers/authoring.ts

Summary

Maintainability
F
1 wk
Test Coverage

Function constructor has 667 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor() {
        this.lock = element(by.css('[ng-click="lock()"]'));
        this.correct_button = element(by.buttonText('correct'));
        this.kill_button = element(by.buttonText('kill'));
        this.close_button = element(by.buttonText('Close'));
Severity: Major
Found in e2e/client/specs/helpers/authoring.ts - About 3 days to fix

    File authoring.ts has 844 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable newline-per-chained-call */
    
    import {element, by, browser, protractor} from 'protractor';
    import {waitHidden, waitFor, click} from './utils';
    import {ECE, els, el} from '@superdesk/end-to-end-testing-helpers';
    Severity: Major
    Found in e2e/client/specs/helpers/authoring.ts - About 2 days to fix

      Function constructor has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
      Open

          constructor() {
              this.lock = element(by.css('[ng-click="lock()"]'));
              this.correct_button = element(by.buttonText('correct'));
              this.kill_button = element(by.buttonText('kill'));
              this.close_button = element(by.buttonText('Close'));
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts - About 4 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

                  if (!skipConfirm) {
                      var modal = element(by.className('modal__dialog'));
      
                      modal.isPresent().then((isPresent) => {
                          if (isPresent) {
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 2 hrs to fix
      e2e/client/specs/helpers/authoring.ts on lines 434..442

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

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

                  if (!skipConfirm) {
                      var modal = element(by.className('modal__dialog'));
      
                      modal.isPresent().then((isPresent) => {
                          if (isPresent) {
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 2 hrs to fix
      e2e/client/specs/helpers/authoring.ts on lines 407..415

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

      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

              this.addHelpline = function(helplineLabel) {
                  element(by.id('helplines')).element(by.css('option[label="' + helplineLabel + '"]')).click();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 875..878
      e2e/client/specs/helpers/authoring.ts on lines 880..883

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

      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

              this.setRelatedItemConfigurationSlugline = function(matchValue) {
                  element(by.model('configuration.sluglineMatch'))
                      .element(by.css('option[value="' + matchValue + '"]')).click();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 810..812
      e2e/client/specs/helpers/authoring.ts on lines 880..883

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

      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

              this.setRelatedItemConfigurationLastUpdate = function(lastUpdate) {
                  element(by.model('configuration.modificationDateAfter'))
                      .element(by.css('option[value="' + lastUpdate + '"]')).click();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 810..812
      e2e/client/specs/helpers/authoring.ts on lines 875..878

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

      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

              this.getKeywords = function() {
                  return element(by.css('[data-field="keywords"]'))
                      .all(by.repeater('t in item[field] track by t'))
                      .first().getText();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 519..521
      e2e/client/specs/helpers/authoring.ts on lines 1004..1006

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

              this.getPubStatus = function() {
                  return element(by.css('[ng-if="item.pubstatus"]')).all(by.className('data')).first().getText();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 513..517
      e2e/client/specs/helpers/authoring.ts on lines 1004..1006

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

              this.getItemSource = function() {
                  return element(by.className('authoring-header__general-info')).all(by.id('item-source')).first().getText();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 513..517
      e2e/client/specs/helpers/authoring.ts on lines 519..521

      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

              this.markForDesks = function() {
                  openAuthoringDropdown();
                  browser.actions().mouseMove(element(by.css('.marks-toggle .dropdown__toggle'))).perform();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 642..645

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

              this.markForHighlights = function() {
                  openAuthoringDropdown();
                  browser.actions().mouseMove(element(by.css('.highlights-toggle .dropdown__toggle'))).perform();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 647..650

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

              this.getHeaderSluglineText = function() {
                  var headerDetails = element(by.className('authoring-header__detailed'));
      
                  return headerDetails.all(by.model('item.slugline')).get(0).getAttribute('value');
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 933..937

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

      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

              this.getHeaderEdNoteText = function(text) {
                  var headerDetails = element(by.className('authoring-header__detailed'));
      
                  return headerDetails.all(by.model('item.ednote')).get(0).getAttribute('value');
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 1 hr to fix
      e2e/client/specs/helpers/authoring.ts on lines 913..917

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

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

              this.cutBlock = function(position) {
                  return this.getBlock(position).element(by.css('.block__cut')).click();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 5 other locations - About 50 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 1037..1039
      e2e/client/specs/helpers/monitoring.ts on lines 326..328
      e2e/client/specs/helpers/monitoring.ts on lines 625..627
      e2e/client/specs/helpers/monitoring.ts on lines 629..631
      e2e/client/specs/helpers/monitoring.ts on lines 673..675

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

      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

              this.openCompareVersionsInnerDropdown = function(index) {
                  this.getBoard(index).all(by.css('[class="navbtn dropdown"]')).click();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 4 other locations - About 50 mins to fix
      e2e/client/specs/helpers/master_desks.ts on lines 74..76
      e2e/client/specs/helpers/monitoring.ts on lines 633..635
      e2e/client/specs/helpers/monitoring.ts on lines 653..655
      e2e/client/specs/helpers/monitoring.ts on lines 657..659

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

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

              this.getBoardArticle = function(index) {
                  return this.getBoard(index).all(by.css('[data-article="board.article"]')).first();
              };
      Severity: Major
      Found in e2e/client/specs/helpers/authoring.ts and 5 other locations - About 50 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 391..393
      e2e/client/specs/helpers/monitoring.ts on lines 326..328
      e2e/client/specs/helpers/monitoring.ts on lines 625..627
      e2e/client/specs/helpers/monitoring.ts on lines 629..631
      e2e/client/specs/helpers/monitoring.ts on lines 673..675

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

      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

              this.getItemState = function() {
                  return element(by.className('metadata')).element(by.className('state-label'));
              };
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 35 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 1025..1027
      e2e/client/specs/helpers/content.ts on lines 186..188

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

      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

              this.getCompareVersionsBoards = function() {
                  return element(by.className('boards-list')).all(by.repeater('board in boards'));
              };
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts and 2 other locations - About 35 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 947..949
      e2e/client/specs/helpers/content.ts on lines 186..188

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

      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

              function openAuthoringDropdown() {
                  const toggle = element(by.id('authoring-extra-dropdown')).element(by.id('more-actions'));
      
                  click(toggle, 'Can\'t open dropdown in authoring.');
              }
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 35 mins to fix
      e2e/client/specs/helpers/monitoring.ts on lines 796..800

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

      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

              this.getCategoryMetadataDropdownOpened = function() {
                  return this.anpa_category.all(by.className('dropdown__toggle')).click();
              };
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 35 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 962..964

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

              this.getSubjectMetadataDropdownOpened = function() {
                  return this.subject.all(by.className('dropdown__toggle')).click();
              };
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 35 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 970..972

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

                  if (_continue) {
                      el(['interactive-actions-panel', 'send-and-open']).click();
                  } else {
                      el(['interactive-actions-panel', 'send']).click();
                  }
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 30 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 313..317

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

      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

                  if (open) {
                      el(['interactive-actions-panel', 'duplicate-and-open']).click();
                  } else {
                      el(['interactive-actions-panel', 'duplicate']).click();
                  }
      Severity: Minor
      Found in e2e/client/specs/helpers/authoring.ts and 1 other location - About 30 mins to fix
      e2e/client/specs/helpers/authoring.ts on lines 295..299

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

      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