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

Test code fails when using scratch org with Enterprise edition #51

Open
HenryRLee opened this issue Mar 11, 2020 · 0 comments
Open

Test code fails when using scratch org with Enterprise edition #51

HenryRLee opened this issue Mar 11, 2020 · 0 comments
Labels
beginner bug Something isn't working good first issue Good for newcomers

Comments

@HenryRLee
Copy link
Contributor

The root cause is that the default System Administrator profile under an Enterprise edition scratch org have missed some field level security on the account and opportunity object. These fields include:

Account.Sic
Account.Site
Account.AccountNumber
Account.Rating
Opportunity.TotalOpportunityQuantity

To fix it, we should avoid using these fields in the test code.

Temporary workaround: avoid using the Enterprise edition scratch org.

@HenryRLee HenryRLee added bug Something isn't working good first issue Good for newcomers beginner labels Mar 11, 2020
stephanspiegel added a commit to stephanspiegel/Query.apex that referenced this issue Aug 4, 2022
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
HenryRLee pushed a commit that referenced this issue Oct 14, 2022
* Fix test for `isCalculated` FieldSetting

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.

* Fix tests failing in Enterprise scratch orgs

Addresses #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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant