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

Commit

Permalink
chore: disable salesforce custom objects integration tests (#1875)
Browse files Browse the repository at this point in the history
We aren't able to properly cleanup due to permissions issues.
  • Loading branch information
asdfryan authored Nov 8, 2023
1 parent c0ddce9 commit e5dbfaf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
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

0 comments on commit e5dbfaf

Please sign in to comment.