-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add disable all audits feature #1478
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
Conversation
|
This PR will trigger no release when merged. |
|
|
||
| // Fixes | ||
| /* c8 ignore start */ | ||
| // Fixes - Route wrapper functions not covered as they're tested via E2E/integration tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this
| } | ||
| }) | ||
| .on('end', () => { | ||
| /* c8 ignore start */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please avoid
| Profiles are defined in the config/profiles.json file.`, | ||
| phrases: [PHRASE], | ||
| usageText: `${PHRASE} {enable/disable} {site} {auditType} for singleURL, | ||
| usageText: `${PHRASE} {enable/disable} {site} {auditType} {profileName} for singleURL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be better to document all option here, so that users will be aware of what's possible
| let auditTypes; | ||
| if (singleAuditType.toLowerCase() === 'all') { | ||
| const profileName = profileNameInput ? profileNameInput.toLowerCase() : 'demo'; | ||
| /* c8 ignore start */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should cover these lines
| ); | ||
| const alreadyEnabled = profileAuditTypes.length - auditTypes.length; | ||
| if (alreadyEnabled > 0) { | ||
| await say(`:information_source: Enabling ${auditTypes.length} disabled audits from profile "${profileName}" (${alreadyEnabled} already enabled): ${auditTypes.join(', ')}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid writing disabled in the slack message
|
|
||
| if (isEnableAudit) { | ||
| // Filter to only audits that are currently disabled | ||
| auditTypes = profileAuditTypes.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to disabledAudits
|
Opening fresh PR as we want to support only disable all audits as per @rpapani |
https://jira.corp.adobe.com/browse/SITES-37053
Tests
https://cq-dev.slack.com/archives/C060T2PPF8V/p1763173755764749