webdriverio/wdio-cucumber-framework

View on GitHub

Showing 104 of 110 total issues

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

    beforeStep: (...args) => {
        global._wdio.beforeStep = {
            wasExecuted: true,
            start: new Date().getTime(),
            args
Severity: Major
Found in test/fixtures/hooks.using.native.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.native.promises.js on lines 15..28
test/fixtures/hooks.using.native.promises.js on lines 29..42
test/fixtures/hooks.using.native.promises.js on lines 43..56
test/fixtures/hooks.using.native.promises.js on lines 71..84
test/fixtures/hooks.using.native.promises.js on lines 85..98
test/fixtures/hooks.using.native.promises.js on lines 99..112
test/fixtures/hooks.using.native.promises.js on lines 113..126
test/fixtures/hooks.using.native.promises.js on lines 127..140
test/fixtures/hooks.using.native.promises.js on lines 141..154

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

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

    after: (...args) => {
        global._wdio.after = {
            wasExecuted: true,
            start: new Date().getTime(),
            args
Severity: Major
Found in test/fixtures/hooks.using.native.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.native.promises.js on lines 15..28
test/fixtures/hooks.using.native.promises.js on lines 29..42
test/fixtures/hooks.using.native.promises.js on lines 43..56
test/fixtures/hooks.using.native.promises.js on lines 57..70
test/fixtures/hooks.using.native.promises.js on lines 71..84
test/fixtures/hooks.using.native.promises.js on lines 85..98
test/fixtures/hooks.using.native.promises.js on lines 99..112
test/fixtures/hooks.using.native.promises.js on lines 113..126
test/fixtures/hooks.using.native.promises.js on lines 127..140

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

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

    after: (...args) => {
        global.___wdio.after.start = new Date().getTime()
        const defer = q.defer()
        setTimeout(() => {
            global.___wdio.after.end = new Date().getTime()
Severity: Major
Found in test/fixtures/hooks.using.q.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.q.promises.js on lines 29..37
test/fixtures/hooks.using.q.promises.js on lines 38..46
test/fixtures/hooks.using.q.promises.js on lines 47..55
test/fixtures/hooks.using.q.promises.js on lines 56..64
test/fixtures/hooks.using.q.promises.js on lines 65..73
test/fixtures/hooks.using.q.promises.js on lines 74..82
test/fixtures/hooks.using.q.promises.js on lines 83..91
test/fixtures/hooks.using.q.promises.js on lines 92..100
test/fixtures/hooks.using.q.promises.js on lines 101..109

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

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

    before: (...args) => {
        global._wdio.before = {
            wasExecuted: true,
            start: new Date().getTime(),
            args
Severity: Major
Found in test/fixtures/hooks.using.native.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.native.promises.js on lines 29..42
test/fixtures/hooks.using.native.promises.js on lines 43..56
test/fixtures/hooks.using.native.promises.js on lines 57..70
test/fixtures/hooks.using.native.promises.js on lines 71..84
test/fixtures/hooks.using.native.promises.js on lines 85..98
test/fixtures/hooks.using.native.promises.js on lines 99..112
test/fixtures/hooks.using.native.promises.js on lines 113..126
test/fixtures/hooks.using.native.promises.js on lines 127..140
test/fixtures/hooks.using.native.promises.js on lines 141..154

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

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

    afterFeature: (...args) => {
        global.___wdio.afterFeature.start = new Date().getTime()
        const defer = q.defer()
        setTimeout(() => {
            global.___wdio.afterFeature.end = new Date().getTime()
Severity: Major
Found in test/fixtures/hooks.using.q.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.q.promises.js on lines 29..37
test/fixtures/hooks.using.q.promises.js on lines 38..46
test/fixtures/hooks.using.q.promises.js on lines 47..55
test/fixtures/hooks.using.q.promises.js on lines 56..64
test/fixtures/hooks.using.q.promises.js on lines 65..73
test/fixtures/hooks.using.q.promises.js on lines 74..82
test/fixtures/hooks.using.q.promises.js on lines 83..91
test/fixtures/hooks.using.q.promises.js on lines 92..100
test/fixtures/hooks.using.q.promises.js on lines 110..118

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

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

export default {
    capabilities: {
        browserName: 'chrome'
    },

Severity: Major
Found in test/fixtures/tags.match.so.conf.js and 2 other locations - About 3 hrs to fix
test/fixtures/tags.match.scenario.conf.js on lines 5..28
test/fixtures/tags.no.match.conf.js on lines 5..28

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

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

export default {
    capabilities: {
        browserName: 'chrome'
    },

Severity: Major
Found in test/fixtures/tags.no.match.conf.js and 2 other locations - About 3 hrs to fix
test/fixtures/tags.match.scenario.conf.js on lines 5..28
test/fixtures/tags.match.so.conf.js on lines 5..28

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

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

export default {
    capabilities: {
        browserName: 'chrome'
    },

Severity: Major
Found in test/fixtures/tags.match.scenario.conf.js and 2 other locations - About 3 hrs to fix
test/fixtures/tags.match.so.conf.js on lines 5..28
test/fixtures/tags.no.match.conf.js on lines 5..28

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

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

export default {
    capabilities: {
        browserName: 'chrome'
    },

Severity: Major
Found in test/fixtures/sync-async.conf.js and 2 other locations - About 3 hrs to fix
test/fixtures/cucumber-hooks.conf.js on lines 5..27
test/fixtures/hooks.using.custom.commands.js on lines 16..38

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

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

export default {
    capabilities: {
        browserName: 'chrome'
    },

Severity: Major
Found in test/fixtures/hooks.using.custom.commands.js and 2 other locations - About 3 hrs to fix
test/fixtures/cucumber-hooks.conf.js on lines 5..27
test/fixtures/sync-async.conf.js on lines 5..27

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

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

export default {
    capabilities: {
        browserName: 'chrome'
    },

Severity: Major
Found in test/fixtures/cucumber-hooks.conf.js and 2 other locations - About 3 hrs to fix
test/fixtures/hooks.using.custom.commands.js on lines 16..38
test/fixtures/sync-async.conf.js on lines 5..27

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom q promise', () => {
    global.____wdio.customQPromise.start = new Date().getTime()
    browser.customQPromise(1).should.be.equal(2)
    global.____wdio.customQPromise.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 57..61
test/fixtures/custom-commands.js on lines 63..67
test/fixtures/custom-commands.js on lines 69..73
test/fixtures/custom-commands.js on lines 81..85
test/fixtures/custom-commands.js on lines 87..91
test/fixtures/custom-commands.js on lines 93..97
test/fixtures/custom-commands.js on lines 99..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 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom command wrapping custom wdio promise', () => {
    global.____wdio.customWrapWdioPromise.start = new Date().getTime()
    browser.customWrapWdioPromise(1).should.be.equal(3)
    global.____wdio.customWrapWdioPromise.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 57..61
test/fixtures/custom-commands.js on lines 63..67
test/fixtures/custom-commands.js on lines 69..73
test/fixtures/custom-commands.js on lines 75..79
test/fixtures/custom-commands.js on lines 81..85
test/fixtures/custom-commands.js on lines 93..97
test/fixtures/custom-commands.js on lines 99..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 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom wdio', () => {
    global.____wdio.customWdio.start = new Date().getTime()
    browser.customWdio(1).should.be.equal(2)
    global.____wdio.customWdio.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 63..67
test/fixtures/custom-commands.js on lines 69..73
test/fixtures/custom-commands.js on lines 75..79
test/fixtures/custom-commands.js on lines 81..85
test/fixtures/custom-commands.js on lines 87..91
test/fixtures/custom-commands.js on lines 93..97
test/fixtures/custom-commands.js on lines 99..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 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom command wrapping custom wdio', () => {
    global.____wdio.customWrapWdio.start = new Date().getTime()
    browser.customWrapWdio(1).should.be.equal(3)
    global.____wdio.customWrapWdio.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 57..61
test/fixtures/custom-commands.js on lines 63..67
test/fixtures/custom-commands.js on lines 69..73
test/fixtures/custom-commands.js on lines 75..79
test/fixtures/custom-commands.js on lines 87..91
test/fixtures/custom-commands.js on lines 93..97
test/fixtures/custom-commands.js on lines 99..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 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom command wrapping two native promise commands', () => {
    global.____wdio.customWrapTwoPromises.start = new Date().getTime()
    browser.customWrapTwoPromises(1).should.be.equal(3)
    global.____wdio.customWrapTwoPromises.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 57..61
test/fixtures/custom-commands.js on lines 63..67
test/fixtures/custom-commands.js on lines 69..73
test/fixtures/custom-commands.js on lines 75..79
test/fixtures/custom-commands.js on lines 81..85
test/fixtures/custom-commands.js on lines 87..91
test/fixtures/custom-commands.js on lines 99..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 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom command wrapping wdio command treated as promise resolves', () => {
    global.____wdio.customHandleWdioAsPromise.start = new Date().getTime()
    browser.customHandleWdioAsPromise(1).should.be.equal(3)
    global.____wdio.customHandleWdioAsPromise.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 57..61
test/fixtures/custom-commands.js on lines 63..67
test/fixtures/custom-commands.js on lines 69..73
test/fixtures/custom-commands.js on lines 75..79
test/fixtures/custom-commands.js on lines 81..85
test/fixtures/custom-commands.js on lines 87..91
test/fixtures/custom-commands.js on lines 93..97

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom native promise', () => {
    global.____wdio.customNativePromise.start = new Date().getTime()
    browser.customNativePromise(1).should.be.equal(2)
    global.____wdio.customNativePromise.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 57..61
test/fixtures/custom-commands.js on lines 63..67
test/fixtures/custom-commands.js on lines 75..79
test/fixtures/custom-commands.js on lines 81..85
test/fixtures/custom-commands.js on lines 87..91
test/fixtures/custom-commands.js on lines 93..97
test/fixtures/custom-commands.js on lines 99..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 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Then('custom wdio promise', () => {
    global.____wdio.customWdioPromise.start = new Date().getTime()
    browser.customWdioPromise(1).should.be.equal(2)
    global.____wdio.customWdioPromise.end = new Date().getTime()
})
Severity: Major
Found in test/fixtures/custom-commands.js and 7 other locations - About 3 hrs to fix
test/fixtures/custom-commands.js on lines 57..61
test/fixtures/custom-commands.js on lines 69..73
test/fixtures/custom-commands.js on lines 75..79
test/fixtures/custom-commands.js on lines 81..85
test/fixtures/custom-commands.js on lines 87..91
test/fixtures/custom-commands.js on lines 93..97
test/fixtures/custom-commands.js on lines 99..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 98.

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

    beforeFeature: (...args) => {
        global._____wdio.beforeFeature.start = new Date().getTime()
        return browser.pause(500).then(() => {
            global._____wdio.beforeFeature.end = new Date().getTime()
        })
Severity: Major
Found in test/fixtures/hooks.using.async.conf.js and 9 other locations - About 3 hrs to fix
test/fixtures/hooks.using.async.conf.js on lines 28..33
test/fixtures/hooks.using.async.conf.js on lines 40..45
test/fixtures/hooks.using.async.conf.js on lines 46..51
test/fixtures/hooks.using.async.conf.js on lines 52..57
test/fixtures/hooks.using.async.conf.js on lines 58..63
test/fixtures/hooks.using.async.conf.js on lines 64..69
test/fixtures/hooks.using.async.conf.js on lines 70..75
test/fixtures/hooks.using.async.conf.js on lines 76..81
test/fixtures/hooks.using.async.conf.js on lines 82..87

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

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