Closed
Conversation
Soql tests
Base SOQL / DML classes
Feature/mock soql
* pre-cleanup * added a bunch of other Database methods - still need tests * implemented majority of tests * implemented rest of Dml tests * make Dml constructor @TestVisible/protected * new SObjectUtils class + method to mock Ids * checkpoint - setting up mockdml class & tests * finalized convert tests * first full draft of the MockDmlTest * added tests to demonstrate extensability; this devolved into adding a MockDmlResult class * moved MockDmlResult inside MockDml; needs to be virtual anyways * checkpoint - internal plumbing * added visibility notes * checkpoint - filling in most base methods * resetHistory tweaks * fixed issue w/UndeleteResult deserialization * cleanup; removing false description * cleanup * implemented FailureLogic interface; tests still failing * revamped visibility, outer class no longer virtual * finished revamping error handling & visibility * minor cleanups * checkpoint - reworking to support platform events * platform events now working! * added readonly field method to utils class * implemented SObjectUtils mocking logic * checkpoint - implementing leadconvert logic * renaming/reorganizing SObjectUtils methods * checkpoint - squashing random errors * fix issues with insert failure handling * checkpoint - adding more conversion details * fixed issue deserializing ConvertResults * improved serialization, and separation between MockDml.Result classes * improving test coverage, removing functionality for platformeventhistory that could never actually be used * fixed bug with UndeleteResult; previously discovered in the old serialization method * cleanup * matched leadconvert implementation vs. reality; very few fields actually get set in memory. all tests passing * revamped convert methods to only insert if an account/contact/opp wasn't explicitly set * simplified conversion method w/helper * renamed methods and revamped childrelationship methods * added stress test for relationship caching method * added lookup field string overload * renamed ConditionalLogic class * modified ConditionalFailure method to return Exception instead of inner error type * updated visibilities, reorganized inner types by visibility * checkpoint - adding better comments * added more detailed comments * further reduced visibilities * added more comments to Dml
* Suppress inescapable PMD warnings * simplified PMD suppress * simplified PMD statement * created base DatabaseLayer + failing tests * removed coercion tests * covering new factory constructors in tests * ran prettier * updated prettierrc, and ran again * created tests - all passing * cleanup * ran prettier * simplified databaselayer through static access * added comments to DatabaseLayer
* implemented queryFirst method * removed queryString functionality; some tests not passing * fixed constructor alignment issue * fixed failing test * reworked MockSoql to include a new Simulator interface, which is the primary mechanism for injecting mock errors * removed all instances of Assert.is/Not/True/False/Null with Assert.areEqual variants, to avoid unexpected results * minor cleanup * minor cleanup, contd.
* created MockRecord class & tests * replaced usage in MockDml * implemented in MockDmlTest * removed SObjectUtils methods, which are now replaced by the new MockRecord class * renamed utils class to focus solely on ChildRelationships * cleanup mockrecord * tweaking doc blocks
* ran prettier * bumped all to 61.0 * reverted Dml to 59.0; later versions have issue with using non-virtual SObjectTypes * resolving scanner issues * organized classes into folders * renamed MockRecords folder * created initial readmes * revised readme structure * databaselayer documentation * renamed repo * clarified installation instructions * tinkering with main readme * adding to readme * updated history objects to be constant * checkpoint: added dml usage info * enforce consistent use of "private" in constants * checkpoint: tidying readme * moved classes out of subfolders * Checkpoint: Added docs directory, building out more detailed object references * fleshing out dml docs * more docs updates * broke out DatabaseLayer into individualized methods * started soql docs * revised soql mocking * wrote initial soql docs for readme * fixed typo in databaselayer section * wrote dml documentation * tidy up * cleanup * checkpoint: adding soql methods and builder docs * added builder method descriptions * filled in most inner classes * renamed setHavingLogic and setWhereLogic methods to better reflect their intent * finished documenting Condition/ConditionalLogic * added querylocator and sortorder docs * fixed spacing * added about blurb * added blurbs re: object construction * added summary * cleanup * formalized the structure for soql mocking docs * finished AggregateResult docs * checkpoint, finished MockSoql inner docs. Finishing docs on mocking procedures and considerations * checkpoint: mocking docs * checkpoint; setMock methods * finished rough draft of the docs!
* created package * packaged new version 0.1.0
* #23: Revisit Overall API (#24) * reworked DatabaseLayer api; now using public static properties * ran prettier * checkpoint: updating the Dml's method api * checkpoint: fixing unrelated compile fails * checkpoint: adding doConvert overloads * checkpoint: enumerating the massive number of overloads required for parity with the Database class * enumerated all methods to fill in * checkpoint * checkpoint - Dml now compiles; tests do not * checkpoint: working through mockdml test failures * fixed most failing tests & coverage on the MockDml class * all mock dml tests passing * checkpoint: mocking event callbacks * fixed mockdmltests * added coverage to lead convert overrides * added coverage to doDelete methods * updated Dml.Operation enum * added coverage for doDeleteAsync methods * added coverage for doDeleteImmediate methods * added coverage for doinsert methods * added coverage for doInsertAsync and doInsertImmediate methods * removed support for EventBus callbacks -- this doesn't seem fully baked yet * added coverage for emptyRecycleBin methods * added coverage for doUndelete methods * added coverage for empty callbacks * added coverage for doUpdate methods * added coverage for updateAsync and updateImmediate methods * added coverage for doUpsert methods * updated soql api to use static property * cleanup * checkpoint: documentation * checkpoint -- updating docs * updated docs * suppressing warnings for doUpsert method * sf scanner changes * packaged version 1.0.0 * packaged * bump most api versions to 62.0 * added disclaimer for Dml API version * re-packaged
* bump api version to 63.0 * MockSoql API Revamp (#29) * added soql method to identify queries * renamed identifier property * implemented MockSoql.setGlobalMock static method * cleanup * updated simulator interface method in mocks * moved default error/result injection to the StaticResults object * documentation - checkpoint * docs checkpoint * checkpoint - SOQL docs * finished readme * fixing sf scanner warning * updating inner type references in MockSoqlTest, for consistency * packaged version 2.0.0
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Closed
7 tasks
# Conflicts: # .github/workflows/auto-documentation.yml # .github/workflows/ci.yml # .github/workflows/packaging.yml # .github/workflows/release.yml # force-app/main/default/classes/Dml.cls-meta.xml # force-app/main/default/classes/DmlTest.cls-meta.xml # force-app/main/default/classes/Soql.cls-meta.xml # force-app/main/default/classes/SoqlTest.cls-meta.xml # plugins/nebula-logger/source/classes/DatabaseLayerNebulaLoggerAdapter.cls-meta.xml # sfdx-project.json # source/classes/DmlTest.cls-meta.xml # source/classes/Soql.cls-meta.xml # source/classes/SoqlTest.cls-meta.xml # src/core/classes/Cmdt.cls-meta.xml # src/core/classes/DmlTest.cls-meta.xml # src/core/classes/Soql.cls-meta.xml # src/core/classes/SoqlTest.cls-meta.xml
Owner
Author
|
Starting with a new branch, will cherry-pick commits from this branch |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses a series of repository cleanup tasks: restructuring the source directory layout, dropping managed package support, fixing CI recursion, and updating the packaging and release workflows to support a two-package monorepo structure.
The directory layout was reorganized from
source/andplugins/into a unifiedsrc/tree, with core Apex classes living undersrc/core/and the Nebula Logger plugin undersrc/plugins/nebula-logger/. All workflow path filters and--source-dirflags were updated to match. Managed package support was removed entirely, consolidating the project around the single unlocked package and the nebula plugin.CI recursion was eliminated by converting
auto-documentation.ymlto aworkflow_call/workflow_dispatch-only trigger and calling it fromci.ymlas a dependent job. A!contains(github.actor, '[bot]')guard on all CI jobs prevents bot-authored commits (fromclaude[bot]via the Claude Code OAuth token) from re-triggering the pipeline. Bothgenerate-docsandclaude-reviewnow gate behindscanandrun-unit-testscompleting first.The packaging and release workflows were refactored around the two independent packages.
packaging.ymlis now a reusable workflow with boolean inputs (run-unlocked-package,run-nebula-plugin-package) and two separate jobs, one per package, each reading its version and package alias fromsfdx-project.jsonby path selector.release.ymlgained adetect-changesjob to identify which package paths changed, an updatedversioningjob that independently auto-increments each package's patch version when source changes without a manual version bump, and two release jobs that produce separate GitHub Releases with monorepo-style tags —unlocked/vX.Y.Zfor the core package andplugin-nebula/vX.Y.Zfor the Nebula plugin.