ApexKit icon indicating copy to clipboard operation
ApexKit copied to clipboard

Test factory upgrades

Open codefriar opened this issue 2 years ago • 3 comments

WORK IN PROGRESS DO NOT MERGE. Pushed here for help debugging.

Summary by CodeRabbit

  • Refactor: Updated the Illuminated Cloud configuration and PMD settings for better project setup.
  • Documentation: Simplified and improved various documentation files for better readability.
  • New Feature: Introduced new helper classes and methods for data manipulation in Apex testing, including user and permissions handling, data building, and test data generation.
  • Style: Removed unnecessary line breaks and parentheses across multiple files for cleaner code presentation.
  • Test: Enhanced FeatureFlagTests and PolyfillsTests classes by simplifying the code structure.
  • Chore: Added a new minimal Apex class file.

codefriar avatar Jan 10 '24 19:01 codefriar

Apply Sweep Rules to your PR?

  • [ ] Apply: All new business logic should have corresponding unit tests.
  • [ ] Apply: Refactor large functions to be more modular.
  • [ ] Apply: Add docstrings to all functions and file headers.

Image description CodeRabbit

Walkthrough

This pull request includes updates to the project's configuration files, documentation, and test utilities. It also introduces simplifications in code formatting across various classes without altering their functionality. New helper methods for data manipulation and test data generation have been added.

Changes

Files Summary
.idea/*, pmd/ruleset.xml Updated Illuminated Cloud and PMD configurations, including connection names, JDK names, and rulesets. Code style settings for TypeScript and Vue files were adjusted.
docs/*.md Simplified code by removing unnecessary line breaks and parentheses. The logic and functionality of the code remain unchanged.
force-app/main/Universal Flow Invocable/classes/*.cls, force-app/main/default/classes/*.cls Simplified code by removing unnecessary line breaks and parentheses. Some method signatures were modified to make parameters optional.
force-app/main/default/classes/test utilities/*.cls Introduced new classes and helper methods for manipulating users, permissions, inserting user records, building data sets used in Apex testing, creating accounts and contacts with customizable parameters, generating test data, and creating single SObjects or lists of SObjects with required fields populated.
force-app/main/default/classes/feature flags/tests/*.cls, force-app/main/default/classes/polyfills/tests/*.cls Simplified the code by removing unnecessary line breaks and consolidating multiple lines into a single line where possible.
force-app/main/default/classes/test utilities/UserFactoryHelper.cls* Added a new Apex class file with minimal content.

"In the land of code, where logic is king, 🤴
A rabbit hops along, making changes with a zing. 🐇💥
With every hop, the code becomes clear, 🌈
Oh, what joy it brings, to see the clutter disappear! 🎉"


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

github-actions[bot] avatar Jan 10 '24 19:01 github-actions[bot]

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:



[!CAUTION]

An error has occurred: Sweep could not find any files to modify (tracking ID: 99792500a1)