-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved Testability of Queries (#813)
* Added a new class LoggerConfigurationSelector to centralize accessing & mocking custom metadata type records - now Nebula Logger will only use mock CMDT records within its own tests (existing behavior), and to load the org's actual CMDT records during customer tests (changed behavior) * Tweaked how records are queried & converted to the inner classes in LoggerSObjectProxy to provide more flexibility + better code coverage * Made additional improvements to the tests for LoggerEngineDataSelector and LogManagementDataSelector to improve testing + test coverage, even when some features are not available (e.g., Network/Experience Cloud, OmniProcess/OmniStudio, etc.) * Scope creep: added explicit access for the Visualforce page LogMassDelete to the 3 permission sets LoggerAdmin, LoggerLogViewer, and LoggerEndUser * Fixed some test failures in the async-failure & big-object plugins and extra-tests, caused by the changes to how CMDT records are now loaded in core during tests * Updated build.yml to use new --concise flag when validating the core metadata in scratch orgs * Changed build.yml to use the base scratch org for codecov.io integration, since this org will have the lowest code coverage of any of the scratch orgs * Updated package.json + build.yml to auto-generate a new core.package.xml manifest file for the core package's metadata, for teams that utilize manifest files in their deployment/devops processes * Added some sample CMDT records to extra-tests so that the pipeline can validate that the records are returned by the query selector classes * Upgraded several dev dependencies in package.json
- Loading branch information
Showing
98 changed files
with
11,314 additions
and
7,238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.github/ | ||
.husky/ | ||
.sf/ | ||
.sfdx/ | ||
.vscode/ | ||
temp/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run husky:pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
## LoggerConfigurationSelector class | ||
|
||
Selector class used for all queries that are specific to the configuration layer. | ||
|
||
--- | ||
|
||
### Methods | ||
|
||
#### `getInstance()` → `LoggerConfigurationSelector` | ||
|
||
The instance of `LoggerConfigurationSelector` used for any querying specific to the configuration layer | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
LoggerConfigurationSelector | ||
|
||
**Description** | ||
|
||
The singleton instance of `LoggerConfigurationSelector` | ||
|
||
#### `getLogEntryDataMaskRules()` → `List<LogEntryDataMaskRule_t>` | ||
|
||
Returns the `LogEntryDataMaskRule_t` records in the org. | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<LogEntryDataMaskRule_t> | ||
|
||
**Description** | ||
|
||
`List<LogEntryDataMaskRule_t>` containing records in the org | ||
|
||
#### `getLogEntryTagRules()` → `List<LogEntryTagRule_t>` | ||
|
||
Returns the enabled `LogEntryTagRule_t` records in the org, including the field `SObjectField__r.QualifiedApiName` that cannot be accessed via `LogEntryTagRule_t.getAll()`. The value of `SObjectField__c` is automatically set to the value of `SObjectField__r.QualifiedApiName` | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<LogEntryTagRule_t> | ||
|
||
**Description** | ||
|
||
`List<LogEntryTagRule_t>` containing enabled records in the org | ||
|
||
#### `getLogStatuses()` → `List<LogStatus_t>` | ||
|
||
Returns the `LogStatus_t` records in the org. | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<LogStatus_t> | ||
|
||
**Description** | ||
|
||
`List<LogStatus_t>` containing records in the org | ||
|
||
#### `getLoggerFieldMappings()` → `List<LoggerFieldMapping_t>` | ||
|
||
Returns the enabled `LoggerFieldMapping_t` records in the org. | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<LoggerFieldMapping_t> | ||
|
||
**Description** | ||
|
||
`List<LoggerFieldMapping_t>` containing enabled records in the org | ||
|
||
#### `getLoggerParameters()` → `Map<String, LoggerParameter_t>` | ||
|
||
Returns the `LoggerParameter_t` records in the org. | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
Map<String, LoggerParameter_t> | ||
|
||
**Description** | ||
|
||
`List<LoggerParameter_t>` containing records in the org | ||
|
||
#### `getLoggerPlugins()` → `List<LoggerPlugin_t>` | ||
|
||
Returns the `LoggerPlugin_t` records in the org. | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<LoggerPlugin_t> | ||
|
||
**Description** | ||
|
||
`List<LoggerPlugin_t>` containing records in the org | ||
|
||
#### `getLoggerSObjectHandlers()` → `List<LoggerSObjectHandler_t>` | ||
|
||
Returns the `LoggerSObjectHandler_t` records in the org. | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<LoggerSObjectHandler_t> | ||
|
||
**Description** | ||
|
||
`List<LoggerSObjectHandler_t>` containing records in the org | ||
|
||
#### `getLoggerScenarioRules()` → `List<LoggerScenarioRule_t>` | ||
|
||
Returns the `LoggerScenarioRule_t` records in the org. | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<LoggerScenarioRule_t> | ||
|
||
**Description** | ||
|
||
`List<LoggerScenarioRule_t>` containing records in the org | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.