Chocobozzz/PeerTube

View on GitHub
client/e2e/src/suites-local/signup.e2e-spec.ts

Summary

Maintainability
F
4 days
Test Coverage

File signup.e2e-spec.ts has 312 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { AdminConfigPage } from '../po/admin-config.po'
import { AdminRegistrationPage } from '../po/admin-registration.po'
import { LoginPage } from '../po/login.po'
import { SignupPage } from '../po/signup.po'
import {
Severity: Minor
Found in client/e2e/src/suites-local/signup.e2e-spec.ts - About 3 hrs to fix

    Function checkEndMessage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function checkEndMessage (options: {
      message: string
      requiresEmailVerification: boolean
      requiresApproval: boolean
      afterEmailVerification: boolean
    Severity: Minor
    Found in client/e2e/src/suites-local/signup.e2e-spec.ts - About 1 hr to fix

      Function checkEndMessage has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      function checkEndMessage (options: {
        message: string
        requiresEmailVerification: boolean
        requiresApproval: boolean
        afterEmailVerification: boolean
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts - About 55 mins 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

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

            it('Should validate the email', async function () {
              let email: { text: string }
      
              while (!(email = findEmailTo(emails, 'user_4@example.com'))) {
                await browserSleep(100)
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 4 hrs to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 300..319

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should validate the email', async function () {
              let email: { text: string }
      
              while (!(email = findEmailTo(emails, 'user_3@example.com'))) {
                await browserSleep(100)
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 4 hrs to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 387..406

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should have a valid end message', async function () {
              const message = await signupPage.getEndMessage()
      
              checkEndMessage({
                message,
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 2 other locations - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 205..216
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 287..298

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should have a valid end message', async function () {
              const message = await signupPage.getEndMessage()
      
              checkEndMessage({
                message,
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 2 other locations - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 205..216
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 359..370

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should have a valid end message', async function () {
              const message = await signupPage.getEndMessage()
      
              checkEndMessage({
                message,
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 2 other locations - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 287..298
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 359..370

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should accept the registration', async function () {
              await loginPage.loginAsRootUser()
      
              await adminRegistrationPage.navigateToRegistratonsList()
              await adminRegistrationPage.accept('user_4', 'moderation response 2')
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 224..231

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

            it('Should accept the registration', async function () {
              await loginPage.loginAsRootUser()
      
              await adminRegistrationPage.navigateToRegistratonsList()
              await adminRegistrationPage.accept('user_2', 'moderation response')
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 378..385

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

            it('Should enable signup without approval', async () => {
              await prepareSignup({ enabled: true, requiresApproval: false, requiresEmailVerification: false })
      
              await signupPage.getRegisterMenuButton().waitForDisplayed()
            })
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 3 other locations - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 175..179
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 256..260
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 324..328

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should enable signup with approval', async () => {
              await prepareSignup({ enabled: true, requiresApproval: true, requiresEmailVerification: false })
      
              await signupPage.getRegisterMenuButton().waitForDisplayed()
            })
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 3 other locations - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 122..126
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 256..260
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 324..328

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should enable signup without approval', async () => {
              await prepareSignup({ enabled: true, requiresApproval: true, requiresEmailVerification: true })
      
              await signupPage.getRegisterMenuButton().waitForDisplayed()
            })
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 3 other locations - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 122..126
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 175..179
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 256..260

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should enable signup without approval', async () => {
              await prepareSignup({ enabled: true, requiresApproval: false, requiresEmailVerification: true })
      
              await signupPage.getRegisterMenuButton().waitForDisplayed()
            })
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 3 other locations - About 1 hr to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 122..126
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 175..179
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 324..328

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should be able to login with this new account', async function () {
              await loginPage.login({ username: 'user_2', password: 'password', displayName: 'user_2 display name' })
      
              await loginPage.logout()
            })
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 2 other locations - About 55 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 195..198
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 275..279

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should validate the third step (account)', async function () {
              await signupPage.fillAccountStep({ username: 'user_2', displayName: 'user_2 display name', password: 'password' })
              await signupPage.validateStep()
            })
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 2 other locations - About 55 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 233..237
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 275..279

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should validate the third step (account)', async function () {
              await signupPage.fillAccountStep({ username: 'user_3', displayName: 'user_3 display name', email: 'user_3@example.com' })
      
              await signupPage.validateStep()
            })
      Severity: Major
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 2 other locations - About 55 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 195..198
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 233..237

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should validate the second step (terms)', async function () {
              await signupPage.checkTerms()
              await signupPage.fillRegistrationReason('my super reason 2')
              await signupPage.validateStep()
            })
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 45 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 189..193

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should validate the second step (terms)', async function () {
              await signupPage.checkTerms()
              await signupPage.fillRegistrationReason('my super reason')
              await signupPage.validateStep()
            })
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 45 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 338..342

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

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

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

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

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

      Refactorings

      Further Reading

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

            it('Should display a message when trying to login with this account', async function () {
              const error = await loginPage.getLoginError('user_2', 'password')
      
              expect(error).toContain('awaiting approval')
            })
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 35 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 372..376

      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

            it('Should display a message when trying to login with this account', async function () {
              const error = await loginPage.getLoginError('user_4', 'password')
      
              expect(error).toContain('awaiting approval')
            })
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 35 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 218..222

      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 (requiresApproval) {
              expect(message).toContain(moderatorsApproval)
            } else {
              expect(message).not.toContain(moderatorsApproval)
            }
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 30 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 57..61

      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 (afterEmailVerification) {
            expect(message).toContain(emailVerified)
          } else {
            expect(message).not.toContain(emailVerified)
          }
      Severity: Minor
      Found in client/e2e/src/suites-local/signup.e2e-spec.ts and 1 other location - About 30 mins to fix
      client/e2e/src/suites-local/signup.e2e-spec.ts on lines 46..50

      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