Skip to content

Commit

Permalink
PROD-279 rollout (#5889)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamirr committed May 12, 2024
1 parent afe11ed commit 9fe17e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 39 deletions.
32 changes: 0 additions & 32 deletions packages/salesforce-adapter/e2e_test/adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,6 @@ const { makeArray } = collections.array
const { PROFILE_METADATA_TYPE } = constants
const { isDefined } = lowerDashValues

const extractReferenceTo = (annotations: Values): (string | undefined)[] =>
makeArray(annotations[constants.FIELD_ANNOTATIONS.REFERENCE_TO]).map(
(ref: ReferenceExpression | string): string | undefined =>
isReferenceExpression(ref) ? ref.elemID.typeName : ref,
)

describe('Salesforce adapter E2E with real account', () => {
let client: SalesforceClient
let adapter: SalesforceAdapter
Expand Down Expand Up @@ -238,30 +232,6 @@ describe('Salesforce adapter E2E with real account', () => {
),
)

// Test picklist values
expect(
lead.fields.CleanStatus.annotations[
constants.FIELD_ANNOTATIONS.VALUE_SET
]
.map((val: Values) => val[constants.CUSTOM_VALUE.FULL_NAME])
.sort(),
).toEqual([
'Acknowledged',
'Different',
'Inactive',
'Matched',
'NotFound',
'Pending',
'SelectMatch',
'Skipped',
])

// Test lookup reference_to annotation
expect(extractReferenceTo(lead.fields.OwnerId.annotations)).toEqual([
'Group',
'User',
])

// Test default value for checkbox
expect(
lead.fields.IsConverted.annotations[
Expand Down Expand Up @@ -1539,7 +1509,6 @@ describe('Salesforce adapter E2E with real account', () => {

const testLookup = (annotations: Values): void => {
expect(annotations[constants.LABEL]).toBe('Lookup label')
expect(extractReferenceTo(annotations)).toEqual(['Opportunity'])
expect(annotations[CORE_ANNOTATIONS.REQUIRED]).toBeFalsy()
const lookupFilter =
annotations[constants.FIELD_ANNOTATIONS.LOOKUP_FILTER]
Expand Down Expand Up @@ -1576,7 +1545,6 @@ describe('Salesforce adapter E2E with real account', () => {

const testMasterDetail = (annotations: Values): void => {
expect(annotations[constants.LABEL]).toBe('MasterDetail label')
expect(extractReferenceTo(annotations)).toEqual(['Case'])
expect(
annotations[constants.FIELD_ANNOTATIONS.REPARENTABLE_MASTER_DETAIL],
).toBe(true)
Expand Down
4 changes: 2 additions & 2 deletions packages/salesforce-adapter/src/custom_references/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const handlers: Record<CustomReferencesHandlers, WeakReferencesHandler> = {
const defaultHandlersConfiguration: Record<CustomReferencesHandlers, boolean> =
{
profiles: false,
managedElements: false,
permisisonSets: false,
managedElements: true,
permisisonSets: true,
}

export const customReferencesConfiguration = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const optionalFeaturesDefaultValues: OptionalFeaturesDefaultValues = {
extraDependenciesV2: true,
extendedCustomFieldInformation: false,
importantValues: true,
hideTypesFolder: false,
omitStandardFieldsNonDeployableValues: false,
hideTypesFolder: true,
omitStandardFieldsNonDeployableValues: true,
}

type BuildFetchProfileParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
buildFilterContext,
createCustomMetadataType,
createCustomObjectType,
defaultFilterContext,
} from '../utils'
import filterCreator from '../../src/filters/installed_package_generated_dependencies'
import { API_NAME } from '../../src/constants'
Expand All @@ -52,7 +51,11 @@ describe('installedPackageElementsFilter', () => {
),
]
filter = filterCreator({
config: defaultFilterContext,
config: buildFilterContext({
customReferencesSettings: {
managedElements: false,
},
}),
}) as FilterWith<'onFetch'>
})

Expand Down
2 changes: 1 addition & 1 deletion packages/workspace/src/workspace/reference_indexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { RemoteMap, RemoteMapEntry } from './remote_map'
const log = logger(module)
const { awu } = collections.asynciterable

export const REFERENCE_INDEXES_VERSION = 7
export const REFERENCE_INDEXES_VERSION = 8
export const REFERENCE_INDEXES_KEY = 'reference_indexes'

type ChangeReferences = {
Expand Down

0 comments on commit 9fe17e6

Please sign in to comment.