airbnb/caravel

View on GitHub
superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts

Summary

Maintainability
F
1 wk
Test Coverage

File nativeFilters.test.ts has 766 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file

    Function prepareDashboardFilters has 103 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function prepareDashboardFilters(
      filters: { name: string; column: string; datasetId: number }[],
    ) {
      cy.createSampleDashboards([0]);
      cy.request({

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

          prepareDashboardFilters([
            { name: 'test_1', column: 'country_name', datasetId: 2 },
            { name: 'test_2', column: 'country_code', datasetId: 2 },
            { name: 'test_3', column: 'region', datasetId: 2 },
            { name: 'test_4', column: 'year', datasetId: 2 },
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 339..352
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 366..379

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

      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

          prepareDashboardFilters([
            { name: 'test_1', column: 'country_name', datasetId: 2 },
            { name: 'test_2', column: 'country_code', datasetId: 2 },
            { name: 'test_3', column: 'region', datasetId: 2 },
            { name: 'test_4', column: 'year', datasetId: 2 },
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 300..313
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 339..352

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

      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

          prepareDashboardFilters([
            { name: 'test_1', column: 'country_name', datasetId: 2 },
            { name: 'test_2', column: 'country_code', datasetId: 2 },
            { name: 'test_3', column: 'region', datasetId: 2 },
            { name: 'test_4', column: 'year', datasetId: 2 },
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 300..313
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 366..379

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

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(dataTestChartName(testItems.topTenChart.name)).within(() => {
              cy.contains(testItems.filterDefaultValue).should('be.visible');
              cy.contains(testItems.filterOtherCountry).should('be.visible');
            });
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 434..437
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 839..842
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 852..855
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 863..866

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

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(dataTestChartName(testItems.topTenChart.name)).within(() => {
              cy.contains(testItems.filterDefaultValue).should('be.visible');
              cy.contains(testItems.filterOtherCountry).should('not.exist');
            });
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 588..591
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 839..842
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 852..855
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 863..866

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

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(dataTestChartName(testItems.topTenChart.name)).within(() => {
              cy.contains(testItems.filterDefaultValue).should('be.visible');
              cy.contains(testItems.filterOtherCountry).should('not.exist');
            });
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 434..437
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 588..591
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 852..855
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 863..866

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

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(dataTestChartName(testItems.topTenChart.name)).within(() => {
              cy.contains(testItems.filterDefaultValue).should('be.visible');
              cy.contains(testItems.filterOtherCountry).should('not.exist');
            });
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 434..437
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 588..591
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 839..842
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 863..866

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

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(dataTestChartName(testItems.topTenChart.name)).within(() => {
              cy.contains(testItems.filterDefaultValue).should('be.visible');
              cy.contains(testItems.filterOtherCountry).should('be.visible');
            });
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 434..437
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 588..591
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 839..842
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 852..855

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

      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

          prepareDashboardFilters([
            { name: 'test_1', column: 'country_name', datasetId: 2 },
            { name: 'test_2', column: 'country_code', datasetId: 2 },
            { name: 'test_3', column: 'region', datasetId: 2 },
          ]);
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 275..279
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 512..516

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 59.

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

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

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

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

      Refactorings

      Further Reading

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

            prepareDashboardFilters([
              { name: 'region', column: 'region', datasetId: 2 },
              { name: 'country_name', column: 'country_name', datasetId: 2 },
              { name: 'country_code', column: 'country_code', datasetId: 2 },
            ]);
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 265..269
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.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 59.

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

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

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

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

      Refactorings

      Further Reading

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

          prepareDashboardFilters([
            { name: 'test_1', column: 'country_name', datasetId: 2 },
            { name: 'test_2', column: 'country_code', datasetId: 2 },
            { name: 'test_3', column: 'region', datasetId: 2 },
          ]);
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 265..269
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 512..516

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 59.

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

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

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

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

      Refactorings

      Further Reading

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

            cy.url().then(u => {
              const ur = new URL(u);
              expect(ur.search).to.include('native_filters');
            });
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 736..739

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 58.

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

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

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

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

      Refactorings

      Further Reading

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

            cy.url().then(u => {
              const ur = new URL(u);
              expect(ur.search).to.include('native_filters');
            });
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 717..720

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 58.

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(nativeFilters.filterConfigurationSections.displayedSection).within(
              () => {
                cy.contains('Values are dependent on other filters')
                  .should('be.visible')
                  .click();
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 448..454

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 58.

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(nativeFilters.filterConfigurationSections.displayedSection).within(
              () => {
                cy.contains('Values are dependent on other filters')
                  .should('be.visible')
                  .click();
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 482..488

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 58.

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

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

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

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

      Refactorings

      Further Reading

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

            cy.get(nativeFilters.modal.container)
              .find(nativeFilters.filtersPanel.filterName)
              .should(
                'have.attr',
                'value',
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 803..805

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

      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

            cy.get(nativeFilters.modal.container)
              .find(nativeFilters.filtersPanel.filterName)
              .should('have.attr', 'value', testItems.topTenChart.filterColumn);
      superset-frontend/cypress-base/cypress/e2e/dashboard/nativeFilters.test.ts on lines 697..703

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

      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

      function openVerticalFilterBar() {
        cy.getBySel('dashboard-filters-panel').should('exist');
        cy.getBySel('filter-bar__expand-button').click();
      }
      superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts on lines 45..48
      superset-frontend/cypress-base/cypress/e2e/dashboard_list/list.test.ts 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 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