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

Make unit tests pass in Enterprise scratch org #85

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

stephanspiegel
Copy link
Contributor

  • Fix test for isCalculated FieldSetting
  • Fix tests failing in Enterprise scratch orgs

Addresses #51

  • Tested in default Enterprise edition and Developer edition scratch orgs
  • Code coverage remains the same, except line 1771 is now also covered

The existing test suffers from two issues:
1. `isCalculated` is set on the FieldSetting for the previous test
   (`setting` instead of `settingOne`)
2. Account.Rating is not actually a calculated field, but is returned
   among a number of other default fields here because the FieldSetting is
   unspecific

Account doesn't actually have any standard fields that are calculated,
so we use Workorder for this test instead.
Addresses PropicSignifi#51

Replace all references to the fields
    Account.Sic
    Account.Site
    Account.AccountNumber
    Account.Rating
    Opportunity.TotalOpportunityQuantity
because they are not accessible by default in Enterprise edition scratch
orgs
@stephanspiegel stephanspiegel marked this pull request as ready for review August 5, 2022 09:41
@stephanspiegel
Copy link
Contributor Author

When I started working on this, I didn't know the meaning of the label first-timers-only. As it happens, this is my first PR for an open-source project :)

@HenryRLee
Copy link
Contributor

Thanks @stephanspiegel, the MR looks great!

Currently the CI is broken. I'll spend some time to build the code and test it manually, and then I'll merge this MR.

Copy link
Contributor

@HenryRLee HenryRLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran the test manually and they all passed. Thank you for you contribution!

@HenryRLee HenryRLee merged commit 00e28ac into PropicSignifi:master Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants