Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

chore: disable salesforce custom objects integration tests #1875

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/api/integration-test-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,23 @@ class IntegrationEnvironment extends TestEnvironment {
if (obj.providerName === 'apollo') {
continue;
}
// TODO: Bring this back once we solve custom object delete permission issue
// if (obj.objectName === 'custom_object' && obj.providerName === 'salesforce') {
// // First get ID based on DeveloperName
// const response = await this.global.apiClient.post(
// '/actions/v2/passthrough',
// {
// path: `/services/data/v57.0/tooling/query?q=SELECT Id,DeveloperName FROM CustomObject WHERE DeveloperName='${obj.id}'`,
// method: 'GET',
// },
// {
// headers: {
// 'x-provider-name': obj.providerName,
// },
// }
// );
// obj.id = response.data.body.records[0].Id;
// }
await this.global.apiClient.post(
'/actions/v2/passthrough',
getDeletePassthroughRequest(obj.id, obj.objectName, obj.providerName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ describe('custom_objects', () => {
};
});

describe.each(['hubspot', 'salesforce'])('%s', (providerName) => {
// TODO: Re-enable salesforce once we figure out how to clean up custom objects
describe.each(['hubspot'])('%s', (providerName) => {
test(`Test that POST followed by GET has correct data and properly cache invalidates`, async () => {
const fullObjectName = providerName === 'salesforce' ? `${testCustomObject.name}__c` : testCustomObject.name;
const response = await apiClient.post<CreateCustomObjectSchemaResponse>(
Expand All @@ -78,7 +79,7 @@ describe('custom_objects', () => {
expect(response.status).toEqual(201);
expect(response.data.object?.name).toEqual(fullObjectName);
addedObjects.push({
id: response.data.object?.name as string,
id: testCustomObject.name,
providerName,
objectName: 'custom_object',
});
Expand Down Expand Up @@ -117,7 +118,7 @@ describe('custom_objects', () => {
expect(listResponse.data).toContainEqual(expect.objectContaining({ name: fullObjectName }));
}, 120_000);

test(`Put /`, async () => {
test(`Test updating a custom object`, async () => {
const fullObjectName = providerName === 'salesforce' ? `${testCustomObject.name}__c` : testCustomObject.name;
const response = await apiClient.post<CreateCustomObjectSchemaResponse>(
'/crm/v2/metadata/custom_objects',
Expand All @@ -129,7 +130,7 @@ describe('custom_objects', () => {
expect(response.status).toEqual(201);
expect(response.data.object?.name).toEqual(fullObjectName);
addedObjects.push({
id: response.data.object?.name as string,
id: testCustomObject.name,
providerName,
objectName: 'custom_object',
});
Expand Down Expand Up @@ -243,7 +244,7 @@ describe('custom_objects', () => {
expect(response.status).toEqual(201);
expect(response.data.object?.name).toEqual(fullObjectName);
addedObjects.push({
id: response.data.object?.name as string,
id: testCustomObject.name,
providerName,
objectName: 'custom_object',
});
Expand Down