gmmorris/simmerjs

View on GitHub

Showing 54 of 62 total issues

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

  'can analyze an element with an invalid ID (isnt unique)': function (browser) {
    browser
      .url('localhost:3993') // visit the local url
      .waitForElementVisible('body') // wait for the body to be rendered

Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an element with an invalid ID (isnt unique) at same level as other element with the same ID': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an image with a non unique src attribute': function (browser) {
    browser
      .url('localhost:3993') // visit the local url
      .waitForElementVisible('body') // wait for the body to be rendered

Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an element with identical siblings, no ID and same class as sibling but different class order': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an element with a parent which has an invalid Tag name': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 353..364

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

  'can analyze a child of a hierarchy with identical siblings and no unique IDs': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an element with identical siblings (neither unique ID nor class)': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an element with identical siblings, no IDs and sibling with the same class': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

    function (result) {
      browser.assert.equal(result.value.didTheyMatch, true)
      onFinish(result.value.simmerSelector)
    }
Severity: Minor
Found in __tests__/e2e/index.js and 1 other location - About 35 mins to fix
__tests__/e2e/index.js on lines 43..46

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

  'can analyze an image with a unique src attribute': function (browser) {
    browser
      .url('localhost:3993') // visit the local url
      .waitForElementVisible('body') // wait for the body to be rendered

Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'cant analyze an element which is longer than the selectorMaxLength chars': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281

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

  'can analyze an element with classes only (No ID)': function (browser) {
    browser
      .url('localhost:3993') // visit the local url
      .waitForElementVisible('body') // wait for the body to be rendered

Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an element which is a child of an element with an ID': function (
    browser
  ) {
    browser
      .url('localhost:3993') // visit the local url
Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 168..174
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

  'can analyze an image whose parent has an invalid ID': function (browser) {
    browser
      .url('localhost:3993') // visit the local url
      .waitForElementVisible('body') // wait for the body to be rendered

Severity: Major
Found in __tests__/e2e/index.js and 17 other locations - About 35 mins to fix
__tests__/e2e/index.js on lines 94..100
__tests__/e2e/index.js on lines 102..108
__tests__/e2e/index.js on lines 110..118
__tests__/e2e/index.js on lines 120..128
__tests__/e2e/index.js on lines 130..136
__tests__/e2e/index.js on lines 138..146
__tests__/e2e/index.js on lines 148..156
__tests__/e2e/index.js on lines 176..182
__tests__/e2e/index.js on lines 184..190
__tests__/e2e/index.js on lines 192..200
__tests__/e2e/index.js on lines 202..210
__tests__/e2e/index.js on lines 212..220
__tests__/e2e/index.js on lines 222..230
__tests__/e2e/index.js on lines 232..240
__tests__/e2e/index.js on lines 242..250
__tests__/e2e/index.js on lines 273..281
__tests__/e2e/index.js on lines 353..364

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

Severity
Category
Status
Source
Language