Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isAuditsDisabled: disabled at org level for type is overruling enabled at site level for type #198

Open
iuliag opened this issue Mar 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@iuliag
Copy link
Contributor

iuliag commented Mar 25, 2024

Description
isAuditsDisabled: disabled at org level for type is overruling enabled at site level for type

To Reproduce
Steps to reproduce the behavior:
Take an organization with config:

{
  "config": {
    "audits": {
      "auditsDisabled": false,
      "auditTypeConfigs": {
        "organic-keywords": {
          "disabled": true
        },
        "broken-backlinks": {
          "disabled": true
        },
        "organic-traffic": {
          "disabled": true
        }
      }
    }
  }
}

Take a site from the organization with auditConfig:

  "auditConfig": {
    "auditsDisabled": false,
    "auditTypeConfigs": {
      "organic-keywords": {
        "disabled": true
      },
      "broken-backlinks": {
        "disabled": false
      },
      "organic-traffic": {
        "disabled": true
      }
    }
  }

isAuditsDisabled(site, organization, 'broken-backlinks') returns true.

Expected behavior
Given an organization with config:

{
  "config": {
    "audits": {
      "auditsDisabled": false,
      "auditTypeConfigs": {
        "organic-keywords": {
          "disabled": true
        },
        "broken-backlinks": {
          "disabled": true
        },
        "organic-traffic": {
          "disabled": true
        }
      }
    }
  }
}

And a site from the organization with auditConfig:

  "auditConfig": {
    "auditsDisabled": false,
    "auditTypeConfigs": {
      "organic-keywords": {
        "disabled": true
      },
      "broken-backlinks": {
        "disabled": false
      },
      "organic-traffic": {
        "disabled": true
      }
    }
  }

isAuditsDisabled(site, organization, 'broken-backlinks') should return false.

Additional context
https://github.com/adobe/spacecat-shared/blob/main/packages/spacecat-shared-utils/src/helpers.js#L39

@iuliag iuliag added the bug Something isn't working label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant